X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E366E53B9B for ; Mon, 2 May 2005 20:23:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22922-10 for ; Mon, 2 May 2005 23:23:30 +0000 (GMT) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by svr1.postgresql.org (Postfix) with ESMTP id 54D6553B8A for ; Mon, 2 May 2005 20:23:27 -0300 (ADT) Received: (qmail 6399 invoked from network); 2 May 2005 23:23:30 -0000 Received: from dsl093-038-250.pdx1.dsl.speakeasy.net (HELO [192.168.1.21]) (davidw@[66.93.38.250]) (envelope-sender ) by mail28.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 2 May 2005 23:23:30 -0000 In-Reply-To: <42740256.4090200@streppone.it> References: <42740256.4090200@streppone.it> Mime-Version: 1.0 (Apple Message framework v728) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <066EC6F2-CB44-44E9-AE40-6969D3851F8C@kineticode.com> Cc: pgsql-sql@postgresql.org, Pg list Content-Transfer-Encoding: 7bit From: David Wheeler Subject: Re: [Dbdpg-general] [ANNOUNCE] pgtop, display PostgreSQL processes in `top' style Date: Mon, 2 May 2005 16:23:29 -0700 To: Cosimo Streppone X-Mailer: Apple Mail (2.728) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/72 X-Sequence-Number: 21385 On Apr 30, 2005, at 15:10 , Cosimo Streppone wrote: > 1) is it possible to know Pg backend uptime with > SQL queries? Or must I look at postmaster.pid file? > or even something else? I think that the PID file is your best bet. > 2) how can I know the ip addresses/hostnames of clients > connecting to server? I believe that that information is in pg_stat_activity. See: http://www.postgresql.org/docs/current/static/monitoring.html > 3) Is there a way to know the number of queries performed > against Pg backend (by each client)? Can I distinguish > between selects / updates / inserts / copy / ... ? I think so, but you have to enable some postgresql.conf settings to get that information logged. http://www.postgresql.org/docs/8.0/static/runtime-config.html Regards, David