{
    "mode": "man",
    "parameter": "IP-STATS",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/IP-STATS/8/json",
    "generated": "2026-09-11T21:34:51Z",
    "synopsis": "ip stats  { COMMAND | help }\nip stats show [ dev DEV ] [ group GROUP [ subgroup SUBGROUP  [ suite  SUITE ] ... ] ... ] ...\nip stats set dev DEV l3stats { on | off }",
    "sections": {
        "NAME": {
            "content": "ip-stats - manage and show interface statistics\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ip stats  { COMMAND | help }\n\n\nip stats show [ dev DEV ] [ group GROUP [ subgroup SUBGROUP  [ suite  SUITE ] ... ] ... ] ...\n\nip stats set dev DEV l3stats { on | off }\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "",
            "subsections": [
                {
                    "name": "ip stats set",
                    "content": "is  used  for  toggling  whether a certain HW statistics suite is collected on a given\nnetdevice. The following statistics suites are supported:\n\n\nl3stats L3 stats reflect traffic that takes place in a HW device on  an  object  that\ncorresponds to the given software netdevice.\n\n"
                },
                {
                    "name": "ip stats show",
                    "content": "is  used for showing stats on a given netdevice, or dumping statistics across all net‐\ndevices. By default, all stats are requested. It is possible to filter which stats are\nrequested by using the group and subgroup keywords.\n\nIt is possible to specify several groups, or several subgroups for one group. When  no\nsubgroups are given for a group, all the subgroups are requested.\n\nThe following groups are recognized:\n\ngroup link - Link statistics. The same suite that \"ip -s link show\" shows.\n\ngroup  offload  -  A group that contains a number of HW-oriented statistics. See below\nfor individual subgroups within this group.\n\ngroup xstats - Extended statistics. A subgroup identifies the  type  of  netdevice  to\nshow the statistics for.\n\ngroup xstatsslave - Extended statistics for the slave of a netdevice of a given type.\nA subgroup identifies the type of master netdevice.\n\ngroup afstats - A group for address-family specific netdevice statistics.\n\ngroup offload subgroups:\n\nsubgroup  cpuhit - The cpuhit statistics suite is useful on hardware netdevices. The\nlink statistics on these devices reflect both the hardware- and  software-data‐\npath  traffic. The cpuhit statistics then only reflect software-datapath traf‐\nfic.\n\nsubgroup hwstatsinfo - This suite does not include traffic  statistics,  but  rather\ncommunicates the state of other statistics. Through this subgroup, it is possi‐\nble to discover whether a given statistic was enabled, and when it was, whether\nany  device  driver actually configured its device to collect these statistics.\nFor example, l3stats was enabled in the following case, but no driver has  in‐\nstalled it:\n\n# ip stats show dev swp1 group offload subgroup hwstatsinfo\n56: swp1: group offload subgroup hwstatsinfo\nl3stats on used off\n\nAfter an L3 address is added to the netdevice, the counter will be installed:\n\n# ip addr add dev swp1 192.0.2.1/28\n# ip stats show dev swp1 group offload subgroup hwstatsinfo\n56: swp1: group offload subgroup hwstatsinfo\nl3stats on used on\n\nsubgroup  l3stats  - These statistics reflect L3 traffic that takes place in HW on an\nobject that corresponds to the netdevice. Note that this suite is  disabled  by\ndefault and needs to be first enabled through ip stats set.\n\nFor example:\n\n# ip stats show dev swp2.200 group offload subgroup l3stats\n112: swp2.200: group offload subgroup l3stats on used on\nRX:  bytes packets errors dropped   mcast\n8900      72      2       0       3\nTX:  bytes packets errors dropped\n7176      58      0       0\n\nNote how the l3statsinfo for the selected group is also part of the dump.\n\ngroup xstats and group xstatsslave subgroups:\n\nsubgroup  bridge [ suite stp ] [ suite mcast ] - Statistics for STP and, respectively,\nIGMP / MLD (under the keyword mcast) traffic on bridges and their slaves.\n\nsubgroup bond [ suite 802.3ad ] - Statistics for LACP  traffic  on  bond  devices  and\ntheir slaves.\n\ngroup afstats subgroups:\n\nsubgroup mpls - Statistics for MPLS traffic seen on the netdevice. For example:\n\n# ip stats show dev veth01 group afstats subgroup mpls\n3: veth01: group afstats subgroup mpls\nRX: bytes packets errors dropped noroute\n0       0      0       0       0\nTX: bytes packets errors dropped\n216       2      0       0\n\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "# ip stats set dev swp1 l3stats on\nEnables collection of L3 HW statistics on swp1.\n\n\n# ip stats show group offload\nShows all offload statistics on all netdevices.\n\n\n# ip stats show dev swp1 group link\nShows link statistics on the given netdevice.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ip(8), ip-link(8),\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Manpage by Petr Machata.\n\niproute2                                     16 Mar 2022                                 IP-STATS(8)",
            "subsections": []
        }
    },
    "summary": "ip-stats - manage and show interface statistics",
    "flags": [],
    "examples": [
        "# ip stats set dev swp1 l3stats on",
        "Enables collection of L3 HW statistics on swp1.",
        "# ip stats show group offload",
        "Shows all offload statistics on all netdevices.",
        "# ip stats show dev swp1 group link",
        "Shows link statistics on the given netdevice."
    ],
    "see_also": [
        {
            "name": "ip",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ip/8/json"
        },
        {
            "name": "ip-link",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ip-link/8/json"
        }
    ]
}