diff options
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 7841c14..8759619 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -112,7 +112,7 @@ enum | |||
112 | int process_arguments (int, char **); | 112 | int process_arguments (int, char **); |
113 | void print_path (const char *mypath); | 113 | void print_path (const char *mypath); |
114 | int validate_arguments (uintmax_t, uintmax_t, double, double, char *); | 114 | int validate_arguments (uintmax_t, uintmax_t, double, double, char *); |
115 | int check_disk (double usp, uintmax_t free_disk); | 115 | int check_disk (double usp, double free_disk); |
116 | int walk_name_list (struct name_list *list, const char *name); | 116 | int walk_name_list (struct name_list *list, const char *name); |
117 | void print_help (void); | 117 | void print_help (void); |
118 | void print_usage (void); | 118 | void print_usage (void); |
@@ -187,7 +187,7 @@ main (int argc, char **argv) | |||
187 | 187 | ||
188 | if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) { | 188 | if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) { |
189 | usp = (double)(fsp.fsu_blocks - fsp.fsu_bavail) * 100 / fsp.fsu_blocks; | 189 | usp = (double)(fsp.fsu_blocks - fsp.fsu_bavail) * 100 / fsp.fsu_blocks; |
190 | disk_result = check_disk (usp, fsp.fsu_bavail * fsp.fsu_blocksize); | 190 | disk_result = check_disk (usp, (double)(fsp.fsu_bavail * fsp.fsu_blocksize / mult)); |
191 | result = max_state (disk_result, result); | 191 | result = max_state (disk_result, result); |
192 | psize = fsp.fsu_blocks*fsp.fsu_blocksize/mult; | 192 | psize = fsp.fsu_blocks*fsp.fsu_blocksize/mult; |
193 | asprintf (&perf, "%s %s", perf, | 193 | asprintf (&perf, "%s %s", perf, |
@@ -525,7 +525,7 @@ INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be greate | |||
525 | 525 | ||
526 | 526 | ||
527 | int | 527 | int |
528 | check_disk (double usp, uintmax_t free_disk) | 528 | check_disk (double usp, double free_disk) |
529 | { | 529 | { |
530 | int result = STATE_UNKNOWN; | 530 | int result = STATE_UNKNOWN; |
531 | /* check the percent used space against thresholds */ | 531 | /* check the percent used space against thresholds */ |
@@ -585,11 +585,11 @@ and generates an alert if free space is less than one of the threshold values.") | |||
585 | 585 | ||
586 | printf (_("\ | 586 | printf (_("\ |
587 | -w, --warning=INTEGER\n\ | 587 | -w, --warning=INTEGER\n\ |
588 | Exit with WARNING status if less than INTEGER kilobytes of disk are free\n\ | 588 | Exit with WARNING status if less than INTEGER --units of disk are free\n\ |
589 | -w, --warning=PERCENT%%\n\ | 589 | -w, --warning=PERCENT%%\n\ |
590 | Exit with WARNING status if less than PERCENT of disk space is free\n\ | 590 | Exit with WARNING status if less than PERCENT of disk space is free\n\ |
591 | -c, --critical=INTEGER\n\ | 591 | -c, --critical=INTEGER\n\ |
592 | Exit with CRITICAL status if less than INTEGER kilobytes of disk are free\n\ | 592 | Exit with CRITICAL status if less than INTEGER --units of disk are free\n\ |
593 | -c, --critical=PERCENT%%\n\ | 593 | -c, --critical=PERCENT%%\n\ |
594 | Exit with CRITCAL status if less than PERCENT of disk space is free\n\ | 594 | Exit with CRITCAL status if less than PERCENT of disk space is free\n\ |
595 | -C, --clear\n\ | 595 | -C, --clear\n\ |