Wednesday, October 20, 2010

lsof: Use lsof to Find PID on Port

No need for large scripts to find process ID with Port. If you have the lsof binary available in your system including tr, you can easily find the process ID using the UDP or TCP socket. 
In this example will will locate the process ID using the TCP 1080 port.


 # lsof -i tcp:1080 -Fp | tr -d p






  

No comments:

Post a Comment