Skip site navigation (1) Skip section navigation (2)

Re: [SQL] Monitor what command is executing at the backend

From: "George Pavlov" <gpavlov(at)mynewplace(dot)com>
To: "Karthikeyan Sundaram" <skarthi98(at)hotmail(dot)com>,<pgsql-admin(at)postgresql(dot)org>,<pgsql-sql(at)postgresql(dot)org>
Subject: Re: [SQL] Monitor what command is executing at the backend
Date: 2007-03-21 21:56:50
Message-ID: 8C5B026B51B6854CBE88121DBF097A869869D1@ehost010-33.exch010.intermedia.net (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-sql
>    Is there a way to see from the log files on what sql statement is 
> currently by which user?  In other words, I want to monitor 
> the DB activity.

for a current snapshot you don't need the logs, try:

  select * from pg_stat_activity;

(command string needs to be enabled for your database.)

In response to

Responses

pgsql-admin by date

Next:From: Karthikeyan SundaramDate: 2007-03-21 22:16:42
Subject: Re: [SQL] Monitor what command is executing at the backend
Previous:From: Karthikeyan SundaramDate: 2007-03-21 21:49:43
Subject: Monitor what command is executing at the backend

pgsql-sql by date

Next:From: Karthikeyan SundaramDate: 2007-03-21 22:16:42
Subject: Re: [SQL] Monitor what command is executing at the backend
Previous:From: Karthikeyan SundaramDate: 2007-03-21 21:49:43
Subject: Monitor what command is executing at the backend

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group