Skip to content

Commit

Permalink
Debug inodes
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaigalos committed Feb 10, 2022
1 parent a5cdcf1 commit d8be3f9
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,22 @@ impl Stats {
let percent_inodes = used_inodes as f64 / total_inodes as f64;

if args.is_present("debug") {
println!(
"{} blocks: {} fragment_size: {} size: {} free: {} available: {}",
fs,
statvfs.blocks(),
statvfs.fragment_size(),
size_disk,
free_disk,
available_disk
);
if !args.is_present("inodes") {
println!(
"{} blocks: {} fragment_size: {} size: {} free: {} available: {}",
fs,
statvfs.blocks(),
statvfs.fragment_size(),
size_disk,
free_disk,
available_disk
);
} else {
println!(
"{} total_inodes: {} iused: {} ifree: {} iused%: {}",
fs, total_inodes, used_inodes, available_inodes, percent_inodes
);
}
}
Stats {
filesystem: fs.to_string(),
Expand Down

0 comments on commit d8be3f9

Please sign in to comment.