Created attachment 150936 [details] patch for netstat/inet.c There is counters in kernel updated when RTT, RRTvar and SS threshold usaed from tcp hostcache. But this counters is not shown by any userland tools. Patch to add this counters to netstat(1) attached.
I'm taking it.
This patch doesn't apply clean anymore. Please, can you redo the patch? Best,
Waiting submitter feedback.
Created attachment 177042 [details] patch for netstat/inet.c Add libxo support.
I've updated patch. netstat -s -p tcp without patch: 41 connections established (including accepts) 45 connections closed (including 0 drops) 15 connections updated cached RTT on close 15 connections updated cached RTT variance on close 0 connections updated cached ssthresh on close netstat -s -p tcp with my patch: 41 connections established (including accepts) 12 times used RTT from hostcache 12 times used RTT variance from hostcache 0 times used slow-start threshold from hostcache 45 connections closed (including 0 drops) 15 connections updated cached RTT on close 15 connections updated cached RTT variance on close 0 connections updated cached ssthresh on close
A commit references this bug: Author: araujo Date: Wed Dec 28 13:11:22 UTC 2016 New revision: 310698 URL: https://svnweb.freebsd.org/changeset/base/310698 Log: Print hostcache usage counts with TCP statistics. PR: 196252 Submitted by: Anton Yuzhaninov <citrin+pr@citrin.ru> MFC after: 3 weeks. Changes: head/usr.bin/netstat/inet.c
Committed, thanks for the patch!
A commit references this bug: Author: araujo Date: Fri Jan 27 02:35:05 UTC 2017 New revision: 312856 URL: https://svnweb.freebsd.org/changeset/base/312856 Log: MFC r310698: Print hostcache usage counts with TCP statistics. PR: 196252 Submitted by: Anton Yuzhaninov <citrin+pr@citrin.ru> MFC after: 3 weeks. Changes: _U stable/11/ stable/11/usr.bin/netstat/inet.c