Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions bottlecap/src/proc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use constants::{
PROC_NET_DEV_PATH, PROC_PATH, PROC_STAT_PATH, PROC_UPTIME_PATH,
};
use regex::Regex;
use tracing::{debug, trace};
use tracing::debug;

#[must_use]
pub fn get_pid_list() -> Vec<i64> {
Expand Down Expand Up @@ -258,14 +258,9 @@ fn get_fd_use_data_from_path(path: &str, pids: &[i64]) -> f64 {
for &pid in pids {
let fd_path = format!("{path}/{pid}/fd");
let Ok(files) = fs::read_dir(&fd_path) else {
trace!(
"File descriptor use data not found in path {} with pid {}",
fd_path, pid
);
continue;
};
let count = files.count();
fd_use += count;
fd_use += files.count();
}

fd_use as f64
Expand Down
Loading