Skip to main content

Module net

Module net 

Source
Expand description

Network throughput per interface, from /proc/net/dev (SRD-118 §3.6).

Structs§

NetCounters
One interface’s cumulative byte counters.
NetRate
What one interface received and sent over a sample window.

Functions§

net_rates
Each interface’s throughput between two snapshots dt_s apart, for the interfaces in both. An interface that has never carried a byte is left out, so an unused one makes no series.
parse_net_dev
Every interface’s cumulative counters but the loopback’s. A line is iface: <8 receive fields> <8 transmit fields>; bytes are the first field of each half.
read_net_dev
Read /proc/net/dev. Empty when it cannot be read.