RE: Finding number of current connections

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

Hi Nils,

Thanks for this information! I should be able to use this to create a
script that will solve my needs.

Does anyone know (Tom?) if this will still work when 7.2 is out? Or are
there changes to the basic server structure and what 'ps' reports?

Tauren

> -----Original Message-----
> From: Nils O. Selåsdal [mailto:noselasd(at)frisurf(dot)no]
> Sent: Wednesday, August 01, 2001 8:01 PM
> To: Tauren Mills; pgsql-general(at)postgresql(dot)org
> Subject: RE: [GENERAL] Finding number of current connections
>
>
> 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

Browse pgsql-general by date

  From Date Subject
Next Message Hiroshi Inoue 2001-08-02 02:26:26 Re: Corrupted tables?
Previous Message Yasuo Ohgaki 2001-08-02 02:13:01 Re: Data Versioning