Skip to content

Commit

Permalink
Follow procfs latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Oct 31, 2023
1 parent 1a5f1c1 commit 68786db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collector/linux.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use once_cell::sync::Lazy;
use procfs::process::{LimitValue, Process};
use procfs::process::{LimitValue, Process, WithCurrentSystemInfo as _};

use super::Metrics;

Expand All @@ -15,7 +15,7 @@ pub fn collect() -> Metrics {
Some(bts + ((stat.starttime as f64) / *TICKS_PER_SECOND) as u64);
}
metrics.cpu_seconds_total = Some((stat.utime + stat.stime) as f64 / *TICKS_PER_SECOND);
metrics.resident_memory_bytes = Some(stat.rss_bytes());
metrics.resident_memory_bytes = Some(stat.rss_bytes().get());
metrics.virtual_memory_bytes = Some(stat.vsize);
metrics.threads = Some(stat.num_threads as u64);
}
Expand Down

0 comments on commit 68786db

Please sign in to comment.