Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 9D7BA9FB1DA for ; Wed, 22 Nov 2006 14:46:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 88681-03 for ; Wed, 22 Nov 2006 14:46:27 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id 09FF19FB1CE for ; Wed, 22 Nov 2006 14:46:26 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so221201ugf for ; Wed, 22 Nov 2006 10:46:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=ATwKJ1Vbed+dSp3wnjNHWv5vuD7Lyk0TRUd/aT1nNpXQjNQbd4vN+OdkNHHYYysjkSaJWJh5EiSSoRqUXphUdBwqNpfWv2UozfWaFCjikMNtld6ufY14k8+SSZtsd/6j4gYrzNyCSLxQ6PQvKAWtebAjtFrWQ7ClbaC7Sosp+Wc= Received: by 10.78.200.3 with SMTP id x3mr8107455huf.1164221182972; Wed, 22 Nov 2006 10:46:22 -0800 (PST) Received: by 10.78.136.6 with HTTP; Wed, 22 Nov 2006 10:46:22 -0800 (PST) Message-ID: Date: Wed, 22 Nov 2006 12:46:22 -0600 From: "Aaron Bono" To: "Tomeh, Husam" Subject: Re: Monitoring PostgreSQL Process Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_62554_2857132.1164221182790" References: X-Google-Sender-Auth: de9de9b188eb9ccd X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/195 X-Sequence-Number: 23722 ------=_Part_62554_2857132.1164221182790 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/22/06, Tomeh, Husam wrote: > > You may query the system view, pg_stat_activity to check out the current > SQL statements running. To track down executed SQL statements into a > physical log file, you may want to enable statement logging. For more > details on that, check out: > http://www.postgresql.org/docs/8.1/static/runtime-config-logging.html > > Once you capture your SQL statement, you can run "explain" on it to check > out its execution plan. > I think capturing the currently running SQL will be enough for now, thanks. It should show me what queries are running the longest and most frequently. -- > Husam > http://firstdba.googlepages.com > > ------------------------------ > *From:* pgsql-admin-owner@postgresql.org [mailto: > pgsql-admin-owner@postgresql.org] *On Behalf Of *Aaron Bono > *Sent:* Tuesday, November 21, 2006 9:50 PM > *To:* pgsql-admin@postgresql.org > *Subject:* [ADMIN] Monitoring PostgreSQL Process > > I have a couple processes/connections to one of our databases that appears > to be eating up most of the CPU and we are trying to determine what these > processes are doing that is taking so much CPU time. > > Is there a way to monitor the SQL being run for a specific > connection/process? > > We are using PostgreSQL 8.1.5 on CentOS Linux. > > Thanks, > Aaron > > -- > ================================================================== > Aaron Bono > Aranya Software Technologies, Inc. > http://www.aranya.com > http://codeelixir.com > ================================================================== > > ********************************************************************** > This message contains confidential information intended only for the use > of the addressee(s) named above and may contain information that is legally > privileged. If you are not the addressee, or the person responsible for > delivering it to the addressee, you are hereby notified that reading, > disseminating, distributing or copying this message is strictly prohibited. > If you have received this message by mistake, please immediately notify us > by replying to the message and delete the original message immediately > thereafter. > > Thank you. > > > FADLD Tag > ********************************************************************** > -- ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_Part_62554_2857132.1164221182790 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/22/06, Tomeh, Husam <htomeh@firstam.com> wrote:
You may query the system view, pg_stat_activity to check out the current SQL statements running. To track down executed SQL statements into a physical log file, you may want to enable statement logging. For more details on that, check out: http://www.postgresql.org/docs/8.1/static/runtime-config-logging.html
 
Once you capture your SQL statement, you can run "explain" on it to check out its execution plan.

I think capturing the currently running SQL will be enough for now, thanks.  It should show me what queries are running the longest and most frequently.

--
  Husam
 

From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Aaron Bono
Sent: Tuesday, November 21, 2006 9:50 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Monitoring PostgreSQL Process

I have a couple processes/connections to one of our databases that appears to be eating up most of the CPU and we are trying to determine what these processes are doing that is taking so much CPU time.

Is there a way to monitor the SQL being run for a specific connection/process?

We are using PostgreSQL 8.1.5 on CentOS Linux.

Thanks,
Aaron

--
==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged.  If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.  If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

                                                                                                                         FADLD Tag
**********************************************************************




--
==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
================================================================== ------=_Part_62554_2857132.1164221182790--