Date: Wed, 2 Jul 2014 17:54:41 -0700 From: hiren panchasara <hiren.panchasara@gmail.com> To: Bryan Venteicher <bryanv@daemoninthecloset.org> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: Add netbw option to systat Message-ID: <CALCpEUEj6Nc4tVWQ0G_KF4pGTUndbBsgZnMRZWybipiQPWYpUQ@mail.gmail.com> In-Reply-To: <CAMo0n6QD7tbObfSihfK8Sqgza-Td%2BSmfLubAcLhrBQBKfM5Fjg@mail.gmail.com> References: <CAMo0n6QD7tbObfSihfK8Sqgza-Td%2BSmfLubAcLhrBQBKfM5Fjg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 2, 2014 at 4:50 PM, Bryan Venteicher <bryanv@daemoninthecloset.org> wrote: > Awhile back, DragonlyFlyBSD added a netbw option to systat that I've ported > to FreeBSD and found handy at various times: > > netbw Display aggregate and per-connection TCP receive and transmit > rates. Only active TCP connections are shown. > > Leading to output such as: > > tcp accepts connects rcv 1.192G snd 15.77K rexmit > > 192.168.10.80:22 192.168.10.20:23103 rcv snd 415.7 [ NTSX ] > 192.168.10.80:22 192.168.10.20:46560 rcv 19.80M snd 14.47K [ NTSX ] > 192.168.10.80:22 192.168.10.20:60699 rcv snd 886.3 [ NTSX ] > 192.168.10.81:5201 192.168.10.51:60844 rcv 293.2M snd [R TSX ] > 192.168.10.81:5201 192.168.10.51:60845 rcv 293.5M snd [R TSX ] > 192.168.10.81:5201 192.168.10.51:60846 rcv 293.2M snd [R TSX ] > 192.168.10.81:5201 192.168.10.51:60847 rcv 292.9M snd [R TSX ] > > It uses the sequences number from the 'struct tcpcb' to derive the rates, > which is usually good but certainly not perfect (i.e., don't set the > interval too long). > > I'd like to commit this if anybody else thinks they'd find it useful. > > http://people.freebsd.org/~bryanv/patches/systat-netbw.patch I like the idea. A few things about the patch: 1) You may want to remove the code hidden behind "#if 0" at 2 places. 2) I am not entirely clear on why/if we need the last column with flags but if we keep it (for compatibility of any other reason), It would be nice to have those flags explained in the manpage: + mvwprintw(wnd, LINES-2, 0, + "Rate/sec, " + "R=rxpend T=txpend N=nodelay T=tstmp " + "S=sack X=winscale F=fastrec"); 3) I feel that the header line for o/p (specially 'tcp accepts and connects' terminology) can be improved but I do not have a better suggestion :-) It looks okay me otherwise and thanks for your work. cheers, Hiren
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUEj6Nc4tVWQ0G_KF4pGTUndbBsgZnMRZWybipiQPWYpUQ>