summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2007-01-07 07:14:04 +0000
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2007-01-07 07:14:04 +0000
commit6628ad263a49b7646a8fc41b60487dca17c8fa78 (patch)
treef765485799a7bce71930335078c9b725aae9c320
parent142b9da7c0b0c0b24cd3bbfbf42c4df165588869 (diff)
downloadmonitoring-plugins-6628ad263a49b7646a8fc41b60487dca17c8fa78.tar.gz
Fix bug #1627970: check_disk performance output for more then one partition
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1564 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_disk.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index ac86f4d2..99a7201e 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -164,8 +164,8 @@ main (int argc, char **argv)
164 double dfree_pct = -1, dused_pct = -1; 164 double dfree_pct = -1, dused_pct = -1;
165 double dused_units, dfree_units, dtotal_units; 165 double dused_units, dfree_units, dtotal_units;
166 double dused_inodes_percent, dfree_inodes_percent; 166 double dused_inodes_percent, dfree_inodes_percent;
167 double warning_high_tide = UINT_MAX; 167 double warning_high_tide;
168 double critical_high_tide = UINT_MAX; 168 double critical_high_tide;
169 int temp_result; 169 int temp_result;
170 170
171 struct mount_entry *me; 171 struct mount_entry *me;
@@ -300,6 +300,11 @@ main (int argc, char **argv)
300 Hack here. Trying to get warn/crit levels from freespace_(units|percent) for perf 300 Hack here. Trying to get warn/crit levels from freespace_(units|percent) for perf
301 data. Assumption that start=0. Roll on new syntax... 301 data. Assumption that start=0. Roll on new syntax...
302 */ 302 */
303
304 /* *_high_tide must be reinitialized at each run */
305 warning_high_tide = UINT_MAX;
306 critical_high_tide = UINT_MAX;
307
303 if (path->freespace_units->warning != NULL) { 308 if (path->freespace_units->warning != NULL) {
304 warning_high_tide = dtotal_units - path->freespace_units->warning->end; 309 warning_high_tide = dtotal_units - path->freespace_units->warning->end;
305 } 310 }