ip-stats
manages and displays network interface statistics
TLDR
SYNOPSIS
ip stats { command | help }ip stats show [dev DEV] [group GROUP [subgroup SUBGROUP [suite SUITE] ...] ...] ...ip stats set dev DEV l3_stats { on | off }
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 (the same as ip -s link show), hardware offload metrics, extended per-device-type statistics for bridges and bonds, and address-family specific statistics like MPLS. By default, all stats are requested. Hardware statistics collection may need to be explicitly enabled.
PARAMETERS
show [dev DEVICE]
Display statisticsset dev DEVICE
Configure statistics collectiongroup GROUP
Statistics group: link, offload, xstats, xstats_slave, afstats. Several groups may be givensubgroup SUBGROUP
Specific subgroup within a group: cpuhit, hwstatsinfo, l3stats (offload); bridge, bond (xstats); mpls (afstats)suite SUITE
Specific suite within a subgroup, e.g. stp, mcast, vlan (bridge) or 802.3ad (bond)l3_stats on|off
Enable/disable L3 hardware statistics
INSTALL
CAVEATS
Hardware offload statistics require driver and hardware support. Some statistics may not be available on all interfaces. L3 offload statistics are disabled by default and must be enabled with ip stats set; use subgroup hw_stats_info to check whether a driver actually installed the counters. Requires iproute2 5.19 or newer.
HISTORY
ip stats was added in iproute2 5.19 (2022), contributed by Petr Machata, to expose the kernel's RTM_GETSTATS interface, including the L3 hardware offload statistics introduced in Linux 5.18.
SEE ALSO
ip(8), ip-link(8), ip-monitor(8), ifstat(1), nstat(8)
