LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   netstat and pid number (https://www.linuxquestions.org/questions/%2Absd-17/netstat-and-pid-number-561826/)

avallach 06-14-2007 12:19 PM

netstat and pid number
 
Hello.
I'm new OpenBSD user. Previously I used linux... and I wonder how to force netstat to display which program/pid is using the port/socket in Linux I user -p parameter but it doesn't work in OpenBSD...

MensaWater 06-15-2007 11:04 AM

Have a look at this thread that talks about NetBSD.
http://www.linuxquestions.org/questi...d.php?t=550915

If OpenBSD doesn't have the option described for NetBSD you can always use "lsof -p <PID>" to get information for a specific PID or "lsof -i :<port>" to find out which process is using the port you specified.

MensaWater 06-15-2007 11:07 AM

Never mind - posted this one to the wrong thread - the above was the right one.

avallach 06-16-2007 02:41 AM

Thanks a lot. Couldn't find lsof before because it is not installed by default..


All times are GMT -5. The time now is 07:09 AM.