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 c10fc09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/collector/linux.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use once_cell::sync::Lazy;
use procfs::prelude::*;
use procfs::process::{LimitValue, Process};

use super::Metrics;
Expand All @@ -15,7 +16,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 c10fc09

Please sign in to comment.