STRUCT ETHTOOL_PHY_STATS(9)
π 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:
enum ethtool_phys_id_state(9)struct kernel_ethtool_ringparam(9)enum ethtool_supported_ring_param(9)ethtool_rxfh_indir_default(9)struct ethtool_rxfh_context(9)ethtool_link_ksettings_zero_link_mode(9)ethtool_link_ksettings_add_link_mode(9)ethtool_link_ksettings_del_link_mode(9)ethtool_link_ksettings_test_link_mode(9)ethtool_intersect_link_masks(9)struct ethtool_pause_stats(9)struct ethtool_fec_hist_range(9)struct ethtool_fec_stats(9)struct ethtool_rmon_hist_range(9)struct ethtool_rmon_stats(9)struct ethtool_ts_stats(9)struct ethtool_module_eeprom(9)struct ethtool_module_power_mode_params(9)struct ethtool_mm_state(9)struct ethtool_mm_cfg(9)struct ethtool_mm_stats(9)struct ethtool_mmsv_ops(9)struct ethtool_mmsv(9)struct ethtool_rxfh_param(9)struct ethtool_rxfh_fields(9)struct kernel_ethtool_ts_info(9)struct ethtool_ops(9)struct ethtool_netdev_state(9)struct ethtool_phy_ops(9)ethtool_set_ethtool_phy_ops(9)ethtool_params_from_link_mode(9)ethtool_get_phc_vclocks(9)ethtool_mm_frag_size_add_to_min(9)ethtool_mm_frag_size_min_to_add(9)ethtool_get_ts_info_by_layer(9)ethtool_sprintf(9)ethtool_puts(9)ethtool_cpy(9)
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
- 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