- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Another bit of scripting help needed
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
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
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-08-2003 03:29 AM
07-08-2003 03:29 AM
I have a few processes, all bases on the same exe, but started with different options.
All these processes start by listening on a TCP/IP port that I configure.
Now I want to find out which process is listening on what port.
With "ps -ef" I can't see the "port" option, because the command line is too long. I see all the same processes.
With "netstat -a" I can see someone is listening on those ports, but I cannot see the process that is doing it.
Can anyone of you help me to connect a listening TCP/IP-port to a process ID ?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 03:33 AM
07-08-2003 03:33 AM
Re: Another bit of scripting help needed
cd /very/long/path ; ./program -options -moreOptions
The program you need to connect ports to processes is called lsof. Get a copy from: http://hpux.connect.org.uk/
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 03:37 AM
07-08-2003 03:37 AM
Re: Another bit of scripting help needed
I think lsof should be able to do the trick. Lsof also lists the PID of process which has a certain connection open. It might be possible that you have to install it. I believe it is nog included in the standard hp-ux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 04:23 AM
07-08-2003 04:23 AM
Re: Another bit of scripting help needed
lsof -i
will list all processes with open tcp or udp ports.
lsof -i:80
will list all processes connected or listening on port 80.
The full syntax woudd be
lsof -i [proto][@host|addr][:svc_list|port_list]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 04:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 04:33 AM
07-08-2003 04:33 AM
Re: Another bit of scripting help needed
OR, my favorite utility
glance, then do "F" & select process ID
Tim