[pgpool-general: 7136] Re: how to find the query that is generating a high load

Giancarlo Celli giancarlo.celli at flottaweb.com
Wed Jul 8 20:00:32 JST 2020


Hi,


>Hello,
>
>On Tue, 07 Jul 2020 13:01:00 +0000
>"Giancarlo Celli" <giancarlo.celli at flottaweb.com> wrote:
>
>>  Hi,
>>  generally, using the top command, to see which connection to the db is
>>  causing a high load, just take the pid inside the brackets and make a
>>  fuser in the following way:
>>
>>  String of top command:    postgres: postgres dbname192.168.0.12(59864)
>>
>>  Command to see shell PID of process:   fuser 59864/tcp and I will see
>>  PID of process.
>>
>>  With pgpool, however, this type of search does not work and the fuser
>>  command does not show any process.
>>  Is there any way to understand which query corresponds to that pid
>>  59864?
>
>You want to display the PID of client command?
>I tried the following command and I think "6736" is the PID which you want to display, right?
>
>=================
>$ fuser 58194/tcp
>58194/tcp:            6736
>
>$ ps -ef | grep psql
>pengbo    6736  9049  0 22:19 pts/8    00:00:00 psql -h 192.168.154.7 -p 11000 -U pengbo postgres
>=================
>
It works like this on servers without pgpool, but in my case the fuser 
command returns nothing on either server with pgpool and postgres
Why?


>
>>  Best regards.
>>
>>  Giancarlo
>
>
>--
>Bo Peng <pengbo at sraoss.co.jp>
>SRA OSS, Inc. Japan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20200708/c59832ec/attachment.html>


More information about the pgpool-general mailing list