Hello,
One of our developers is asking for a command/script in Solaris similar to "netstat -anp" in Linux. He gave this output as an example:
root@xxx:~# netstat -anp | grep LISTEN
tcp 0 0 0.0.0.0:7937 0.0.0.0:* LISTEN 16082/nsrexecd
tcp 0 0 0.0.0.0:7938 0.0.0.0:* LISTEN 16082/nsrexecd
tcp 0 0 0.0.0.0:7940 0.0.0.0:* LISTEN 16082/nsrexecd
tcp 0 0 0.0.0.0:7941 0.0.0.0:* LISTEN 16082/nsrexecd
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 4257/mysqld
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 4331/postgres
tcp6 0 0 :::80 :::* LISTEN 4403/apache2
tcp6 0 0 :::22 :::* LISTEN 4163/sshd
Note, the command needs to be used on a Solaris 9 machine (no dtrace). I've been playing around with pfiles for an hour or so now and haven't come up with anything that seems 100% correct.
So I was wondering if you guys have any ideas on how to do this. I don't need a ready-made script (unless you have it), just some pointers to how I can produce a similar output.
Thanks.