Finding number of current connections

From: "Tauren Mills" <tauren(at)servlets(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Finding number of current connections
Date: 2001-08-01 02:36:55
Message-ID: NBBBLBKDJMGDNPMDGAABCEDGBBAB.tauren@servlets.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I posted this message to the admin list, but just realized maybe it belongs
in the general list. Sorry for double posting!

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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-08-01 04:03:13 Re: Finding number of current connections
Previous Message Susan Lane 2001-08-01 01:20:29 creating postgres tables using existing table defs