Howdy,
I have developed the attached patch which extends the functionality of
netstat (via the -x flag) to show us all the socket buffer
statistics. The kernel change counts mbufs, as well as clusters (at
the moment of any size) and gives output like this:
Proto Recv-Q Send-Q Local Address Foreign Address R-MBUF S-MBUF
R-CLUS S-CLUS R-HIWA S-HIWA R-LOWA S-LOWA R-BCNT S-BCNT R-BMAX S-BMAX (state)
tcp4 0 0 127.0.0.1.6010 *.* 0 0
0 0 65536 32768 1 2048 0 0 262144 262144 LISTEN
tcp6 0 0 ::1.6010 *.* 0 0
0 0 65536 32768 1 2048 0 0 262144 262144 LISTEN
tcp4 0 0 172.16.186.130.22 172.16.186.1.53443 0 0
0 0 66608 33304 1 2048 0 0 262144 262144
ESTABLISHED
tcp4 0 0 172.16.186.130.29178 172.16.186.1.22 0 0
0 0 0 0 0 0 0 0 0 0 TIME_WAIT
tcp4 0 0 172.16.186.130.62302 69.147.83.41.22 0 0
0 0 65700 74540 1 2048 0 0 262144 262144
ESTABLISHED
tcp4 0 0 127.0.0.1.62415127.0.0.1.6010 0 0
0 0 0 0 0 0 0 0 0 0 TIME_WAIT
Note you need a very wide screen to read that.
The man page is also updated but the relevant bits are:
The -x flag causes netstat to output all the information recorded about
data stored in the socket buffers. The fields are:
R-MBUFNumber of mbufs in the receive queue.
S-MBUFNumber of mbufs in the send queue.
R-CLUSNumber of clusters, of any type, in the recieve queue.
S-CLUSNumber of clusters, of any type, in the send queue.
R-HIWAReceive buffer high water mark, in bytes.
S-HIWASend buffer high water mark, in bytes.
R-LOWAReceive buffer low water mark, in bytes.
S-LOWASend buffer low water mark, in bytes.
R-BCNTReceive buffer byte count.
S-BCNTSend buffer byte count.
R-BMAXMaximum bytes that can be used in the receive buffer.
S-BMAXMaximum bytes that can be used in the send buffer.
Please email me comments. I'd like to commit this to HEAD soon. It
can't be put into 7 without removing the cluster and mbuf counting,
but I might do that as well if there is interest.
Best,
George
netstat.diff
Description: Binary data
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"