Operating System - HP-UX
1833873 Members
1690 Online
110063 Solutions
New Discussion

Re: What process bound to what port?

 
SOLVED
Go to solution
Charles Wurts
New Member

What process bound to what port?

Hey folks,

How can you tell what process is listening on what tcp/ip port. For example when you look at a netstat -an as below, how can you tell what process is doing the listening.

netstat -an | grep -i listen
tcp 0 0 *.49619 *.* LISTEN
tcp 0 0 *.10864 *.* LISTEN

Is this easy to figure out?

Thanks
-Chuck
4 REPLIES 4
Torsten.
Acclaimed Contributor
Solution

Re: What process bound to what port?

Best tool for questions like this is "lsof":

http://hpux.asknet.de/hppd/hpux/Sysadmin/lsof-4.78/

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Tim Nelson
Honored Contributor

Re: What process bound to what port?

lsof is the way..

/usr/local/bin/lsof -i :23
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
inetd 1039 root 6u IPv6 0xe00000013c0e6580 0t0 TCP *:telnet (LISTEN)


Charles Wurts
New Member

Re: What process bound to what port?

Yep - downloaded lsof and it works like a champ.

Thanks for help!

-Chuck
Charles Wurts
New Member

Re: What process bound to what port?

Worked