Thread: Cluster Up-time.

Cluster Up-time.

From
Alexi Gen
Date:
Hello,

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.
Or is there something else that I need to do in order to calculate this?
Any help on this is appreciated.

Cheers!
Alexi


Send instant messages to your online friends http://uk.messenger.yahoo.com

Re: Cluster Up-time.

From
Michael Fuhr
Date:
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