Thread: How many connections are in use?

How many connections are in use?

From
"Campbell, Lance"
Date:

PostgreSQL: 8.2.4

OS: Linux Enterprise 4

 

Is there a way to log into PostgreSQL and determine how many database connections are in use?  I know how many I have allocated in the postgresql.conf file.  I would think there is some command in SQL or command line parameter that would tell me how many connections are currently being used.

 

Thanks,

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu

 

Re: How many connections are in use?

From
"Rodrigo De León"
Date:
On 11/2/07, Campbell, Lance <lance@uiuc.edu> wrote:
> Is there a way to log into PostgreSQL and determine how many database
> connections are in use?

Use pg_stat_activity.

See:
http://www.postgresql.org/docs/8.2/static/monitoring-stats.html#MONITORING-STATS-VIEWS