valpackett / systemstat

Rust library for getting system information | also on https://codeberg.org/valpackett/systemstat
https://crates.io/crates/systemstat
The Unlicense
610 stars 71 forks source link

Parsing error for socket statistic #78

Closed fbucek closed 3 years ago

fbucek commented 3 years ago

I am calling socket stat exactly like in examples

match sys.socket_stats() {
    Ok(stats) => trace!("\nSystem socket statistics: {:?}", stats),
    Err(x) => error!("\nSystem socket statistics: error: {}", x.to_string()),
}

It is runnning on ARM ( raspberry pi 4 ) and it worked correctly, but suddenly it gives this Parsing Error

Parsing Error: Error { input: "\nTCP: inuse 7 orphan 0 tw 5 alloc 12 mem 0\nUDP: inuse 3 mem 3\nUDPLITE: inuse 0\nRAW: inuse 0\nFRAG: inuse 0 memory 0\n", code: Tag }

Using this version:

[[package]]
name = "systemstat"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1f726379f0c746ad672b7e932bd390b5faae073f502e37d314950ced761ac3e"
valpackett commented 3 years ago

@shssoichiro ping

shssoichiro commented 3 years ago

Can you test this with the latest version in git? I'd like to verify if this may have been fixed by https://github.com/myfreeweb/systemstat/pull/77

valpackett commented 3 years ago

77 doesn't look like it touches the socket one

fbucek commented 3 years ago

Unfortunatelly I do not know how to test it is because I saw it in logs and now I do not see that. So I do know what caused it and how to reproduce it :(