]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add -R to netstat to dump RSS/flow information.
authorAdrian Chadd <adrian@FreeBSD.org>
Mon, 19 May 2014 17:11:43 +0000 (17:11 +0000)
committerAdrian Chadd <adrian@FreeBSD.org>
Mon, 19 May 2014 17:11:43 +0000 (17:11 +0000)
commit85b0f0f3259426e628f7ed0347a8206b78c14e8e
treee1d3b868a0dfb3c0d8e059386c09218755b570b7
parentd93a1c8a02628a57529ba2bf3d837c749d9ead92
Add -R to netstat to dump RSS/flow information.

This is intended to help in diagnostics and debugging of NIC and stack
flowid support.

Eventually this will grow another column (RSS CPU ID) but
that currently isn't cached in the inpcb.

There's also no clean flowtype -> flowtype identifier string.  This is
the mbuf M_HASHTYPE_* values for RSS.

Here's some example output:

adrian@adrian-hackbox:~/work/freebsd/head/src % netstat -Rn | more
Active Internet connections
Proto Recv-Q Send-Q Local Address          Foreign Address           flowid ftype
tcp4       0      0 10.11.1.65.22          10.11.1.64.12409        29041942     2
udp4       0      0 127.0.0.1.123          *.*                     00000000     0
udp6       0      0 fe80::1%lo0.123        *.*                     00000000     0
udp6       0      0 ::1.123                *.*                     00000000     0
udp4       0      0 10.11.1.65.123         *.*                     00000000     0

Tested:

* amd64 system w/ igb NIC; local driver changes to expose RSS flowid in if_igb.
usr.bin/netstat/inet.c
usr.bin/netstat/main.c
usr.bin/netstat/netstat.h