diff options
Diffstat (limited to 'plugins/check_disk.c')
| -rw-r--r-- | plugins/check_disk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 476c8922..99a7201e 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
| @@ -306,16 +306,16 @@ main (int argc, char **argv) | |||
| 306 | critical_high_tide = UINT_MAX; | 306 | critical_high_tide = UINT_MAX; |
| 307 | 307 | ||
| 308 | if (path->freespace_units->warning != NULL) { | 308 | if (path->freespace_units->warning != NULL) { |
| 309 | warning_high_tide = path->freespace_units->warning->end; | 309 | warning_high_tide = dtotal_units - path->freespace_units->warning->end; |
| 310 | } | 310 | } |
| 311 | if (path->freespace_percent->warning != NULL) { | 311 | if (path->freespace_percent->warning != NULL) { |
| 312 | warning_high_tide = abs( min( (double) warning_high_tide, (double) path->freespace_percent->warning->end/100*dtotal_units )); | 312 | warning_high_tide = abs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)*dtotal_units )); |
| 313 | } | 313 | } |
| 314 | if (path->freespace_units->critical != NULL) { | 314 | if (path->freespace_units->critical != NULL) { |
| 315 | critical_high_tide = path->freespace_units->critical->end; | 315 | critical_high_tide = dtotal_units - path->freespace_units->critical->end; |
| 316 | } | 316 | } |
| 317 | if (path->freespace_percent->critical != NULL) { | 317 | if (path->freespace_percent->critical != NULL) { |
| 318 | critical_high_tide = abs( min( (double) critical_high_tide, (double) path->freespace_percent->critical->end/100*dtotal_units )); | 318 | critical_high_tide = abs( min( (double) critical_high_tide, (double) (1.0 - path->freespace_percent->critical->end/100)*dtotal_units )); |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | asprintf (&perf, "%s %s", perf, | 321 | asprintf (&perf, "%s %s", perf, |
