Function proc_sys_parser::stat::read

source ·
pub fn read() -> ProcStat
Expand description

The main function for building a ProcStat 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 10)
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);
}