pgtop, display PostgreSQL processes in `top' style

From: Cosimo Streppone <cosimo(at)streppone(dot)it>
To: pgsql-announce(at)postgresql(dot)org
Cc: "DBD:"(at)svr1(dot)postgresql(dot)org:Pg list <dbdpg-general(at)gborg(dot)postgresql(dot)org>, pgsql-sql(at)postgresql(dot)org
Subject: pgtop, display PostgreSQL processes in `top' style
Date: 2005-04-30 22:10:30
Message-ID: 42740256.4090200@streppone.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pgsql-sql

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

Responses

Browse pgsql-announce by date

  From Date Subject
Next Message Tom Lane 2005-05-02 03:04:49 Re: pgtop, display PostgreSQL processes in `top' style
Previous Message Enrico Weigelt 2005-04-27 17:07:43 Re: OpenRPT

Browse pgsql-sql by date

  From Date Subject
Next Message Ragnar Hafstað 2005-05-01 09:15:14 Re: can someone jelp me on this?
Previous Message Metin Ozisik 2005-04-30 19:25:39 Re: Build issues: "-static" builds resulting initdb problems