- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to find the process name or process id of ...
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
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
тАО11-30-2009 05:58 AM
тАО11-30-2009 05:58 AM
We can find all opened ports using the command "netstat".
Now i want to know the process name or process id of those opened ports.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2009 06:07 AM
тАО11-30-2009 06:07 AM
Solutionif you have installed "lsof"
see below example:-
take note 80 --> port
# lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
apache2 10437 root 3u IPv6 22890556 TCP *:www (LISTEN)
apache2 10438 www-data 3u IPv6 22890556 TCP *:www (LISTEN)
apache2 10439 www-data 3u IPv6 22890556 TCP *:www (LISTEN)
apache2 10440 www-data 3u IPv6 22890556 TCP *:www (LISTEN)
apache2 10441 www-data 3u IPv6 22890556 TCP *:www (LISTEN)
apache2 10442 www-data 3u IPv6 22890556 TCP *:www (LISTEN)
apache2 25966 www-data 3u IPv6 22890556 TCP *:www (LISTEN)
apache2 25968 www-data 3u IPv6 22890556 TCP *:www (LISTEN)
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2009 06:12 AM
тАО11-30-2009 06:12 AM
Re: How to find the process name or process id of the opened ports
more infromation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2009 06:14 AM
тАО11-30-2009 06:14 AM
Re: How to find the process name or process id of the opened ports
And Lsof utility can be downloaded from:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.82/
Regds..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2009 07:05 AM
тАО11-30-2009 07:05 AM
Re: How to find the process name or process id of the opened ports
I have installed "lsof" and i am able to see the man page also.
but i am not able to run.
Ex:
# lsof -i :22
sh: lsof: not found.
So in which location lsof has been installed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2009 07:26 AM
тАО11-30-2009 07:26 AM
Re: How to find the process name or process id of the opened ports
/usr/local/bin/lsof
you can do
whereis lsof
regards
sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2009 08:51 AM
тАО11-30-2009 08:51 AM
Re: How to find the process name or process id of the opened ports
> So in which location lsof has been
> installed?
If _you_ installed it (using commands which
only _you_ can see), how should any other
non-psychic person know where it went? Or
what your PATH variable is?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2009 08:58 AM
тАО11-30-2009 08:58 AM
Re: How to find the process name or process id of the opened ports
>
# lsof -i :22
sh: lsof: not found.
Being hp-ux admin, at least you should have tried the find command, to find lsof:
# find / -name lsof -print
And_it_will tell_you_the_answer.
- Btw : with netstat to see the wait , open and established connections, use:
# netstat -n
# to see all established connections:
# netstat -n | grep EST
Hth,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2009 09:10 AM
тАО11-30-2009 09:10 AM
Re: How to find the process name or process id of the opened ports
> I have installed "lsof" and i am able to see the man page also. but i am not able to run
Software from the HP-UX Porting Centre is installed in '/usr/local/bin'. This directory is (by default) not in root't PATH so you won't be able to simply run 'lsof' by typing 'lsof' at the prompt.
You can use an absolute path to run ('/usr/local/bin/lsof' or add '/usr/local/bin' to your PATH.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2009 05:46 AM
тАО12-01-2009 05:46 AM