Re: pg_stat_activity - proc id - Mailing list pgsql-admin

From Sergey Konoplev
Subject Re: pg_stat_activity - proc id
Date
Msg-id CAL_0b1tv+oBK+z-D0vDc49_Lmg4QsK3YdpASBeGGxCnP25UbiQ@mail.gmail.com
Whole thread Raw
In response to pg_stat_activity - proc id  ("Rajagopalan, Jayashree" <Jayashree.Rajagopalan@emc.com>)
List pgsql-admin
On Sun, Oct 6, 2013 at 7:38 PM, Rajagopalan, Jayashree
<Jayashree.Rajagopalan@emc.com> wrote:
> How to correlate the procpid in pg_stat activity table to any application
> process? I need to track down some connections to the queries/application
> threads. Please help!!

Note down the client_port from pg_stat_activity and run:

netstat -pnao | grep <client_port>

It should give you two lines one of which is the opposite side of the
connection. Look at the next to last column.

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com


pgsql-admin by date:

Previous
From: "Rajagopalan, Jayashree"
Date:
Subject: pg_stat_activity - proc id
Next
From: Jov
Date:
Subject: Re: pg_stat_activity - proc id