Date: Tue, 29 May 2018 06:50:53 -0600 From: Sean Bruno <sbruno@freebsd.org> To: Dieter BSD <dieterbsd@gmail.com>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: netstat(1) -s -f is broken Message-ID: <28b4a1f2-9f89-33fa-2b3c-74d047133721@freebsd.org> In-Reply-To: <CAA3ZYrAxkzX14uEoZUboVgWMDHNjJGZ_x=wsJ=de5iFpQqoSFA@mail.gmail.com> References: <CAA3ZYrAxkzX14uEoZUboVgWMDHNjJGZ_x=wsJ=de5iFpQqoSFA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4oHf4zO7KdUsKhEuUPwf4L0qK35NYL6fd Content-Type: multipart/mixed; boundary="APuargyyuFUfKKWsAVF6uLh7i19ETDk4Y"; protected-headers="v1" From: Sean Bruno <sbruno@freebsd.org> To: Dieter BSD <dieterbsd@gmail.com>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Message-ID: <28b4a1f2-9f89-33fa-2b3c-74d047133721@freebsd.org> Subject: Re: netstat(1) -s -f is broken References: <CAA3ZYrAxkzX14uEoZUboVgWMDHNjJGZ_x=wsJ=de5iFpQqoSFA@mail.gmail.com> In-Reply-To: <CAA3ZYrAxkzX14uEoZUboVgWMDHNjJGZ_x=wsJ=de5iFpQqoSFA@mail.gmail.com> --APuargyyuFUfKKWsAVF6uLh7i19ETDk4Y Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/03/18 15:32, Dieter BSD wrote: > FreeBSD 10.3-RELEASE >=20 > The fine man page promises: > netstat -i | -I interface -s [-46] [-f protocol_family | -p protoc= ol] > [-M core] [-N system] > Display per-interface statistics for each network protocol= , for a > particular protocol_family, or for a single protocol. >=20 > But in reality, > netstat -I interface -s -f family > only works if family is inet6. >=20 > interface=3Dlo0 > for fam in inet inet6 pfkey atalk netgraph ipx unix link > do > echo -n interface =3D $interface fam =3D $fam > netstat -I $interface -s -f $fam | wc > done >=20 > interface =3D lo0 fam =3D inet 0 0 0 > interface =3D lo0 fam =3D inet6 56 258 1728 > interface =3D lo0 fam =3D pfkey 0 0 0 > interface =3D lo0 fam =3D atalk 0 0 0 > interface =3D lo0 fam =3D netgraph 0 0 0 > interface =3D lo0 fam =3D ipx 0 0 0 > interface =3D lo0 fam =3D unix 0 0 0 > interface =3D lo0 fam =3D link 0 0 0 >=20 > I had this in a loop with all the interfaces, the results are > the same for all interfaces. >=20 > Doesn't work with -p either. > netstat -I lo0 -s -p udp > :udp: no per-interface stats routine >=20 > It would be very useful if this actually worked. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg" >=20 Wow, this sure looks like a bug. sean --APuargyyuFUfKKWsAVF6uLh7i19ETDk4Y-- --4oHf4zO7KdUsKhEuUPwf4L0qK35NYL6fd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAlsNTK1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 /LYvQwgA2O6bGIngkjoRiURiJ4W/8LertTk5H9jKbWO/COb/t/cTZMPWhHFeE9Dl QUyM6SePkD5uDXudQ8Tbya3cfHencdvOq1gr+Kz1vo4LYHjBlXI1c4/tK++6Loff 6gWt+xexvE4R4XHEp///N0eeuTdj7UQ1psh8vv5RtYfjqj7qKz7cmSMxDFXg3few UIpiJR8RTPNHtEpDx4VVKyCUJyhlJ/3DyGCjLkaSAQ3UMDHRK4g7JuI4mKbx4JTR GvENhL8Gp1c20noc8Q3RtTFey2X/Soa9PTos5csgOSZrsiZmGgPjUd+WimbkU5+2 atYHHoXdzN+v4vQCo+K2ovEcq7qEEA== =BUCa -----END PGP SIGNATURE----- --4oHf4zO7KdUsKhEuUPwf4L0qK35NYL6fd--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28b4a1f2-9f89-33fa-2b3c-74d047133721>