| From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
|---|---|
| To: | Onyx <omueller(at)i3(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Connections to DB |
| Date: | 2005-10-27 17:37:36 |
| Message-ID: | 20051027173736.GG63747@pervasive.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
SELECT * FROM pg_stat_activity;
Note that if you turn on stats_command_string you'll also be able to see
what each connection is doing if you're connected as a superuser.
On Thu, Oct 27, 2005 at 11:21:26AM -0600, Onyx wrote:
> How can I view the current, persistent connections to a database? Is there
> a way to do this with 'psql' or with some other PostgreSQL bundled
> tool/utility (~pgsql_directory/bin), instead of resorting to the underlying
> operating system commands (ie: netstat -a | grep postgres)?
>
> I am interested in finding out the following: 1) How many connections are
> there to the database? 2) How long have they persisted? 3) What is the
> idle time of the connections?
>
> Any help would be appreciated. Thanks!
>
>
> - Onyx
> ---
> Onyx Mueller
> Software Engineer
> i-cubed : information integration & imaging LLC
> 201 Linden Street : Third Floor
> Fort Collins, CO 80524
> 970-482-4400 voice
> 970-482-4499 fax
> www.i3.com
>
>
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Murphy | 2005-10-27 18:23:36 | aix build question re: duplicate symbol warning |
| Previous Message | Onyx | 2005-10-27 17:21:26 | Connections to DB |