pub fn totals() -> Result<Totals>Expand description
Bytes and packets moved since boot, every interface but loopback: one read, no waiting. Counters are 64-bit on every platform. Inside a container they are the container’s network namespace.
let total = sys_lib::net::totals()?;
println!("since boot: {} received, {} sent", total.received, total.sent);§Errors
NotFound when the counters are hidden; Malformed; Os.