diff options
author | Björn Berg <32747776+MisterMountain@users.noreply.github.com> | 2023-05-02 07:31:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 07:31:32 (GMT) |
commit | e14f1ad7c35504b97f81b1b33a5533e57c605fc2 (patch) | |
tree | a59d292d928c123ad862776f344918035466c817 /plugins/check_disk.c | |
parent | 3dc677e4f1f990e7b26bc714a02608070379cf85 (diff) | |
parent | a4be133f01a231dc45c98aabed35f96d6f826fd7 (diff) | |
download | monitoring-plugins-e14f1ad7c35504b97f81b1b33a5533e57c605fc2.tar.gz |
Merge branch 'monitoring-plugins:master' into fix_version_return_code
Diffstat (limited to 'plugins/check_disk.c')
-rw-r--r-- | plugins/check_disk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index bd84c82..a99f35e 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -587,7 +587,7 @@ process_arguments (int argc, char **argv) | |||
587 | 587 | ||
588 | /* Awful mistake where the range values do not make sense. Normally, | 588 | /* Awful mistake where the range values do not make sense. Normally, |
589 | you alert if the value is within the range, but since we are using | 589 | you alert if the value is within the range, but since we are using |
590 | freespace, we have to alert if outside the range. Thus we artifically | 590 | freespace, we have to alert if outside the range. Thus we artificially |
591 | force @ at the beginning of the range, so that it is backwards compatible | 591 | force @ at the beginning of the range, so that it is backwards compatible |
592 | */ | 592 | */ |
593 | case 'c': /* critical threshold */ | 593 | case 'c': /* critical threshold */ |
@@ -1115,7 +1115,7 @@ get_path_stats (struct parameter_list *p, struct fs_usage *fsp) { | |||
1115 | p->available_to_root = fsp->fsu_bfree; | 1115 | p->available_to_root = fsp->fsu_bfree; |
1116 | p->used = fsp->fsu_blocks - fsp->fsu_bfree; | 1116 | p->used = fsp->fsu_blocks - fsp->fsu_bfree; |
1117 | if (freespace_ignore_reserved) { | 1117 | if (freespace_ignore_reserved) { |
1118 | /* option activated : we substract the root-reserved space from the total */ | 1118 | /* option activated : we subtract the root-reserved space from the total */ |
1119 | p->total = fsp->fsu_blocks - p->available_to_root + p->available; | 1119 | p->total = fsp->fsu_blocks - p->available_to_root + p->available; |
1120 | } else { | 1120 | } else { |
1121 | /* default behaviour : take all the blocks into account */ | 1121 | /* default behaviour : take all the blocks into account */ |
@@ -1130,7 +1130,7 @@ get_path_stats (struct parameter_list *p, struct fs_usage *fsp) { | |||
1130 | p->inodes_free_to_root = fsp->fsu_ffree; /* Free file nodes for root. */ | 1130 | p->inodes_free_to_root = fsp->fsu_ffree; /* Free file nodes for root. */ |
1131 | p->inodes_used = fsp->fsu_files - fsp->fsu_ffree; | 1131 | p->inodes_used = fsp->fsu_files - fsp->fsu_ffree; |
1132 | if (freespace_ignore_reserved) { | 1132 | if (freespace_ignore_reserved) { |
1133 | /* option activated : we substract the root-reserved inodes from the total */ | 1133 | /* option activated : we subtract the root-reserved inodes from the total */ |
1134 | /* not all OS report fsp->fsu_favail, only the ones with statvfs syscall */ | 1134 | /* not all OS report fsp->fsu_favail, only the ones with statvfs syscall */ |
1135 | /* for others, fsp->fsu_ffree == fsp->fsu_favail */ | 1135 | /* for others, fsp->fsu_ffree == fsp->fsu_favail */ |
1136 | p->inodes_total = fsp->fsu_files - p->inodes_free_to_root + p->inodes_free; | 1136 | p->inodes_total = fsp->fsu_files - p->inodes_free_to_root + p->inodes_free; |