- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to find which process owns a TCP port
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 03:26 AM
03-16-2017 03:26 AM
How to find which process owns a TCP port
Hi All,
Could you please let me know how can I find which process is listening on given TCP port number?
If I run the command "netstat -na |grep <port number>" hen it showing that some process is listening but it is not showing who is listening.
example out put :
bash-4.3$ netstat -an |grep 2000
tcp 0 0 127.0.0.1.2000 *.* LISTEN
bash-4.3$
In the above example it is not clear which process is listening on TCP port 2000. Could you please let me know how can I find it?
Thanks,
Masthan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 03:50 AM
03-16-2017 03:50 AM
Re: How to find which process owns a TCP port
You don't tell your OS.
However, try
lsof -i :80
Port 80, for example.
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 08:00 AM
03-16-2017 08:00 AM
Re: How to find which process owns a TCP port
my appology, my os is HPUX 11.31.
Can't we get the same info using netstat command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 11:36 AM
03-16-2017 11:36 AM
Re: How to find which process owns a TCP port
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 04:20 PM
03-16-2017 04:20 PM
Re: How to find which process owns a TCP port
netstat does not track down the process(es) that have a port open.
lsof is a required tool for any sysadmin as it not only tracks port usage, it tracks open files and directories.
HP-UX provides fuser for open files but is not very complete at tracking usage.
Bill Hassell, sysadmin