Trait tikv_util::sys::NetworkExt [−][src]
Getting volume of received and transmitted data.
Required methods
pub fn get_received(&self) -> u64
[src]
Returns the number of received bytes since the last refresh.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("in: {} B", network.get_received()); }
pub fn get_total_received(&self) -> u64
[src]
Returns the total number of received bytes.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("in: {} B", network.get_total_received()); }
pub fn get_transmitted(&self) -> u64
[src]
Returns the number of transmitted bytes since the last refresh.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("out: {} B", network.get_transmitted()); }
pub fn get_total_transmitted(&self) -> u64
[src]
Returns the total number of transmitted bytes.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("out: {} B", network.get_total_transmitted()); }
pub fn get_packets_received(&self) -> u64
[src]
Returns the number of incoming packets since the last refresh.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("in: {}", network.get_packets_received()); }
pub fn get_total_packets_received(&self) -> u64
[src]
Returns the total number of incoming packets.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("in: {}", network.get_total_packets_received()); }
pub fn get_packets_transmitted(&self) -> u64
[src]
Returns the number of outcoming packets since the last refresh.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("out: {}", network.get_packets_transmitted()); }
pub fn get_total_packets_transmitted(&self) -> u64
[src]
Returns the total number of outcoming packets.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("out: {}", network.get_total_packets_transmitted()); }
pub fn get_errors_on_received(&self) -> u64
[src]
Returns the number of incoming errors since the last refresh.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("in: {}", network.get_errors_on_received()); }
pub fn get_total_errors_on_received(&self) -> u64
[src]
Returns the total number of incoming errors.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("in: {}", network.get_total_errors_on_received()); }
pub fn get_errors_on_transmitted(&self) -> u64
[src]
Returns the number of outcoming errors since the last refresh.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("out: {}", network.get_errors_on_transmitted()); }
pub fn get_total_errors_on_transmitted(&self) -> u64
[src]
Returns the total number of outcoming errors.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("out: {}", network.get_total_errors_on_transmitted()); }