Monitoring and logs
ifstat
Shows each network card's packet and byte counters, and the change since the last run.
ifstat (from iproute2) prints, for each card, the packets and bytes received and sent. Like nstat, it
prints the change since it last ran on this device, so two runs around some traffic show how much went out of
each card: the way to see which cable of a bundle carried a transfer. Byte counts over a mebibyte are shown in
kibibytes, with a K.
ifstat command usage
ifstat [-a] [-n] [-s] [CARD...]
Options
-
-a - show all counters since the card came up, not the change
-
-n - reset the baseline without printing deltas
-
-s - print without updating the baseline
-
CARD... - only these cards, e.g. bond0p1 bond0p2
ifstat examples
-
ifstat bond0p1 bond0p2 - Shows how much each cable of the bond received and sent since the last run.
Pitfalls
- The default is the delta since ifstat last ran on this device: run it once before the traffic, then again after.