From: | adey <adey11(at)gmail(dot)com> |
---|---|
To: | "Aaron Bono" <postgresql(at)aranya(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Monitoring PostgreSQL Process |
Date: | 2006-11-23 00:02:13 |
Message-ID: | 1c66bda80611221602w4a2766a1l3dff7b05eedac574@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
The following query with the stats_command_string parameter turned on will
give you some of the SQL per transaction:-
SELECT
datid,
datname as "DB Name",
substr(procpid,1,6) as "Procpid",
substr(usesysid,1,5) as "UseSysid",
usename,
current_query as "SQL",
query_start
FROM
pg_stat_activity
order by
procpid;
On 11/22/06, Aaron Bono <postgresql(at)aranya(dot)com> wrote:
>
> 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
> ==================================================================
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Lambert, Help Desk Team Leader, BSD, Infomedia Ltd | 2006-11-23 01:49:29 | PGSQL manager password lost. |
Previous Message | Aaron Bono | 2006-11-22 22:12:08 | Re: Monitoring PostgreSQL Process |