- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Map TCP port to pid
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
01-21-2005 05:32 AM
01-21-2005 05:32 AM
Map TCP port to pid
For instance, ethereal gives me the source/destination ip addresses plus the source port number and destination port number. The destination port is 23 (telnet) and the source port is 1058. I did a netstat -an and looked for 1058 and found one line that said a connection is established, but it didn't include the pid. I tried lsof and looked for inet connections but nothing comes close to 1058.
Any ideas?
thanks in advance
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 05:43 AM
01-21-2005 05:43 AM
Re: Map TCP port to pid
http://hpux.ee.ualberta.ca/hppd/hpux/Sysadmin/lsof-4.73/
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 05:46 AM
01-21-2005 05:46 AM
Re: Map TCP port to pid
I'm surprised lsof didn't see the connection. You said you ran it for inet connections. What command line did you use for lsof?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 05:48 AM
01-21-2005 05:48 AM
Re: Map TCP port to pid
pegasus opt # lsof | grep TCP | grep GR
uvsh 10081 GR43 6u inet 0x4ca0ce00 0t0 TCP *:54285 (IDLE)
Most of the port numbers are in the 50000 range.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 05:56 AM
01-21-2005 05:56 AM
Re: Map TCP port to pid
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 06:13 AM
01-21-2005 06:13 AM
Re: Map TCP port to pid
I poked around on Google and the only software I could see that lays claim to port 1058 is 'nim', which stands for Network Information Management and runs on AIX.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 07:17 AM
01-21-2005 07:17 AM
Re: Map TCP port to pid
We are getting lag times up to a minute on the barcode readers and I was trying to use ethereal to monitor the connections, but I need to tie the frozen barcode reader back to a process.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 07:29 AM
01-21-2005 07:29 AM
Re: Map TCP port to pid
try this:
lsof -nP | grep 1058
I telnet'd from my M$:pc (with ethereal on it) to a unix box and my source port from my pc=1468 with dest on my unix box=23, and lsof shows:
[root@vpart1 /opt/patches]# lsof -nP | grep 1468
telnetd 25986 root 0u inet 0x5c4f66c0 0t0 TCP 10.2.109.29:23->10.2.181.64:1468 (ESTABLISHED)
telnetd 25986 root 1u inet 0x5c4f66c0 0t0 TCP 10.2.109.29:23->10.2.181.64:1468 (ESTABLISHED)
telnetd 25986 root 2u inet 0x5c4f66c0 0t0 TCP 10.2.109.29:23->10.2.181.64:1468 (ESTABLISHED)
[root@vpart1 /opt/patches]#
the -P says no port names and the -n says no host names.
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 07:35 AM
01-21-2005 07:35 AM
Re: Map TCP port to pid
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 08:41 AM
01-21-2005 08:41 AM
Re: Map TCP port to pid
All my telnetd sessions look like this-
telnetd 2286 root 0u inet 0x5b9bccc0 0t0 TCP (ESTABLISHED)
Says its a TCP, but no details.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 08:43 AM
01-21-2005 08:43 AM
Re: Map TCP port to pid
I have a couple dozen of these handhelds connected to my HPUX. I can see the pid for all these, but I can't tie it back to the TCP port connection.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 09:15 AM
01-21-2005 09:15 AM
Re: Map TCP port to pid
Looking at the overall problem, I'd suggest taking a look at the wireless access. If you were having network issues with your HP-UX system you would have lots of other things running slow also. Maybe somebody hooked up a device that is conflicting with the wireless part (another wireless hub, a cordless phone, etc.), or maybe the wireless hub that the Intermec connects to is having problems.
We have Intermec wireless handheld devices running in our remote locations, and one of our guys told me yesterday that they are having issues at one site, so this is an interesting problem for me.
Good luck!
JP