I'm currently working on something like a `mytop' clone,
also written in Perl with DBI + DBD::Pg interface.
mytop is a command line utility that displays mysql
server status and clients connected modeled after
`top' unix utility. (http://mytop.sourceforge.net).
What I'd like to achieve is something like that, but
for PostgreSQL, of course.
Now the project is in the very early stages, but it
already does something useful with Pg backend versions 7.2+
with stats enabled. Obviously, it looks at pg_stat*
relations to extract some useful information.
There are some things that are nice in `mytop', and I
think it would be nice to have also in `pgtop', but I
don't know how to replicate them:
1) is it possible to know Pg backend uptime with
SQL queries? Or must I look at postmaster.pid file?
or even something else?
2) how can I know the ip addresses/hostnames of clients
connecting to server?
3) Is there a way to know the number of queries performed
against Pg backend (by each client)? Can I distinguish
between selects / updates / inserts / copy / ... ?
If you want to take a look at it, point your
browser at http://search.cpan.org/dist/pgtop .
pgsql-announce by date
|Next:||From: Tom Lane||Date: 2005-05-02 03:04:49|
|Subject: Re: pgtop, display PostgreSQL processes in `top' style |
|Previous:||From: Enrico Weigelt||Date: 2005-04-27 17:07:43|
|Subject: Re: OpenRPT|
pgsql-sql by date
|Next:||From: Ragnar Hafstað||Date: 2005-05-01 09:15:14|
|Subject: Re: can someone jelp me on this?|
|Previous:||From: Metin Ozisik||Date: 2005-04-30 19:25:39|
|Subject: Re: Build issues: "-static" builds resulting initdb problems |