[svlug] What's Linux's 'sockstat'?

svlug@gory.org svlug at gory.org
Tue May 28 21:33:04 PDT 2002


In FreeBSD, there's a command called sockstat that lists all sorts of
interesting info.  For example:

USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
root     sshd     91182    4 tcp4   192.168.1.28:22 	  10.1.17.117:2874
root     sshd     91168    4 tcp4   192.168.1.28:22  	  10.3.11.101:2947
root     sshd     90505    4 tcp4   192.168.1.28:22 	  10.3.11.101:2872
root     ssh      90408    3 tcp4   192.168.1.83:751 	  192.168.1.19:22
root     snort    90386    8 tcp4   127.0.0.1:3779        127.0.0.1:3306
root     perl     90379    3 tcp4   127.0.0.1:3814        127.0.0.1:3306
root     sshd     89980    4 tcp4   192.168.1.28:22  	  10.1.17.117:2631
root     sshd     89936    4 tcp4   192.168.1.28:22       10.1.17.117:2628
root     sshd     72733    4 tcp4   192.168.1.28:22 	  10.1.17.117:2892
www      httpd    31730    6 tcp4   127.0.0.1:2617        127.0.0.1:3306
www      httpd    31730    7 tcp4   127.0.0.1:3760        127.0.0.1:3306
www      httpd    31730    9 tcp4   127.0.0.1:3807        127.0.0.1:3306
www      httpd    31730   11 tcp4   127.0.0.1:4133        127.0.0.1:3306
www      httpd    31730   12 tcp4   127.0.0.1:4197        127.0.0.1:3306
www      httpd    31730   14 tcp4   127.0.0.1:4896        127.0.0.1:3306
www      httpd    31730   26 tcp4   *:443                 *:*
www      httpd    31730   27 tcp4   *:80                  *:*

Is there a method to acquire similar info in linux?

Thanks in advance,

-Charlie
-- 
GPG Key fingerprint = 4F36 EC4F 2F2C 5F59 9690  09E5 4C0F 9DB0 8623 53CE
I'd never join any club that would have the likes of me as a member.
		-- Groucho Marx



More information about the svlug mailing list