Thread: DBase Monitor

DBase Monitor

From
Steve Tucknott
Date:
PostGreSQL 7.4.3 (RedHat 8)

Is there a 'monitor' utility that shows connected sessions details (ie who is connected, what they are executing etc)?


Regards,

Steve Tucknott

ReTSol Ltd

DDI: 01903 828769

Re: DBase Monitor

From
Oliver Elphick
Date:
On Tue, 2004-08-24 at 10:25, Steve Tucknott wrote:
> PostGreSQL 7.4.3 (RedHat 8)
>
> Is there a 'monitor' utility that shows connected sessions details (ie
> who is connected, what they are executing etc)?

There is one in pgaccess

--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "I saw in the night visions, and, behold, one like the
      Son of man came with the clouds of heaven, and came to
      the Ancient of days, and they brought him near before
      him. And there was given him dominion, and glory, and
      a kingdom, that all people, nations, and languages,
      should serve him; his dominion is an everlasting
      dominion, which shall not pass away, and his kingdom
      that which shall not be destroyed."
                                    Daniel 7:13,14



Re: DBase Monitor

From
Oliver Fromme
Date:
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