- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Command to kill a port running on a particular net...
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
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
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-15-2007 07:06 AM
тАО09-15-2007 07:06 AM
I have a process not showing up by various options of ps command. I saw it is listening on a particular port by "netstat an|grep i- listen" command. This listening port prevent the process while starting.
I was able to get the pid of the process few months ago on a different system using lsof and killed it.
I am facing similar situation on a machine where lsof is not installed.
Is there any way to execute lsof running on a different host ?
We have ssh running on both the machines. I tried couple of quick option but could not invoke lsof from different host.
Appreciate if anyone can provide correct syntax ?
Is there any command on Unix to kill a port running on a particular network IP interace ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2007 08:38 AM
тАО09-15-2007 08:38 AM
SolutionThe installation of 'lsof' doesn't require a reboot, so why not download and install it on the machine missing it? It is one of those tools that every server should have. Finding the pid of a process associated with a port virtually requires 'lsof'.
http://hpux.connect.org.uk/hppd/cgi-bin/search?package=on&description=on&term=lsof
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2007 09:32 AM
тАО09-15-2007 09:32 AM
Re: Command to kill a port running on a particular network interface
lsof must be installed on the system you are trying to kill the process on. System A can't get process table information on system B unless it remotely logs in.
Why not do this:
netstat -an | grep ":portnumber"
netstat -an | grep ":2504"
Then use that information to identify the process. You might not even need lsof to do it.
SEP
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
тАО09-15-2007 12:57 PM
тАО09-15-2007 12:57 PM
Re: Command to kill a port running on a particular network interface
I do not have root access to that box. Can i install lsof with normal user account ?
Secondly, if i get the port number with netstat then which command will help in associating with port number ? I mean how do I trace the PID if port is known ?
Thanks and best regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2007 03:18 PM
тАО09-15-2007 03:18 PM
Re: Command to kill a port running on a particular network interface
This is just about impossible. Possibly for zombies. I suppose netstat could be reporting stale data?
>Can I install lsof with normal user account?
I wouldn't think so, it may use root to get the info it needs.
>I mean how do I trace the PID if port is known?
Searching ITRC for lsof and port gives:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=112311
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1139542
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=37108
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1102052