STRUCT ETHTOOL_RMON_STATS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ethtool_rmon_stats(9) β€” like, the RMON stats manual, bestie

okay so this is a page from the Kernel API Manual and it's all about struct ethtool_rmon_stats β€” which is literally just selected RMON (RFC 2819) statistics ✨ no cap, that's the whole name.


🌸 NAME 🌸

struct ethtool_rmon_stats β€” selected RMON (RFC 2819) statistics πŸŽ€


✨ SYNOPSIS ✨

here's the whole struct, bestie, look at it, it's giving structured data realness:

struct ethtool_rmon_stats {
    enum ethtool_mac_stats_src src;
    struct {
      u64 undersize_pkts;
      u64 oversize_pkts;
      u64 fragments;
      u64 jabbers;
      u64 hist[ETHTOOL_RMON_HIST_MAX];
      u64 hist_tx[ETHTOOL_RMON_HIST_MAX];
    };
 };

πŸ¦‹ Members πŸ¦‹

okay so let's go member by member, i got you:

  • src β€” this is the input field that says whether the stats should be queried from the eMAC or the pMAC (but only if the MM layer is supported, iykyk). Otherwise it's to be ignored. straight up, don't think about it.
  • {unnamed_struct} β€” it's anonymous. that's it. that's the whole vibe. πŸ™ˆ
  • undersize_pkts β€” equivalent to etherStatsUndersizePkts from the RFC. πŸ’–
  • oversize_pkts β€” equivalent to etherStatsOversizePkts from the RFC. πŸ’–
  • fragments β€” equivalent to etherStatsFragments from the RFC. πŸ’–
  • jabbers β€” equivalent to etherStatsJabbers from the RFC. (yes, jabbers. iconic name ngl.) πŸ’–
  • hist β€” packet counter for the packet length buckets, like etherStatsPkts128to255Octets from the RFC, fr fr. ⭐
  • hist_tx β€” Tx counters in a similar form to hist, but not defined in the RFC, so that's a little freestyle moment of its own. πŸ’…

🌈 Description 🌈

so this struct is a selection of RMON (RFC 2819) statistics which are not exposed via different APIs β€” mainly the packet-length-based counters, which is honestly the main character of the whole thing. πŸ‘‘

and here's the messy part: unfortunately, different designs choose different buckets beyond the 1024B mark (jumbo frame teritory β€” yes that's how it's spelled in the source, we're keeping it, no editing the lore 🫢), so the definition of the bucket ranges is left to the driver. like, driver's choice. driver's vibe check. driver's problem.

careful bestie: because the bucket ranges are driver-defined past 1024B, don't go assuming they're the same across hardware. that's not me being dramatic, that's just the manual. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

the whole extended friend group, no one left behind:


🌸 okay that's the page, hope you ate it up 🌸

this one lives in ./include/linux and it's dated October 2026, and the header up top is struct ethtool_rmon_stats(9) in case you forgot already lol. bye bestie, go read your ethtool headers πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from