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

Bo Peng pengbo at sraoss.co.jp
Tue Jul 7 22:25:21 JST 2020


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
=================

> Best regards.
> 
> Giancarlo


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan


More information about the pgpool-general mailing list