RE: Finding number of current connections - Mailing list pgsql-general

From Nils O. Selåsdal
Subject RE: Finding number of current connections
Date
Msg-id 01080204003801.01247@space.net
Whole thread Raw
In response to RE: Finding number of current connections  ("Tauren Mills" <tauren@servlets.net>)
List pgsql-general
On Wednesday 01 August 2001 07:53 am, Tauren Mills wrote:
> Thanks, Tom!
>
> I assume the fact you only mention 7.2 means the current versions have no
> way to determine this.
Well, postgresql starts one process per connection so you could see how many
postmasters that are running(minus one for the 1. server..)

On my linux machine, the -f and -l switch to 'ps'comes handy:
[noselasd@space noselasd]$ ps -efl |grep postmast |grep -v grep
000 S postgres   873     1  0  69   0    -  1541 do_sel 02:51 ?
00:00:00 /usr/bin/postmaster -D /var/lib/pgsql/data
040 S postgres  1356   873  0  69   0    -  1697 unix_s 03:53 ?
00:00:00 postgres: noselasd noselasd [local] idle

1 connection here, user noselasd conected to the 'noselasd' database.

--
Nils O. Selåsdal

pgsql-general by date:

Previous
From: "Tauren Mills"
Date:
Subject: RE: Finding number of current connections
Next
From: "Yasuo Ohgaki"
Date:
Subject: Re: Data Versioning