RE: Finding number of current connections

From: "Nils O(dot) =?iso-8859-1?q?Sel=E5sdal?=" <noselasd(at)frisurf(dot)no>
To: "Tauren Mills" <tauren(at)servlets(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: RE: Finding number of current connections
Date: 2001-08-02 03:00:38
Message-ID: 01080204003801.01247@space.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tankgirl 2001-08-02 07:32:22 RE : Re: Asking for some PL/pgSQL Tips
Previous Message Barry Lind 2001-08-02 02:46:49 Re: Data Versioning