I have a fast question. I want to know what is the losf -i
equivalent command in a Solaris system.
I only want to show the files with network connection.
Thank you!!
I have a fast question. I want to know what is the losf -i
equivalent command in a Solaris system.
I only want to show the files with network connection.
Thank you!!
As of Solaris 11.2 this type of information is now available directly in the netstat command (
-u
option) so you don't have to use thepfiles
hack for the purpose or use thelsof
tool. Personally I've always wondered by this information could not be part of thenetstat
output so glad to see that'll finally be the case.There's a nice blog from Oracle on the topic.
(caveat: at the time of writing v11.2 is in beta but fully disclosed as to the contents / new features)
you can try pfiles,fuser. you can install lsof on solaris.
http://andriigrytsenko.net/2010/08/lsof-installation-on-solaris-10/
Here is a shell script that list all processes having open TCP or UDP ports on Solaris, you can limit it to a given port number by passing it as an argument:
Note: As documented in the warning section of the
pfiles
manual page, it is not recommended to run this command on a heavily loaded production system with a time sensitive process running as deadlocks or crashes might happen.