pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tauren Mills <tauren@servlets.net>
To: pgsql-admin@postgresql.org
Subject: Finding number of current connections
Date: Tue, 31 Jul 2001 12:24:38 -0700
Message-ID: <NBBBLBKDJMGDNPMDGAABAEBKBBAB.tauren@servlets.net> (raw)

I need to find a way to determine how many concurrent connections are being
made to the database server at any given time.  I'm coming from
administering a MySQL database and am familiar with the following command:

mysqladmin -uroot -p processlist

This lists something like this:

+-----+------+-----------+----+---------+------+------------------+
| Id  | User | Host      | db | Command | Time | Info             |
+-----+------+-----------+----+---------+------+------------------+
| 307 | root | localhost |    | Sleep   | 0    |                  |
| 308 | root | localhost |    | Sleep   | 0    |                  |
| 309 | root | localhost |    | Query   | 0    | show processlist |
+-----+------+-----------+----+---------+------+------------------+

User's on the system can also get a listing of only their own process list
and not see anyone else's processes by simply using their own username and
password.

I've looked through the FAQ and manual, but have not been able to find an
answer to this.  Is there some pgsql command that will provide this
information.  I need both a Full Listing from an administrative viewpoint
and a Per User listing.

If there is not a tool to do this, how difficult would it be to build a tool
to obtain this information?  Or is there simply no way to extract this
information from pgsql?

Thanks!
Tauren




view thread (2+ messages)  latest in thread

Message-ID: <NBBBLBKDJMGDNPMDGAABAEBKBBAB.tauren@servlets.net>
Permalink:  ../NBBBLBKDJMGDNPMDGAABAEBKBBAB.tauren@servlets.net/
Also on:    postgresql.org/message-id/NBBBLBKDJMGDNPMDGAABAEBKBBAB.tauren@servlets.net

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tauren@servlets.net
  Subject: Re: Finding number of current connections
  In-Reply-To: <NBBBLBKDJMGDNPMDGAABAEBKBBAB.tauren@servlets.net>
  References: <NBBBLBKDJMGDNPMDGAABAEBKBBAB.tauren@servlets.net>

* 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