summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4bb5d88)
raw | patch | inline | side by side (parent: 4bb5d88)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Mon, 14 Aug 2006 09:04:16 +0000 (09:04 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Mon, 14 Aug 2006 09:04:16 +0000 (09:04 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1469 f882894a-f735-0410-b71e-b25c423dba1c
THANKS.in | patch | blob | history | |
plugins/check_disk.c | patch | blob | history |
diff --git a/THANKS.in b/THANKS.in
index 32935189574790226ee4f6c703ae36e872497b96..751c3b4975e4daea2ec31151b748f4085eb6ca17 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Allan Bennett
Ari Pollak
Lance Albertson
+Nathan Vonnahme
+Mike Emigh
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index e7a3b2161d01a501446bfab4a77f0017c118edd0..b546fd2ff9febd0971642d60579c3dcceb879124 100644 (file)
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
uintmax_t total, available, available_to_root, used;
double dfree_pct = -1, dused_pct = -1;
double dused_units, dfree_units, dtotal_units;
- double dused_inodes_percent;
+ double dused_inodes_percent, dfree_inodes_percent;
int temp_result;
struct mount_entry *me;
dfree_units = available*fsp.fsu_blocksize/mult;
dtotal_units = total*fsp.fsu_blocksize/mult;
dused_inodes_percent = calculate_percent(fsp.fsu_files - fsp.fsu_ffree, fsp.fsu_files);
+ dfree_inodes_percent = 100 - dused_inodes_percent;
if (verbose >= 3) {
printf ("For %s, used_pct=%g free_pct=%g used_units=%g free_units=%g total_units=%g used_inodes_pct=%g\n",
if (verbose >=3) printf("Usedinodes_percent result=%d\n", temp_result);
result = max_state( result, temp_result );
-
-
-
-
- /* Moved this computation up here so we can add it
- * to perf */
- inode_space_pct = (1 - dused_inodes_percent) * 100;
-
-
asprintf (&perf, "%s %s", perf,
perfdata ((!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
dused_units, units,
if (dused_inodes_percent < 0) {
asprintf(&output, "%s inode=-);", output);
} else {
- asprintf(&output, "%s inode=%.0f%%);", output, (1 - dused_inodes_percent) * 100);
+ asprintf(&output, "%s inode=%.0f%%);", output, dfree_inodes_percent );
}
}