Thread: Database uptime?

Database uptime?

From
Jeff Boes
Date:
Is there any way via SQL to determine how long the database has been up?
I realize I could determine this by identifying the PID associated with
the postmaster, but I need to do this remotely via a connection.

--
Jeff Boes                                      vox 269.226.9550 ext 24
Database Engineer                                     fax 269.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
           ...Nexcerpt... Extend your Expertise

Re: Database uptime?

From
frbn
Date:
Jeff Boes a écrit:
> Is there any way via SQL to determine how long the database has been up?
> I realize I could determine this by identifying the PID associated with
> the postmaster, but I need to do this remotely via a connection.
>

you could write a perl script launched by cron which does some inserts
in an information table about the uptime etc...