diff options
-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 ac86f4d..99a7201 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 | } |