From: Jeff - <threshar@torgo.978.org>
To: Markus Schaber <schabi@logix-tt.com>
Cc: Cosimo Streppone <cosimo@streppone.it>
Cc: pgsql-announce@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [ANNOUNCE] pgtop, display PostgreSQL processes in `top' style
Date: Wed, 4 May 2005 10:28:19 -0400
Message-ID: <8721B090-C082-4860-88F3-CBD60EE4D4D0@torgo.978.org> (raw)
In-Reply-To: <4276A534.7060607@logix-tt.com>
References: <42740256.4090200@streppone.it>
<4276A534.7060607@logix-tt.com>
On May 2, 2005, at 6:09 PM, Markus Schaber wrote:
>
>> 1) is it possible to know Pg backend uptime with
>> SQL queries? Or must I look at postmaster.pid file?
>> or even something else?
>>
>
> In contrib, there's a function caled backend_pid() defined in
> misc_utils.sql, it may be helpful for you.
>
> markus
>
I wrote a small util called "pgtop" that does a top style listing on
PG in terms of cpu. I also have one called pgiomonitor (that is on
pgfoundry and mostly done) that does the same but shows you which
tables are producing the most IO)
http://postgresql.jefftrout.com/pgtop.pl
it only runs on linux and it must run on the same box as pg itself.
You may want to look at it and see if you can get anything good out
of it.
queries / second is tricky. You could look at my pgspy utility but
it is in C. It can give you queries / second data
--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/http://www.stuarthamm.net/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: threshar@torgo.978.org, schabi@logix-tt.com, cosimo@streppone.it, pgsql-announce@postgresql.org
Subject: Re: [ANNOUNCE] pgtop, display PostgreSQL processes in `top' style
In-Reply-To: <8721B090-C082-4860-88F3-CBD60EE4D4D0@torgo.978.org>
References: <42740256.4090200@streppone.it> <4276A534.7060607@logix-tt.com> <8721B090-C082-4860-88F3-CBD60EE4D4D0@torgo.978.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox