STRUCT RTNL_LINK_STATS64(9)
π
struct rtnl_link_stats64(9) π
okay bestie, this is the Kernel API Manual entry for the main device statistics structure β yes, the whole counter-queen lineup. Think of this as your group-chat cheat sheet: every field, every weird /proc/net/dev fold, every IEEE 802.3 equivalence, all of it. no cap. β¨
β¨ NAME β¨
struct rtnl_link_stats64 β the main device statistics structure. periodt. π
π¦ SYNOPSIS π¦
Here's the struct in all its glory, bestie β do not rename a single __u64:
struct rtnl_link_stats64 {
__u64 rx_packets;
__u64 tx_packets;
__u64 rx_bytes;
__u64 tx_bytes;
__u64 rx_errors;
__u64 tx_errors;
__u64 rx_dropped;
__u64 tx_dropped;
__u64 multicast;
__u64 collisions;
__u64 rx_length_errors;
__u64 rx_over_errors;
__u64 rx_crc_errors;
__u64 rx_frame_errors;
__u64 rx_fifo_errors;
__u64 rx_missed_errors;
__u64 tx_aborted_errors;
__u64 tx_carrier_errors;
__u64 tx_fifo_errors;
__u64 tx_heartbeat_errors;
__u64 tx_window_errors;
__u64 rx_compressed;
__u64 tx_compressed;
__u64 rx_nohandler;
__u64 rx_otherhost_dropped;
};
π Members π
okay so every member, one by one, no skipping the "boring" ones β they're literally the whole point:
rx_packetsβ number of good packets the interface received. For hardware interfaces, this counts all good packets the host got from the device, including packets the host had to drop at various stages of processing (even in the driver). π«Άtx_packetsβ number of packets successfully transmitted. For hardware interfaces, this counts packets the host was able to successfully hand over to the device. That does not necessarily mean the packets were successfully transmitted out of the device β it only means the device acknowledged that it copied them out of host memory. πrx_bytesβ number of good received bytes, corresponding torx_packets. πΈtx_bytesβ number of good transmitted bytes, corresponding totx_packets. π¦rx_errorsβ total number of bad packets received on this network device. This counter must include events counted byrx_length_errors,rx_crc_errors,rx_frame_errors, and other errors not otherwise counted. πtx_errorsβ total number of transmit problems. This counter must include events counted bytx_aborted_errors,tx_carrier_errors,tx_fifo_errors,tx_heartbeat_errors,tx_window_errors, and other errors not otherwise counted. π₯rx_droppedβ number of packets received but not processed, e.g. due to lack of resources or unsupported protocol. For hardware interfaces this counter may include packets discarded due to L2 address filtering, but it should not include packets dropped by the device due to buffer exhaustion β those are counted separately inrx_missed_errors(since procfs folds those two counters together). πtx_droppedβ number of packets dropped on their way to transmission, e.g. due to lack of resources. πmulticastβ multicast packets received. For hardware interfaces this statistic is commonly calculated at the device level (unlikerx_packets), and therefore may include packets which did not reach the host. π‘collisionsβ number of collisions during packet transmissions. π₯rx_length_errorsβ number of packets dropped due to invalid length. Part of aggregate "frame" errors in/proc/net/dev. πrx_over_errorsβ receiver FIFO overflow event counter. πrx_crc_errorsβ number of packets received with a CRC error. Part of aggregate "frame" errors in/proc/net/dev. π§rx_frame_errorsβ receiver frame alignment errors. Part of aggregate "frame" errors in/proc/net/dev. πΌοΈrx_fifo_errorsβ receiver FIFO error counter. πrx_missed_errorsβ count of packets missed by the host. Folded into the "drop" counter in/proc/net/dev. π΅tx_aborted_errorsβ part of aggregate "carrier" errors in/proc/net/dev. For IEEE 802.3 devices capable of half-duplex operation this counter must be equivalent to: (and yes, the matching bullet shows up in DESCRIPTION below β keep scrolling, bestie) πtx_carrier_errorsβ number of frame transmission errors due to loss of carrier during transmission. Part of aggregate "carrier" errors in/proc/net/dev. πΆtx_fifo_errorsβ number of frame transmission errors due to device FIFO underrun / underflow. This condition occurs when the device begins transmission of a frame but is unable to deliver the entire frame to the transmitter in time for transmission. Part of aggregate "carrier" errors in/proc/net/dev. π«tx_heartbeat_errorsβ number of Heartbeat / SQE Test errors for old half-duplex Ethernet. Part of aggregate "carrier" errors in/proc/net/dev. πtx_window_errorsβ number of frame transmission errors due to late collisions (for Ethernet β after the first 64B of transmission). Part of aggregate "carrier" errors in/proc/net/dev. πͺrx_compressedβ number of correctly received compressed packets. This counter is only meaningful for interfaces which support packet compression (e.g. CSLIP, PPP). ποΈtx_compressedβ number of transmitted compressed packets. This counter is only meaningful for interfaces which support packet compression (e.g. CSLIP, PPP). ποΈrx_nohandlerβ number of packets received on the interface but dropped by the networking stack because the device is not designated to receive packets (e.g. backup link in a bond). π ββοΈrx_otherhost_droppedβ number of packets dropped due to mismatch in destination MAC address. π―
π Description π
okay so this section is the long-form notes / IEEE 802.3 tea, and it's giving "the source dumped them in one stream." I'm keeping the same order, bestie β no bits left behind, including the duplicate line. π
- For IEEE 802.3 devices, you should count the length of Ethernet Frames excluding the FCS.
- Same line again, because the source has it twice: for IEEE 802.3 devices you should count the length of Ethernet Frames excluding the FCS.
- For IEEE 802.3 devices this counter may be equivalent to:
30.3.1.1.21 aMulticastFramesReceivedOK
- For IEEE 802.3 devices this counter should be equivalent to a sum of the following attributes:
30.3.1.1.23 aInRangeLengthErrors30.3.1.1.24 aOutOfRangeLengthField30.3.1.1.25 aFrameTooLongErrors
- Historically the count of overflow events. Such events may be reported in the receive descriptors or via interrupts, and may not correspond one-to-one with dropped packets. π
- The recommended interpretation for high speed interfaces is β number of packets dropped because they did not fit into buffers provided by the host, e.g. packets larger than MTU or next buffer in the ring was not available for a scatter transfer. π
- Part of aggregate "frame" errors in
/proc/net/dev. - This statistic was historically used interchangeably with
rx_fifo_errors. - This statistic corresponds to hardware events and is not commonly used on software devices.
- For IEEE 802.3 devices this counter must be equivalent to:
30.3.1.1.6 aFrameCheckSequenceErrors
- For IEEE 802.3 devices this counter should be equivalent to:
30.3.1.1.7 aAlignmentErrors
- Historically the count of overflow events. Those events may be reported in the receive descriptors or via interrupts, and may not correspond one-to-one with dropped packets.
- This statistic was used interchangeably with
rx_over_errors. Not recommended for use in drivers for high speed interfaces. - This statistic is used on software devices, e.g. to count software packet queue overflow (can) or sequencing errors (GRE). π§
- Counts number of packets dropped by the device due to lack of buffer space. This usually indicates that the host interface is slower than the network interface, or host is not keeping up with the receive packet rate. π’
- This statistic corresponds to hardware events and is not used on software devices.
- A bare bullet, exactly as it shows up in the stream:
30.3.1.1.11 aFramesAbortedDueToXSColls
- High speed interfaces may use this counter as a general device discard counter.
- For IEEE 802.3 devices this counter must be equivalent to:
30.3.1.1.13 aCarrierSenseErrors
- For IEEE 802.3 devices possibly equivalent to:
30.3.2.1.4 aSQETestErrors
- For IEEE 802.3 devices this counter must be equivalent to:
30.3.1.1.10 aLateCollisions
π₯ SEE ALSO π₯
- Kernel file
./tools/include/uapi/linux/if_link.h Bridge enum definition(9)Bridge mode enum definition(9)Bridge port definition(9)(wait β nope, the source saysBridge port enum definition(9), so that's the one, bestie π )
that's the whole page, bestie π source/version is ./tools/include/uapi/linux, date is October 2026, and the page is struct rtnl_link_stats64(9). mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms