- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can I know the relation of port number and pro...
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
07-29-2004 02:32 PM
07-29-2004 02:32 PM
How can I know the relation of port number and process?
I want to know what process occupy the port number 8010, and I want to kill the process to release the port number "8010".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 02:44 PM
07-29-2004 02:44 PM
Re: How can I know the relation of port number and process?
The best you can do is look at /etc/services
That file is like a reservation system and might get you enough information to move forward.
SEP
SIT
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 03:49 PM
07-29-2004 03:49 PM
Re: How can I know the relation of port number and process?
The netstat command is not great for providing info on what processes are tied to the port.
The 'lsof' command is much better and will give you the info you need:
# lsof -i :8010
You need to download lsof from:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.71/
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 05:25 PM
07-29-2004 05:25 PM
Re: How can I know the relation of port number and process?
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.71/
I use this exactly for the same purpose. Killing processes according to openned port.
than you can make script to automate this procedure.
process=`lsof -n|grep 8010|awk '{ print $2 }'`
for proc in $process
do
#echo $proc
kill $proc
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2004 03:11 PM
07-30-2004 03:11 PM
Re: How can I know the relation of port number and process?
the suggestions about lsof are the way to go.
now, if netstat shows no connection in LISTEN state on that port number and the problem to be solved is the startup of a server application, then the server application is broken because it isn't setting SO_REUSEADDR before trying to bind to its well-known port number. lsof and process killing would only be a kludge in such a case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2004 03:42 PM
07-30-2004 03:42 PM
Re: How can I know the relation of port number and process?
as a measure of testing what ports can be opened on your server, and using LSOF (great tool, BTW). you also can do the following test:
on a client system window:
telnet
on the server:
netstat -an | grep
lsof |grep
try: telnet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2004 06:22 PM
07-30-2004 06:22 PM
Re: How can I know the relation of port number and process?
for proce in $load_proce
do
kill $load_proce
done
It shall kill the processes that r using the port 8010. lsof -i is the best option to list the applications.
-Saravanan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2004 06:53 PM
07-30-2004 06:53 PM
Re: How can I know the relation of port number and process?
I have looked into /etc/servies and port 8010 is Unassigned
# 8023-8031 Unassigned
for relation between process and port use netstat or lsof as was mentioned above
br Jan