Re: Cluster Up-time.

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Alexi Gen <alexigen(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cluster Up-time.
Date: 2008-08-18 12:55:56
Message-ID: 20080818125556.GA97054@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 18, 2008 at 03:53:32AM -0700, Alexi Gen wrote:
> Is there a table/view available from where I can check what time the cluster was started?
> Need this to calculate the uptime of the cluster.

In PostgreSQL 8.1 and later you can run these queries to get the start
time and uptime:

SELECT pg_postmaster_start_time();
SELECT now() - pg_postmaster_start_time();

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message justin 2008-08-18 15:01:12 Re: What's size of your PostgreSQL Database?
Previous Message Reid Thompson 2008-08-18 12:35:41 Re: Regression failing on build -> ERROR: could not access file "$libdir/plpgsql": No such file or directory