Function proc_sys_parser::block::read
source · pub fn read() -> Result<SysBlock, ProcSysParserError>Expand description
The main function for building a SysBlock struct with current data.
This uses the Builder pattern, which allows settings such as the filename to specified.
Examples found in repository?
examples/obtain_data.rs (line 28)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
fn main()
{
let stat = stat::read();
println!("{:?}", stat);
let schedstat = schedstat::read();
println!("{:?}", schedstat);
let diskstats = diskstats::read();
println!("{:?}", diskstats);
let net_dev = net_dev::read();
println!("{:?}", net_dev);
let meminfo = meminfo::read();
println!("{:?}", meminfo);
let block = block::read();
println!("{:?}", block);
let vmstat = vmstat::read();
println!("{:?}", vmstat);
let loadavg = loadavg::read();
println!("{:?}", loadavg);
let pressure = pressure::read();
println!("{:?}", pressure);
}