Re: pg_stat_activity - proc id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 6, 2013 at 7:38 PM, Rajagopalan, Jayashree
<Jayashree.Rajagopalan@xxxxxxx> 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@xxxxxxxxx


-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux