LinuxCommandLibrary

ip-stats

manages and displays network interface statistics

TLDR

Show all interface statistics

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

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community