Date: Wed, 2 Jul 2014 18:50:34 -0500 From: Bryan Venteicher <bryanv@daemoninthecloset.org> To: freebsd-net@freebsd.org Subject: Add netbw option to systat Message-ID: <CAMo0n6QD7tbObfSihfK8Sqgza-Td%2BSmfLubAcLhrBQBKfM5Fjg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--001a11c21fc0e8049204fd3e8e11 Content-Type: text/plain; charset=UTF-8 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 --001a11c21fc0e8049204fd3e8e11 Content-Type: text/x-patch; charset=US-ASCII; name="systat-netbw.patch" Content-Disposition: attachment; filename="systat-netbw.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hx5alovy0 RnJvbSBkMGE0ZjI4MmYzZTM2ZWI1M2NiMGE1MGE2NGFhNDU5N2U1MmI3ZDQyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBCcnlhbiBWZW50ZWljaGVyIDxicnlhbnZAZGFlbW9uaW50aGVj bG9zZXQub3JnPgpEYXRlOiBUdWUsIDEgS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HN0cnVjdCBteXRj cGNiICp0Y3AyKQoreworCWludCByOworCisJLyoKKwkgKiBMb3cgbG9jYWwgb3IgZm9yZWlnbiBw b3J0IGNvbWVzIGZpcnN0IChsb2NhbCBoYXMgcHJpb3JpdHkpLgorCSAqLworCWlmIChudG9ocyh0 Y3AxLT54dGNwLnh0X2lucC5pbnBfaW5jLmluY19pZS5pZV9scG9ydCkgPj0gMTAyNCAmJgorCSAg ICBudG9ocyh0Y3AyLT54dGNwLnh0X2lucC5pbnBfaW5jLmluY19pZS5pZV9scG9ydCkgPj0gMTAy NCkgeworCQlpZiAobnRvaHModGNwMS0+eHRjcC54dF9pbnAuaW5wX2luYy5pbmNfaWUuaWVfZnBv cnQpIDwKKwkJICAgIG50b2hzKHRjcDItPnh0Y3AueHRfaW5wLmlucF9pbmMuaW5jX2llLmllX2Zw b3J0KSkKKwkJCXJldHVybigtMSk7CisJCWlmIChudG9ocyh0Y3AxLT54dGNwLnh0X2lucC5pbnBf aW5jLmluY19pZS5pZV9mcG9ydCkgPgorCQkgICAgbnRvaHModGNwMi0+eHRjcC54dF9pbnAuaW5w X2luYy5pbmNfaWUuaWVfZnBvcnQpKQorCQkJcmV0dXJuKDEpOworCX0KKworCWlmIChudG9ocyh0 Y3AxLT54dGNwLnh0X2lucC5pbnBfaW5jLmluY19pZS5pZV9scG9ydCkgPAorCSAgICBudG9ocyh0 Y3AyLT54dGNwLnh0X2lucC5pbnBfaW5jLmluY19pZS5pZV9scG9ydCkpCisJCXJldHVybigtMSk7 CisJaWYgKG50b2hzKHRjcDEtPnh0Y3AueHRfaW5wLmlucF9pbmMuaW5jX2llLmllX2xwb3J0KSA+ CisJICAgIG50b2hzKHRjcDItPnh0Y3AueHRfaW5wLmlucF9pbmMuaW5jX2llLmllX2xwb3J0KSkK KwkJcmV0dXJuKDEpOworCWlmIChudG9ocyh0Y3AxLT54dGNwLnh0X2lucC5pbnBfaW5jLmluY19p ZS5pZV9mcG9ydCkgPAorCSAgICBudG9ocyh0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