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@xxxxxxxxxxxxx Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings