iproute2: show counter of carrier on<->off transitions
This patch allows to display the current counter of carrier on<->off
transitions (IFLA_CARRIER_CHANGES, see kernel commit "expose number of
carrier on/off changes"):
ip -s -s link show dev eth0
32: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
link/ether ................. brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
125552461 258881 0 0 0 10150
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
40426119 224444 0 0 0 0
TX errors: aborted fifo window heartbeat transns
0 0 0 0 3
Tested:
- kernel with patch "net-sysfs: expose number of carrier on/off
changes": see "transns" column above
- kernel wthout the patch: "transns" not displayed (as expected)
Signed-off-by: David Decotigny <decot@googlers.com>
Showing
Please register or sign in to comment