Menu

UnifiedStats

statistics (1)
Jesse Brandeburg

What's this?

It's a brief description and guide to the new unified statistics Intel is developing for some of our drivers.

Purpose

This page attempts to describe why this is here, and document the statistics themselves. Please note that not every driver will have every statistic.

Background

Purpose & Background

This effort is intended to provide a framework by which statistics gathered by Ethtool or similar tools, utilize a common naming scheme for Intel Ethernet Linux drivers.

When one utilizes Ethtool to read information from an Ethernet device, such as statistics, the driver returns a buffer with the strings for the various statistics. There is no standard naming convention for these statistics. Within Intel Ethernet devices there can be a lot of variations between the devices.

By way of example, an analysis of igb, ixgbe, i40e, iavf and ice drivers found only three common statistics:

  • rx_bytes
  • tx_bytes
  • tx_errors

Some examples of differing strings representing the same data:
On ixgbe:

  • rx_pkts_nic
  • tx_pkts_nic

i40e has:

  • port.rx_packets
  • port.tx_packets


Justification

While these strings are easily discernible by humans, it is a lot harder for an analytical engine that is examining this data. There are a growing number of telemetry collection frameworks such as collectd, Telegraf and node_exporter being used by customers to gather and analyze data. Intel has a whole team working on these frameworks to expose IA telemetry for customer use. Having inconsistent strings is becoming increasingly frustrating for our customers.

In addition to customers, our own validation teams use these statistics in their testing activities. Without consistent statistic strings, the validation engineers need to spend time updating their scripts for each device specific statistic string used in their testing.

For these reasons and more, a common naming scheme has been created.

Naming Schema

The naming schema was created to be human readable and easily parsed by an analytic engine (such as a script or other entity). All statistic strings will be comprised of three components, Where, Instance and Units. Each of these components is separated by an underscore "_"; if a component is comprised of more than one word, then those words are separated by a dash "-".

An example statistic that shows this is xdp-rx-dropped_q-23_packets. In this case the where is xdp-rx-dropped, the instance is q-23 and the unit is packets.

Not every statistic string will have the instance components, for example tx_errors, the where for this would be the device tx, the unit is errors, and the instance does not exist because there is only one; however there SHALL always be a where and units component.

Let's break down some example statistic strings:

Statistic String 'Where' 'Instance' 'Units'
rx_bytes driver receive bytes
veb-tx_pkts veb transmit packets
tx_q-32_errors driver transmit queue 32 errors
port-rx-ipv4-csum-offload_count device receive IPV4 checksum offload events/counter

Notes:

  • Ethtool statistics can only have 31 characters.  This is why we document the length.
  • We assume 3 digits for queue numbers, 2 digits for a traffic class.
  • #'s represent replaced numbers
    • The numbers shall be decimal.
    • The numbers shall not have leading zeros.
    • Example:  ### is a 1, 2 or 3 digit decimal number without a leading zero.
    • String Length below assumes the longest expected number.
  • Items in light grey are not expected in Ethtool as they are already provided to the OS and can be extracted via sysfs or other means e.g.  /sys/class/net/<device>/statistics These are also called "netstats".

Build flags:

  • Drivers that support unified statistics use the same define.  
  • This #define shall be UNIFIED_STATS
  • ice example: make CFLAGS_EXTRA=-DUNIFIED_STATS install




Statistics names and descriptions

NOTE: This table is a superset of all statistics implemented by all Intel drivers and does not dictate what statistics a specific driver will support. A specific driver may not implement all the statistics listed in this table.

Statistic String String Length (see above) Source Description Comment
port-mac-local_faults 21 physical port number of local faults in L1, usually caused by the other side not providing a carrier of some kind (like not sending laser light)  many of these could indicate an unstable link or cable problem, typically causes link down
port-mac-remote_faults 22 physical port number of remote faults in L1, usually caused by the other side reporting that this side is generating some problem (like not sending laser light) usually causes link down
port-rx_bytes 13 physical port total number of bytes received by the port packets are counted when they arrive and pass basic edge filters like for MAC match, broadcast, or multicast match, does not imply the packet was delivered to a queue
port-rx_size-64_pkts 20 physical port number of packets received that are 64 bytes in length
port-rx_size-127_pkts 21 physical port number of packets received that are between 65 and 127 bytes (inclusive) in length
port-rx_size-255_pkts 21 physical port number of packets received that are between 128 and 255 bytes (inclusive) in length
port-rx_size-511_pkts 21 physical port number of packets received that are between 256 and 511 bytes (inclusive) in length
port-rx_size-1023_pkts 22 physical port number of packets received that are between 512 and 1023 bytes (inclusive) in length
port-rx_size-1522_pkts 22 physical port number of packets received that are between 1024 and 1522 bytes (inclusive) in length
port-rx_size-jumbo_pkts 23 physical port number of packets received that are larger than 1522 bytes in length
port-rx-arfs-tcpv4-pkts 23 physical port number of IPv4 TCP packets received that match an adaptive receive flow steering rule Good to test if ARFS is working, once enabled.
port-rx-arfs-tcpv6-pkts 23 physical port number of IPv6 TCP packets received that match an adaptive receive flow steering rule Good to test if ARFS is working, once enabled.
port-rx-arfs-udpv4-pkts 23 physical port number of IPv4 UDP packets received that match an adaptive receive flow steering rule Good to test if ARFS is working, once enabled.
port-rx-arfs-udpv6-pkts 23 physical port number of IPv6 UDP packets received that match an adaptive receive flow steering rule Good to test if ARFS is working, once enabled.
port-rx-broadcast_pkts 22 physical port number of broadcast packets the port has received
port-rx-crc_errors 18 physical port number of packets the port has received with an invalid CRC CRC error packets are typically dropped on ingress.
port-rx-csum_errors 19 physical port number of packets the port has received with an invalid checksum CSUM error packets are counted, but handed up to stack without offload for recheck/drop by the stack.
port-rx-dropped_pkts 20 physical port number of receive packets the port has dropped useful for debugging when PCIe is too slow (many causes), and implies the amount of FIFO space dedicated for this type of packet was exhausted. Remedies include moving card to another slot, or sometimes modifying power management settings of the CPU.
port-rx-fdir_flushed 20 physical port number of times the flow director table was erased occurs normally when ATR is in use, when the flow table fills all entries.
port-rx-fdir-atr 16 physical port number of times a flow director application targeted (ATR) routing rule matched for incoming packets Good to know when ATR is working
port-rx-fdir-atr_status 23 physical port boolean, 1 indicating that application targeted routing is enabled, 0 indicating that it is not
port-rx-fdir-atr-tunnel 23 physical port number of times a flow director application targeted routing rule matched for incoming packets that were encapsulated in a tunnel Good to know when tunnel packet ATR is working.
port-rx-fdir-sideband 21 physical port number of times a user defined rule has matched a receive packet Good for checking if manually added rules are triggering
port-rx-fdir-sideband-status 28 physical port boolean value, 1 indicating that a sideband (user defined) flow director rule has been created
port-rx-fragmented_pkts 23 physical port number of fragmented packets the port has received
port-rx-illegal_bytes 21 physical port number of invalid bytes receieved at L1 
port-rx-ipv4-csum_errors 24 physical port number of IPv4 packets received that the checksum offload found an error on Means the hardware failed the checksum check on a packet, debug stat
port-rx-ipv4-csum-offload_count 31 physical port number of IPv4 packets received that the checksum offload was used on Hardware checked the csum and marked it offloaded in the descriptor, debug stat
port-rx-jabber_pkts 19 physical port number of jabber packets the port has received
port-rx-length_errors 21 physical port number of packets the port has received with an invalid length
port-rx-low-power-idle_count 28 physical port number of tims the port has transitioned in and out of low power mode
port-rx-low-power-idle_status 29 physical port boolean value, 1 indication that lower power idle is enabled, 0 indicating that it is not
port-rx-multicast_pkts 22 physical port number of multicast packets the port has received
port-rx-oversized_pkts 22 physical port number of oversized packets the port has received
port-rx-sctp-csum_errors 24 physical port number of stream control transmission protocol (SCTP) packets received that the checksum offload found an error on SCTP checksum offload check failed, debug stat
port-rx-sctp-csum-offload_count 31 physical port number of receive packets the stream control transmission protocol offload was used on SCTP checksum offload passed, debug stat
port-rx-tcp-csum_errors 23 physical port number of TCP packets received that the checksum offload found an error on debug stat
port-rx-tcp-csum-offload_count 30 physical port number of TCP packets received that checksum offload was used on debug stat
port-rx-udp-csum_errors 23 physical port number of UDP packets received that the checksum offload found an error on debug stat
port-rx-udp-csum-offload_count 30 physical port number of UDP packets received that checksum offload was used on debug stat
port-rx-undersized_pkts 23 physical port number of undersized packets the port has received
port-rx-unicast_pkts 20 physical port number of unicast packets the port has received
port-rx-vlan-offload_count 26 physical port number of packets received that the vlan offload was used on counts the number of times a vlan was offloaded by hardware, debug stat
port-rx-xoff_events 19 physical port number of xoff packets the port has received L2 flow control transmit pause requested
port-rx-xoff_prio-##_events 27 physical port number of xoff packets the port has received for priority ###
port-rx-xon_events 18 physical port number of xon packets the port has received L2 flow control transmit pause cancelled
port-rx-xon_prio-##_events 26 physical port number of xon packets the port has received for priority ###
port-rx-xon2xoff_prio-##_events 31 physical port number of times a transition between xon to xoff has occurred for priority ###
port-tx_bytes 13 physical port number of bytes the port has transmitted
port-tx_errors 14 physical port number of errors the port has encountered on transmit
port-tx_size-64_pkts 20 physical port number of packets transmitted that are 64 bytes in length
port-tx_size-127_pkts 21 physical port number of packets transmitted that are between 65 and 127 bytes (inclusive) in length
port-tx_size-255_pkts 21 physical port number of packets transmitted that are between 128 and 255 bytes (inclusive) in length
port-tx_size-511_pkts 21 physical port number of packets transmitted that are between 256 and 511 bytes (inclusive) in length
port-tx_size-1023_pkts

22


physical port number of packets transmitted that are between 512 and 1023 bytes (inclusive) in length
port-tx_size-1522_pkts 22 physical port number of packets transmitted that are between 1024 and 1522 bytes (inclusive) in length
port-tx_size-jumbo_pkts 23 physical port number of packets transmitted that are larger than 1522 bytes in length
port-tx-dropped_link-down_pkts 30 physical port number of packets the port has dropped due to the link being down packets attempted to transmit while link was down (flushed in order to not block driver)
port-tx-dropped_pkts 20 physical port number of packets the port has dropped 
port-tx-ipv4-csum-offload_count 23 physical port number of IPv4 packets transmitted that the checksum offload was used on debug stat
port-tx-layer-3-csum_errors 27 physical port number of packets transmitted that had an invalid layer 3 checksum debug stat
port-tx-layer-4-csum_errors 27 physical port number of packets transmitted that had an invalid layer 4 checksum debug stat
port-tx-low-power-idle_count 28 physical port number of times the port has transitioned to a low power state
port-tx-low-power-idle_status 29 physical port boolean value, 1 indicating lower power idle is active, 0 indicating inactive
port-tx-multicast_pkts 22 physical port number of multicast packets the port has transmitted
port-tx-sctp-csum-offload_count 31 physical port number of transmit packets the stream control transmission protocol (SCTP) offload was used on debug stat
port-tx-tcp-csum-offload_count 30 physical port number of TCP packets the transmit checksum offload was used on debug stat
port-tx-tcp-segments_count 26 physical port number of times Transmit Segmentation offload was used for TCP traffic debug stat
port-tx-timeout_events 22 physical port number of times a timeout has occurred on transmit this counter indicates the number of transmit timeouts the driver has seen, usually indicating a larger problem
port-tx-timestamp_cleared 25 physical port Number of times timestamp configuration has been cleared due to an undetermined error condition
port-tx-timestamp_skipped 25 physical port Driver didn't have an available resource for transmit time-stamping packet was sent, but without a timestamp due to hardware being busy with other timestamps that are outstanding
port-tx-timestamp_timeouts 26 physical port Number of times timestamp configuration has been cleared due to an undetermined error condition
port-tx-udp-csum-offload_count 30 physical port number of UDP transmit packets checksum offload was used on debug stat
port-tx-udp-segments_count 26 physical port number of times Transmit Segmentation offload was used for UDP traffic debug stat
port-tx-unicast_pkts 20 physical port number of unicast packets the port has transmitted
port-tx-vlan-offload_count 26 physical port number of packets transmitted that the vlan offload was used on
port-tx-xoff_events 19 physical port number of xoff packets the port has transmitted
port-tx-xoff_prio-##_events 26 physical port number of xoff packets the port has transmitted for priority ##
port-tx-xon_events 18 physical port number of xon packets the port has transmitted
port-tx-xon_prio-##_events 25 physical port number of xon packets the port has transmitted for priority ##
port-vf-admin-q_requests 24 physical port number of queue requests the vf has received
rx_q-###_bytes 14 driver number of bytes received on queue ###
rx_q-###_pkts 13 driver number of packets received on queue ###
rx-broadcast_pkts 17 driver number of broadcast packets the driver has received
rx-dropped_pkts 15 driver number of incoming packets the driver has dropped
rx-l2-forward_q-###_bytes 25 driver number of bytes received by the L2 forward filter for queue ###
rx-l2-forward_q-###_pkts 24 driver number of packets received by the L2 forward filter for queue ###
rx-multicast_pkts 17 driver number of multicast packets the driver has received
rx-page-alloc-fail_events 25 driver number of times the driver was unable to allocate receive buffers
rx-unicast_pkts 15 driver number of packets the driver has received
rx-unknown-protocol_pkts 24 driver number of unknown protocol packets received
tx_q-###_bytes 14 driver number of bytes transmitted on queue ###
tx_q-###_pkts 13 driver number of packets transmitted on queue ###
tx_size-64_pkts 15 driver number of packets transmitted that are 64 bytes in length
tx_size-127_pkts 16 driver number of packets transmitted that are between 65 and 127 bytes (inclusive) in length
tx_size-255_pkts 16 driver number of packets transmitted that are between 128 and 255 bytes (inclusive) in length
tx_size-511_pkts 16 driver number of packets transmitted that are between 256 and 511 bytes (inclusive) in length
tx_size-1023_pkts 17 driver number of packets transmitted that are between 512 and 1023 bytes (inclusive) in length
tx_size-1522_pkts 17 driver number of packets transmitted that are between 1023 and 1522 bytes (inclusive) in length
tx_size-jumbo_pkts 18 driver number of jumbo packets transmitted that are larger that 1522 bytes in length
tx-broadcast_pkts 17 driver number of broadcast packets the tx has transmitted

tx-busy_events


14 driver number of times the transmitter was busy indication that the driver returned NETDEV_TX_BUSY to the stack on a transmit, usually indicating a driver problem
tx-collision_pkts 17 driver
not used
tx-force-writeback_events

25

driver number of times the driver had to force a descriptor write-back
tx-l2-forward_q-###_bytes 25 driver number of bytes transmitted by the L2 forward filter for queue ###
tx-l2-forward_q-###_pkts 24 driver number of packets transmitted  by the L2 forward filter for queue ###
tx-linearized_pkts 18 driver number of packets the transmit routine made into a single buffer send counts transmit coalesce events, extreme slow down in performance will result
tx-multicast_pkts 17 driver number of multicast packets transmitted
tx-unicast_pkts 15 driver number of unicast packets transmitted
veb-rx_bytes 12 driver number of bytes the veb has received
veb-rx_traffic-class-##_bytes 29 driver number of traffic class ## bytes the veb has received
veb-rx_traffic-class-##_pkts 28 driver number of traffic class n packets the veb has received
veb-rx-broadcast_pkts 21 driver number of broadcast packets the veb has received
veb-rx-discarded_pkts 21 driver number of discarded packets the veb has received
veb-rx-multicast_pkts 21 driver number of multicast packets the veb has received
veb-rx-unicast_pkts 19 driver number of unicast packets the veb has received
veb-rx-unknown-protocol_pkts 28 driver number of unknown protocol packets the veb has received
veb-tx_bytes 12 driver number of bytes transmitted by the virtual ethernet bridge
veb-tx_traffic-class-##_bytes 28 driver number of traffic class n bytes the veb has transmitted
veb-tx_traffic-class-##_pkts 29 driver number of traffic class n packets the veb has transmitted
veb-tx-broadcast_pkts 21 driver number of broadcast packets the veb has transmitted
veb-tx-discarded_pkts 21 driver number of discarded packets the veb has discarded
veb-tx-multicast_pkts 21 driver number of multicast packets the veb has transmitted
veb-tx-unicast_pkts 19 driver number of unicast packets the veb has transmitted
xdp-rx_q-###_bytes 18 driver number of queue n bytes the XDP has received
xdp-rx_q-###_pkts 17 driver number of queue ### packets the XDP has received
xdp-rx-tx_q-###_pkts 15 driver number of XDP packets redirected from receive to transmit for queue ###
xdp-rx-dropped_q-###_pkts 25 driver number of dropped queue n packets the XDP has received
xdp-rx-passed_q-###_pkts 24 driver number of passed queue n packets the XDP has received
xdp-rx-redirected_q-###_pkts 28 driver number of redirected queue ### packets the XDP has received
xdp-rx-redir-fail_q-###_pkts 28 driver number of redirect failed queue ### packets the XDP has received
xdp-rx-unknown_q-###_pkts

25

driver number of unknown queue n packets the XDP has received
xdp-tx_q-###_bytes 18 driver number of queue n bytes the XDP has received
xdp-tx_q-###-pkts 17 driver number of queue n packets the XDP has received
xdp-tx-fail_q-###_pkts 22 driver number of queue n packets that XDP failed to transmit
rx_vf-###_bytes 15 rtnl_link_stats64 number of bytes received by vf ###
rx_vf-###_pkts 14 rtnl_link_stats64 number of packets received by vf ##
rx-multicast_vf-###_pkts 24 rtnl_link_stats64 number of multicast packets received by vf ###
rx-broadcast_vf-###_pkts 24 rtnl_link_stats64 number of broadcast packets received by vf ###
rx-discarded_vf-###_pkts 24 rtnl_link_stats64 number of receive packets discarded by vf ###
rx_vf-###_errors

16

rtnl_link_stats64 number of receive errors counted by vf ###
tx_vf-###_bytes 15 rtnl_link_stats64 number of bytes transmitted by vf ###
tx_vf-###_pkts 14 rtnl_link_stats64 number of packets transmitted by vf ###
tx-multicast_vf-###_pkts

24

rtnl_link_stats64 number of multicast packets transmitted by vf ###
tx-broadcast_vf-###_pkts 24 rtnl_link_stats64 number of broadcast packets transmitted by vf ###
tx-discarded_vf-###_pkts 24 rtnl_link_stats64 number of transmit packets discarded by vf ###
tx_vf-###_errors 16 rtnl_link_stats64 number of transmit errors counted by vf ###
rx_packets N/A rtnl_link_stats64 Comment in if_link.h: total packets received Not expected to be in Ethtool.
tx_packets N/A rtnl_link_stats64 Comment in if_link.h: total packets transmitted Not expected to be in Ethtool.
rx_bytes N/A rtnl_link_stats64 Comment in if_link.h: total bytes received

Not expected to be in Ethtool.

tx_bytes N/A rtnl_link_stats64 Comment in if_link.h: total bytes transmitted

Not expected to be in Ethtool.

rx_errors N/A rtnl_link_stats64 Comment in if_link.h: bad packets received

Not expected to be in Ethtool.

tx_errors N/A rtnl_link_stats64 Comment in if_link.h: bad packets received

Not expected to be in Ethtool.

rx_dropped N/A rtnl_link_stats64 Comment in if_link.h: no space in linux buffers

Not expected to be in Ethtool.

tx_dropped N/A rtnl_link_stats64 Comment in if_link.h: no space in linux buffers

Not expected to be in Ethtool.

multicast N/A rtnl_link_stats64 Comment in if_link.h: multicast packets received

Not expected to be in Ethtool.

collisions N/A rtnl_link_stats64 Comment in if_link.h: (none)

Not expected to be in Ethtool.

rx_length_errors N/A rtnl_link_stats64 Comment in if_link.h: (none)

Not expected to be in Ethtool.

rx_over_errors N/A rtnl_link_stats64 Comment in if_link.h: receiver ring buff overflow

Not expected to be in Ethtool.

rx_crc_errors N/A rtnl_link_stats64 Comment in if_link.h: recved pkt with crc error

Not expected to be in Ethtool.

rx_frame_errors N/A rtnl_link_stats64 Comment in if_link.h: recv'd frame alignment error

Not expected to be in Ethtool.

rx_fifo_errors N/A rtnl_link_stats64 Comment in if_link.h: recv'r fifo overrun

Not expected to be in Ethtool.

rx_missed_errors N/A rtnl_link_stats64 Comment in if_link.h: receiver missed packet

Not expected to be in Ethtool.

tx_aborted_errors N/A rtnl_link_stats64 Comment in if_link.h: (none)

Not expected to be in Ethtool.

tx_carrier_errors N/A rtnl_link_stats64 Comment in if_link.h: (none)

Not expected to be in Ethtool.

tx_fifo_errors N/A rtnl_link_stats64 Comment in if_link.h: (none)

Not expected to be in Ethtool.

tx_heartbeat_errors N/A rtnl_link_stats64 Comment in if_link.h: (none)

Not expected to be in Ethtool.

tx_window_errors N/A rtnl_link_stats64 Comment in if_link.h: (none)

Not expected to be in Ethtool.

rx_compressed N/A rtnl_link_stats64 Comment in if_link.h: (none)

Not expected to be in Ethtool.

rx_nohandler N/A rtnl_link_stats64 Comment in if_link.h: dropped, no handler found

Not expected to be in Ethtool.


Related

Wiki: Home