aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2021-12-19 16:22:12 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2021-12-19 16:22:12 +0000
commit71d2d5adfe18e80e5f8afeb4f86ef69be1aaad81 (patch)
treef927619653e72faba2e22e1eabce2f2ee82c42e6 /usr.bin
parentcb3772639fd0eb74961ff94248d448f5c7f035a9 (diff)
downloadsrc-71d2d5adfe18e80e5f8afeb4f86ef69be1aaad81.tar.gz
src-71d2d5adfe18e80e5f8afeb4f86ef69be1aaad81.zip
tcptw: count how many times a tcptw was actually useful
This will allow a sysadmin to lower net.inet.tcp.msl and see how long tcptw are actually useful.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/netstat/inet.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
index dc777b0be990..b77447575911 100644
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -857,13 +857,23 @@ tcp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
"{N:/Path MTU discovery black hole detection min MSS activation%s}\n");
p(tcps_pmtud_blackhole_failed, "\t{:pmtud-failed/%ju} "
"{N:/Path MTU discovery black hole detection failure%s}\n");
+
+ xo_close_container("pmtud");
+ xo_open_container("tw");
+
+ p(tcps_tw_responds, "\t{:tw_responds/%ju} "
+ "{N:/time%s connection in TIME-WAIT responded with ACK}\n");
+ p(tcps_tw_recycles, "\t{:tw_recycles/%ju} "
+ "{N:/time%s connection in TIME-WAIT was actively recycled}\n");
+ p(tcps_tw_resets, "\t{:tw_resets/%ju} "
+ "{N:/time%s connection in TIME-WAIT responded with RST}\n");
+
+ xo_close_container("tw");
#undef p
#undef p1a
#undef p2
#undef p2a
#undef p3
- xo_close_container("pmtud");
-
xo_open_container("TCP connection count by state");
xo_emit("{T:/TCP connection count by state}:\n");