Re: postgres uptime

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Gaetano Mendola <mendola(at)bigfoot(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgres uptime
Date: 2004-08-20 18:04:16
Message-ID: 200408201804.i7KI4GG09210@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Pflug wrote:
> Robert Treat wrote:
>
> >
> > If we do add this function, I guarantee you that you'll see it added to
> > phppgadmin and pgadmin, because it helps make these remote
> > administration tools more complete.
>
> :-)
> Guess what I just implemented...
>
> pg_postmaster_starttime() RETURNS timestamp, currently implemented in
> the admin module for win32 using GetProcessTimes(PostmasterHandle).
>
> What's the equivalent for posix? Interpreting popen("ps...") might get
> messy.

I think we should just call gettimeofday() at postmaster start and store
it somewhere.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2004-08-20 19:03:24 Re: postgres uptime
Previous Message Tom Lane 2004-08-20 17:36:39 Re: pg_subtrans and WAL