summaryrefslogtreecommitdiffstats
path: root/plugins/t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t')
0 files changed, 0 insertions, 0 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 1778b61..71eab53 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -334,19 +334,21 @@ main (int argc, char **argv)
334 334
335 /* *_high_tide must be reinitialized at each run */ 335 /* *_high_tide must be reinitialized at each run */
336 uint64_t warning_high_tide = UINT64_MAX; 336 uint64_t warning_high_tide = UINT64_MAX;
337 uint64_t critical_high_tide = UINT64_MAX;
338 337
339 if (path->freespace_units->warning != NULL) { 338 if (path->freespace_units->warning != NULL) {
340 warning_high_tide = path->dtotal_units - path->freespace_units->warning->end; 339 warning_high_tide = (path->dtotal_units - path->freespace_units->warning->end) * mult;
341 } 340 }
342 if (path->freespace_percent->warning != NULL) { 341 if (path->freespace_percent->warning != NULL) {
343 warning_high_tide = llabs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)* path->dtotal_units )); 342 warning_high_tide = min( warning_high_tide, (uint64_t)((1.0 - path->freespace_percent->warning->end/100) * (path->dtotal_units * mult)) );
344 } 343 }
344
345 uint64_t critical_high_tide = UINT64_MAX;
346
345 if (path->freespace_units->critical != NULL) { 347 if (path->freespace_units->critical != NULL) {
346 critical_high_tide = path->dtotal_units - path->freespace_units->critical->end; 348 critical_high_tide = (path->dtotal_units - path->freespace_units->critical->end) * mult;
347 } 349 }
348 if (path->freespace_percent->critical != NULL) { 350 if (path->freespace_percent->critical != NULL) {
349 critical_high_tide = llabs( min( (double) critical_high_tide, (double) (1.0 - path->freespace_percent->critical->end/100)*path->dtotal_units )); 351 critical_high_tide = min( critical_high_tide, (uint64_t)((1.0 - path->freespace_percent->critical->end/100) * (path->dtotal_units * mult)) );
350 } 352 }
351 353
352 /* Nb: *_high_tide are unset when == UINT64_MAX */ 354 /* Nb: *_high_tide are unset when == UINT64_MAX */
@@ -354,8 +356,8 @@ main (int argc, char **argv)
354 perfdata_uint64 ( 356 perfdata_uint64 (
355 (!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir, 357 (!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
356 path->dused_units * mult, "B", 358 path->dused_units * mult, "B",
357 (warning_high_tide == UINT64_MAX ? FALSE : TRUE), warning_high_tide * mult, 359 (warning_high_tide == UINT64_MAX ? FALSE : TRUE), warning_high_tide,
358 (critical_high_tide == UINT64_MAX ? FALSE : TRUE), critical_high_tide * mult, 360 (critical_high_tide == UINT64_MAX ? FALSE : TRUE), critical_high_tide,
359 TRUE, 0, 361 TRUE, 0,
360 TRUE, path->dtotal_units * mult)); 362 TRUE, path->dtotal_units * mult));
361 363