summaryrefslogtreecommitdiffstats
path: root/lib/utils_disk.h
diff options
context:
space:
mode:
authorMatthias Eble <psychotrahe@users.sourceforge.net>2010-11-15 22:59:35 (GMT)
committerMatthias Eble <psychotrahe@users.sourceforge.net>2010-11-15 22:59:35 (GMT)
commit77f2c84d2f599d86a60586494169dcab17853e3a (patch)
treee964e05b70aff5f5b9ee7ff457b7c165db5f66aa /lib/utils_disk.h
parent896962a1ad1b7d7c75d42c565b06cc799feb0a7c (diff)
downloadmonitoring-plugins-77f2c84d2f599d86a60586494169dcab17853e3a.tar.gz
Fix check_disk free space calculation if blocksizes differ within a disk group (Bekar - #2973603)
Various values (dused_pct, dfree_pct, inodes_free, inodes_total, ...) are now carried in the parameter_list structure. Assignments have been moved to a subroutine preventing code redundancies. Group metrics are now calculated based on units rather than blocks. This fixes freespace calculation when blocksizes differ within a group.
Diffstat (limited to 'lib/utils_disk.h')
-rw-r--r--lib/utils_disk.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/utils_disk.h b/lib/utils_disk.h
index f99b905..83a3763 100644
--- a/lib/utils_disk.h
+++ b/lib/utils_disk.h
@@ -24,6 +24,10 @@ struct parameter_list
24 char *group; 24 char *group;
25 struct mount_entry *best_match; 25 struct mount_entry *best_match;
26 struct parameter_list *name_next; 26 struct parameter_list *name_next;
27 uintmax_t total, available, available_to_root, used, inodes_free, inodes_total;
28 double dfree_pct, dused_pct;
29 double dused_units, dfree_units, dtotal_units;
30 double dused_inodes_percent, dfree_inodes_percent;
27}; 31};
28 32
29void np_add_name (struct name_list **list, const char *name); 33void np_add_name (struct name_list **list, const char *name);