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.62415 127.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-MBUF Number of mbufs in the receive queue.
S-MBUF Number of mbufs in the send queue.
R-CLUS Number of clusters, of any type, in the recieve queue.
S-CLUS Number of clusters, of any type, in the send queue.
R-HIWA Receive buffer high water mark, in bytes.
S-HIWA Send buffer high water mark, in bytes.
R-LOWA Receive buffer low water mark, in bytes.
S-LOWA Send buffer low water mark, in bytes.
R-BCNT Receive buffer byte count.
S-BCNT Send buffer byte count.
R-BMAX Maximum bytes that can be used in the receive buffer.
S-BMAX Maximum 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
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Andrew Morton | Re: 2.6.20-rc6-mm3 |
| Pierre Ossman | Re: [RFC][PATCH] cpuidle: avoid singing capacitors |
git: | |
| Johannes Schindelin | Re: rc4 - make quick-install-doc is broken |
| Johannes Schindelin | Re: Git benchmarks at OpenOffice.org wiki |
| Shawn O. Pearce | Re: Smart fetch via HTTP? |
| Ken Pratt | pack operation is thrashing my server |
| Chris | avoid logging useless ssh brute force attempts |
| Henning Brauer | Re: httpdv6 |
| Freddy DISSAUX | Re: acer aspire one dmesg? |
| stuartv | Re: Microsoft gets the Most Secure Operating Systems award |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Stephen Pierce | SLS |
| Doug Evans | Re: Stabilizing Linux |
| Les Andrzejewski | X386/WD90C31/SUMSUNG SYNC MASTER 4 |
