I need to find out what ports are attached to which processes on a Unix machine (HP Itanium). Unfortunately, lsof is not installed and I have no way of installing it.
Does anyone know an alternative method? A fairly lengthy Googling session hasn’t turned up anything.
Assuming this is HP-UX? What about the Ptools – do you have those installed? If so you can use ‘pfiles’ to find the ports in use by the application:
for f in $(ps -ex | awk ‘{print $1}’); do echo $f; pfiles $f | grep PORTNUM; done
switch PORTNUM for the port number. 🙂 may be child pid, but gets you close enough to identify the problem app.