diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-01-07 07:14:04 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-01-07 07:14:04 +0000 |
commit | 6628ad263a49b7646a8fc41b60487dca17c8fa78 (patch) | |
tree | f765485799a7bce71930335078c9b725aae9c320 | |
parent | 142b9da7c0b0c0b24cd3bbfbf42c4df165588869 (diff) | |
download | monitoring-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.c | 9 |
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) double dfree_pct = -1, dused_pct = -1; double dused_units, dfree_units, dtotal_units; double dused_inodes_percent, dfree_inodes_percent; - double warning_high_tide = UINT_MAX; - double critical_high_tide = UINT_MAX; + double warning_high_tide; + double critical_high_tide; int temp_result; struct mount_entry *me; @@ -300,6 +300,11 @@ main (int argc, char **argv) Hack here. Trying to get warn/crit levels from freespace_(units|percent) for perf data. Assumption that start=0. Roll on new syntax... */ + + /* *_high_tide must be reinitialized at each run */ + warning_high_tide = UINT_MAX; + critical_high_tide = UINT_MAX; + if (path->freespace_units->warning != NULL) { warning_high_tide = dtotal_units - path->freespace_units->warning->end; } |