ip-stats

manages and displays network interface statistics

TLDR

Show all interface statistics
$ ip stats
Show statistics for a specific interface
$ ip stats show dev [eth0]
Show link-layer statistics
$ ip stats show group link
Show hardware offload statistics
$ ip stats show group offload
Show offload statistics for specific interface
$ ip stats show dev [eth0] group offload
Show specific offload subgroup
$ ip stats show dev [eth0] group offload subgroup [l3_stats|cpu_hit|hw_stats_info]
Enable L3 hardware statistics
$ ip stats set dev [eth0] l3_stats on

SYNOPSIS

ip stats [command] [options]

DESCRIPTION

ip stats manages and displays network interface statistics. It provides access to both software-maintained counters and hardware offload statistics where supported.Statistics groups include link-layer counters, hardware offload metrics, and address-family specific statistics like MPLS. Hardware statistics collection may need to be explicitly enabled.

PARAMETERS

show [dev DEVICE]

Display statistics
set dev DEVICE
Configure statistics collection
group GROUP
Statistics group: link, offload, afstats
subgroup SUBGROUP
Specific subgroup within a group
l3_stats on|off
Enable/disable L3 hardware statistics

CAVEATS

Hardware offload statistics require driver and hardware support. Some statistics may not be available on all interfaces. Enabling statistics collection may have a performance impact.

HISTORY

ip stats was added to iproute2 to provide unified access to various network statistics including hardware offload metrics that became available in newer kernel versions.

SEE ALSO

ip(8), ip-link(8), ifstat(1)