Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Additional sockstat(1) arguments/functionality

On Sun, 6 Jun 2010 23:28:12 -0400
Chris Ross <> wrote:

>    The short question is, the -P argument allows one to specify one or  
> more protocols to limit the output to.  So, if you are interested in  
> TCP sockets, and not UDP sockets, you can simply specify "-P tcp" on  
> the command-line.  This seems a useful feature to have in our  
> sockstat(1), but I wanted to check with a larger user-base for opinion.
>    I'd be happy to submit a patch to add said functionality unless  
> someone thinks it would be a bad idea.

Our netstat(1) supports both -p for protocol and -f for family, while
sockstat(1) indeed only supports -f for family (and -p seems already
reserved for ports).  If netstat cannot serve your need, I don't
personally see a problem in adding -P, if it's easy enough to add
without breaking existing functionality (or default behaviour without

Considering the popularity FreeBSD has, there might be more software
not directly using sysctl or ioctls and expecting such useful commands
to behave consistently across BSDs.  And according to the man page's
HISTORY, although our implementation is a cleanroom one, it was
inspired from the FreeBSD command of the same name in the netbsd-3
days...  So it makes sense to support -P, IMO.


Home | Main Index | Thread Index | Old Index