Re: Postmaster Uptime

From: Thomas O'Dowd <tom(at)nooper(dot)com>
To: Tim Knowles <tim(at)ametco(dot)co(dot)uk>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgman(at)candle(dot)pha(dot)pa(dot)us, rtreat(at)webmd(dot)net, pgsql-general(at)postgresql(dot)org
Subject: Re: Postmaster Uptime
Date: 2002-09-25 09:23:32
Message-ID: 1032945812.1391.425.camel@beast.uwillsee.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hmmm if its just cosmetic then just create a table to store the start
time. Then as part of your start script for postgresql, have it update
or insert a new timestamp in that table after starting postgresql. You
wanna make sure and always use that script or the values won't make
sense. You can calc approx uptime then from that and display it. Its not
a great solution or anything but it should work for your purpose.

Tom.

On Wed, 2002-09-25 at 18:19, Tim Knowles wrote:
> To be honest my reason for requiring an uptime is really just comestic. My
> company uses a VBA app with PostgreSQL as the backend, an administrator only
> screen shows database activity (number of backends, running queries -
> bascially custom versions of some of the pg_stat views), I thought the
> uptime would be an interesting addition to that.
>
> I also think that having easy access to the uptime could help in the
> advocacy of PostgreSQL. My best is just over 4 months (based on the date
> given by the ps command), stopped only by an upgrade to 7.2.2! If people are
> willing to publish/share that sort of info it can only further impress
> people about PostgreSQL's stability (btw I've never had a crash/problem in
> the 2 years I've been using PostgreSQL)
>
> Best Regards,
>
> Tim Knowles
>
>
> Robert Treat <rtreat(at)webmd(dot)net> writes:
> > Could we store this as an environment variable that gets set once
> > postmaster leaves "start up" mode?
>
> Whose environment? If the postgres user, how would another user access
> it? And if only the postgres user could access it, it's not clear to
> me why that would have any advantages over just storing it in a static
> C variable.
>
> More generally, why is this functionality needed in the first place?
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
--
Thomas O'Dowd. - Nooping - http://nooper.com
tom(at)nooper(dot)com - Testing - http://nooper.co.jp/labs

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lee Kindness 2002-09-25 09:36:12 Re: Postmaster Uptime
Previous Message Tim Knowles 2002-09-25 09:19:00 Re: Postmaster Uptime