Skip site navigation (1) Skip section navigation (2)

Re: DBase Monitor

From: Oliver Fromme <olli(at)lurza(dot)secnetix(dot)de>
To: steve(at)retsol(dot)co(dot)uk (Steve Tucknott)
Cc: pgsql-novice(at)postgresql(dot)org (PostGreSQL)
Subject: Re: DBase Monitor
Date: 2004-08-24 09:47:01
Message-ID: 200408240947.i7O9l1ql007963@lurza.secnetix.de (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-novice by date

Next:From: KunalDate: 2004-08-24 10:51:01
Subject: MySQL vs PostgreSQL
Previous:From: Oliver ElphickDate: 2004-08-24 09:39:34
Subject: Re: DBase Monitor

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group