Re: DBase Monitor - Mailing list pgsql-novice

From Oliver Fromme
Subject Re: DBase Monitor
Date
Msg-id 200408240947.i7O9l1ql007963@lurza.secnetix.de
Whole thread Raw
In response to DBase Monitor  (Steve Tucknott <steve@retsol.co.uk>)
List pgsql-novice
Steve Tucknott wrote:
 > Is there a 'monitor' utility that shows connected sessions details (ie
 > who is connected, what they are executing etc)?

If you want to see a current "snapshot" of connected clients
and their activity, it's quite simple, just look at the
pg_stat_activity system table.  From the UNIX command line
you can type:

    psql -c "SELECT * FROM pg_stat_activity" template1

For convenience, I made myself a shell alias for that.  ;-)

Hope that helps.

Best regards
   Oliver

--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"And believe me, as a C++ programmer, I don't hesitate to question
the decisions of language designers.  After a decent amount of C++
exposure, Python's flaws seem ridiculously small." -- Ville Vainio

pgsql-novice by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: DBase Monitor
Next
From: Kunal
Date:
Subject: MySQL vs PostgreSQL