STRUCT ETHTOOL_PHY_STATS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ethtool_phy_stats(9) πŸ’…

okay bestie, this is the struct ethtool_phy_stats(9) page from the Kernel API Manual, and it's literally all about PHY-level stats counters. no cap, let's get into it 🫢


✨ NAME ✨

struct ethtool_phy_stats β€” PHY-level statistics counters


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole struct vibe, copy-paste exact:

struct ethtool_phy_stats {
    u64 rx_packets;
    u64 rx_bytes;
    u64 rx_errors;
    u64 tx_packets;
    u64 tx_bytes;
    u64 tx_errors;
 };

🌸 Members 🌸

  • rx_packets β€” total successfully received frames ✨
  • rx_bytes β€” total successfully received bytes πŸ’–
  • rx_errors β€” total received frames with errors (like, e.g., CRC errors β€” classic πŸ’€)
  • tx_packets β€” total successfully transmitted frames πŸ¦‹
  • tx_bytes β€” total successfully transmitted bytes 🌈
  • tx_errors β€” total transmitted frames with errors πŸ™ˆ

πŸ’« Description πŸ’«

so this structure is the standardized interface for reporting PHY-level statistics counters. that's the whole main character energy of it.

it's designed to expose stats that PHYs commonly provide but that are not explicitly defined in the IEEE 802.3 standard. iykyk β€” it's giving "we made a struct for the stuff the spec forgot" πŸ’…


πŸ”— SEE ALSO πŸ”—

the kernel file ./include/linux/ethtool.h is over here too, and it's basically a whole friend group of references:


sign-off time, bestie πŸŽ€ this page's source is ./include/linux, it's part of the Kernel API Manual, and it's dated October 2026. struct ethtool_phy_stats(9) forever, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from