Re: How to identify which query is running - reg.

From: Shanmugasundaram Doraisamy <shan(at)ceedees(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to identify which query is running - reg.
Date: 2004-08-12 04:33:57
Message-ID: 411AF335.7000308@ceedees.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear Richard,
Thankyou for you immediate reply, I did set
the stats_command_string=true and tried select * from pg_stat_activity;
It gave me the desired result. In the mean while you had mentioned
about reading the monitoring activity chapter. Please tell me where I
could find it ( the website address). Thanking you,

Yours sincerely,
Shan.

Richard Huxton wrote:

> Shanmugasundaram Doraisamy wrote:
>
>> Dear Group,
>> We have a java front-end for postgresql 3.4.
>
>
> Hopefully 7.3.4, otherwise upgrade :-)
>
> > When
>
>> we monitor the system usage using top we find couple of postmasters
>> taking up close to 90% of the CPU time in total. I would like to
>> know which are the queries that are currently running at this point
>> of time. How do we do this??
>
>
> Read the "monitoring activity" chapter for full details, but if you
> have statistics gathering turned on try selecting from
> pg_stat_activity. You might also be able to see backend status with ps
> / top set to show the whole command-line.
>
> > Another thing that I have noticed is that when I
>
>> give df -h, I find there is a partition /dev/shm which is somewhere
>> in the range of about 128MB and never used. What is this supposed to
>> be. Is it being not used a good sign or am I loosing on my
>> performance? How do we get it to be used by the database if it will
>> help improve the performance.
>
>
> Almost certainly shared-mem (you don't say what system you're on) and
> it will be used, regardless of what df says - increase the settings in
> your postgresql.conf beyond 128MB and you'll see postgresql fail to
> start.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shanmugasundaram Doraisamy 2004-08-12 05:07:50 Re: How to identify which query is running - reg.
Previous Message Andrew Rawnsley 2004-08-12 04:07:05 Re: Replication options?