From: Cosimo Streppone <cosimo@streppone.it>
To: pgsql-announce@postgresql.org
Cc: "DBD:"@svr1.postgresql.org:Pg list <dbdpg-general@gborg.postgresql.org>
Cc: pgsql-sql@postgresql.org
Subject: pgtop, display PostgreSQL processes in `top' style
Date: Sun, 01 May 2005 00:10:30 +0200
Message-ID: <42740256.4090200@streppone.it> (raw)
Hi everybody,
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 .
--
Cosimo
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: cosimo@streppone.it, pgsql-announce@postgresql.org, dbdpg-general@gborg.postgresql.org
Subject: Re: pgtop, display PostgreSQL processes in `top' style
In-Reply-To: <42740256.4090200@streppone.it>
* 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