Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We've tried lsof and tcpdump to capture the PID of a process that is attempting to make connections. Any ideas?

share|improve this question

migrated from Mar 19 '10 at 21:59

This question came from our site for professional and enthusiast programmers.

netstat -a -p will not work in hp-ux. The -p argument, is to filter by protocol, UDP, TCP, ICMP.. (view man page). In netstat linux versions is true that show the pid.

lsof not work for you? install lsof from depot,

and run,

# lsof -i -sTCP:LISTEN

share|improve this answer

There is no "-p" option for processes in HPUX netstat command. I always have lsof installed on each server for tasks like this.

You can download it from Hpux connect

Once installed, you can easy see wich process is listen in a given port:

lsof -i :portnumber
share|improve this answer

It's been a while since I used hpux

Can you run a similar command to

netstat -a -p

to show tcp sockets back to processes?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.