X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DA250D1B7D1 for ; Fri, 25 Jun 2004 17:51:30 -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 05002-03 for ; Fri, 25 Jun 2004 20:51:23 +0000 (GMT) Received: from mx.noos.fr (pm-mx4.mgn.net [195.46.220.210]) by svr1.postgresql.org (Postfix) with ESMTP id 5BC74D1B18E for ; Fri, 25 Jun 2004 17:51:19 -0300 (ADT) Received: from noos.fr (pm-mnet3.mgn.net [195.46.220.218]) by mx.noos.fr (Postfix) with SMTP id AB74627821; Fri, 25 Jun 2004 22:51:10 +0200 (MEST) X-Mailbox-Line: From footcow@noos.fr Fri Jun 25 22:51:10 2004 Received: from e115.dhcp212-198-145.noos.fr (e115.dhcp212-198-145.noos.fr [212.198.145.115]) by pm-mnet3.mgn.net with ESMTP; Fri, 25 Jun 2004 22:51:10 (MEST) From: =?iso-8859-15?q?Herv=E9_Piedvache?= To: pgsql-performance@postgresql.org, pam@pmg.xs4all.nl Subject: Re: How can one see what queries are running withing a postgres instance? Date: Fri, 25 Jun 2004 22:51:09 +0200 User-Agent: KMail/1.6.2 References: <1088192269.6490.3.camel@localhost> In-Reply-To: <1088192269.6490.3.camel@localhost> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <200406252251.09228.footcow@noos.fr> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200406/257 X-Sequence-Number: 7315 Let see in contrib/ the application pg_who ... you will see the process, th= e=20 queries, and the CPU ... ;o) Regards, Le vendredi 25 Juin 2004 21:37, P.A.M. van Dam a =E9crit : > Hi! > > I'd like to know if there is a way to see what queries are running > within a certain postgres instance and how much resources (cpu/memory) > etc. they are using. Right now it's impossible to see what is happening > within postgres when it's binaries are using 100% CPU. > > In Sybase there is a command which let's you view what 'processes' are > running within the server and how much cpu (according to Sybase) they > are using. It also provides you with a stored procedure to kill off some > bad behaving queries. How can one do this within postgres? > > Thanks in advance! > > Best regards, > > Pascal > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster --=20 Bill Footcow