- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to find the process that used a TCP/UDP po...
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
Forums
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
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
09-19-2001 11:43 PM
09-19-2001 11:43 PM
Do you know how to find the process that used a TCP/UDP port?
E.g.
# netstat -a -n
...
UDP
...
*.161 Idle
How to find the process that used the 161 port?
Thanks for your attention!
/Listener
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 12:09 AM
09-20-2001 12:09 AM
Re: How to find the process that used a TCP/UDP port?
see attached.
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 12:25 AM
09-20-2001 12:25 AM
Re: How to find the process that used a TCP/UDP port?
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 10:03 AM
09-20-2001 10:03 AM
Re: How to find the process that used a TCP/UDP port?
also, on 11.0 netstat -an shows nothing along the lines of "IDLE" or other states for a UDP endpoint. i don't see it in netstat -an output for 10.20 either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 10:14 AM
09-20-2001 10:14 AM
Re: How to find the process that used a TCP/UDP port?
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 10:24 AM
09-20-2001 10:24 AM
Re: How to find the process that used a TCP/UDP port?
There is a cool utily available called "SAINT".
It is very helpful to scan the ports. Try it. You can find it at http://hpux.connect.org.uk.
Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 03:04 PM
09-20-2001 03:04 PM
Re: How to find the process that used a TCP/UDP port?
#!/bin/sh
for pid in `ps -ef|grep -v UID|awk '{ print $2 }'| sort -rn`; do
/usr/sbin/lsof -p $pid|grep LISTEN
done
It was given to me on here. This should work for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 10:02 PM
09-20-2001 10:02 PM
Re: How to find the process that used a TCP/UDP port?
Try this command...
#rpcinfo -p | grep tcp
Checkout the man pages of rpcinfo.
Hope this helps,
Cheers !!!
Mathew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2001 05:22 PM
09-22-2001 05:22 PM
SolutionBill's answer is the easiest to use (and you should have
"lsof" on your systems anyway), for a simple
lsof -i udp:161
would tell you, which process is using that port.
Then, UDP:161 is reserved for SNMP (Simple Network
Management Protocol), so I guess your process is the
SNMP agent (snmpd)...
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2001 06:34 PM
09-22-2001 06:34 PM
Re: How to find the process that used a TCP/UDP port?
Thank you very much, everybody!
The answer is just as Wodisch said: the 161 port is used by the snmp service. We can find the definition in /etc/services (only for HPUX, Solaris 2.6/2.8 haven't).
Anyway, I am very glad to have knowed more useful methods(lsof, saint, rpcinfo, etc), especially the famous 'lsof' that I knowed a year ago.
Thanks again, friends!
/Listener