It’d be nice to have FreeBSD’s sockstat in Linux

So I’ve been operating FreeBSD servers for about a year now where I work. I’ve come to really like the sockstat command in FreeBSD

# sockstat -l -4

will list every ipv4 address listening in some port and which user the process that is listening to that port is.

In Linux I’ve usually done the same with

# netstat -taupen

netstat -taupen isn’t as ‘clean’ as sockstat in FreeBSD, but I see that

# netstat -tln

give me less info, and I think I’d prefer that one when I simply need to check which ports are in a LISTENING state ( and add -u to show udp as well )

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>