Date: Tue, 12 Mar 2019 16:51:17 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 236493] netstat output is misleading when -W is not used Message-ID: <bug-236493-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236493 Bug ID: 236493 Summary: netstat output is misleading when -W is not used Product: Base System Version: 11.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: daniel@dan42.com I was using netstat to troubleshoot some issues and got the following output: # netstat -AanL Current listen queue sizes (qlen/incqlen/maxqlen) Tcpcb Proto Listen Local Address fffff8003b86d410 tcp4 0/0/128 192.168.255.37.420 fffff800bddcd000 tcp4 0/0/128 192.168.255.37.420 fffff8015eaf1820 tcp4 0/0/128 *.80 fffff8004d87d000 tcp4 0/0/10 127.0.0.1.25 fffff8004d87d410 tcp4 0/0/128 *.22 fffff8004d87d820 tcp6 0/0/128 *.22 fffff8004d633000 tcp4 0/0/128 192.168.255.37.112 So I wasted hours looking for something on 192.168.255.37:420 when in fact it was just truncated: # netstat -AanLW Current listen queue sizes (qlen/incqlen/maxqlen) Tcpcb Proto Listen Local Address fffff8003b86d410 tcp4 0/0/128 192.168.255.37.4201 fffff800bddcd000 tcp4 0/0/128 192.168.255.37.4200 fffff8015eaf1820 tcp4 0/0/128 *.80 fffff8004d87d000 tcp4 0/0/10 127.0.0.1.25 fffff8004d87d410 tcp4 0/0/128 *.22 fffff8004d87d820 tcp6 0/0/128 *.22 fffff8004d633000 tcp4 0/0/128 192.168.255.37.11211 I can understand truncating a symbolic name, but truncating the port number like that (without any indication it was truncated) is *very* misleading. Same thing I imagine if you truncate an IP address (4 or 6) in a way that makes it look like the truncated data is a valid IP address. Please either a) never truncate numeric addresses and port numbers (-n implies -W) b) indicate when a field is truncated (ex: 192.168.255.37.11* or 192.168.255*.11211) -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236493-227>
