pub struct NetdevStats {
pub in_octets: Option<u64>,
pub out_octets: Option<u64>,
pub in_errors: Option<u64>,
pub out_errors: Option<u64>,
pub in_discards: Option<u64>,
pub out_discards: Option<u64>,
pub in_multicast_pkts: Option<u64>,
pub in_pkts: Option<u64>,
pub out_pkts: Option<u64>,
pub qdisc_backlog_bytes: Option<u64>,
pub qdisc_backlog_pkts: Option<u64>,
}Expand description
A network interface’s counters (#130), with RFC 8343’s names where Linux keeps exactly that counter and nothing else.
in_pkts and out_pkts are not RFC 8343’s: the RFC splits packets by
unicast, multicast and broadcast, Linux’s rx_packets includes multicast,
and Linux keeps no broadcast counter. They are here because an operator
asks for them; the registry says what they are.
Fields§
§in_octets: Option<u64>rx_bytes — RFC 8343 in-octets.
out_octets: Option<u64>tx_bytes — RFC 8343 out-octets.
in_errors: Option<u64>rx_errors — RFC 8343 in-errors.
out_errors: Option<u64>tx_errors — RFC 8343 out-errors.
in_discards: Option<u64>rx_dropped — RFC 8343 in-discards.
out_discards: Option<u64>tx_dropped — RFC 8343 out-discards.
in_multicast_pkts: Option<u64>multicast — RFC 8343 in-multicast-pkts.
in_pkts: Option<u64>rx_packets — not RFC 8343: unicast and multicast together.
out_pkts: Option<u64>tx_packets — not RFC 8343.
qdisc_backlog_bytes: Option<u64>Bytes queued in the interface’s queue discipline now, not yet sent (#136). Not a sysfs counter: read over netlink, and only from the kernel’s own interface. The queue an operator watches form when a bearer is slower than what is offered to it.
qdisc_backlog_pkts: Option<u64>Packets queued in the queue discipline now (#136).