Operating System - HP-UX
1820809 Members
4014 Online
109628 Solutions
New Discussion

Re: lsof usage for finding what is using socket

 
Tim Nelson
Honored Contributor

lsof usage for finding what is using socket

I am trying to track down processes that have a listening process on a socket. lsof will report the pid for any process that have an established connection but I am interested in the listening process itself..
e.g. netstat -a shows this:
udp 0 0 *.42501 *.*
I want to know what daemon process is running this.
Any takers ?
lsof -i ip_address:42501 shows nothing.
An lsof -i ip_address:23 would show all the current telnet connections and which pid is using it.
How come it cannot figure out the pid for a listener process ??
1 REPLY 1
Tim Nelson
Honored Contributor

Re: lsof usage for finding what is using socket

Never mind... I found it.. I had the wrong syntax..

lsof -i:42501 ( drop the ip_address )