diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2014-01-29 01:41:23 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2014-01-29 01:44:22 -0500 |
commit | 6f2d545244193432a6ad3d54185628b8f6a6091e (patch) | |
tree | 24a81b5dba14b0d64f08749123b4b2cfb69c5172 /plugins/check_swap.c | |
parent | cb99931e43a1da8c6cb3ff80e2561d4d5d34764f (diff) | |
download | monitoring-plugins-6f2d545244193432a6ad3d54185628b8f6a6091e.tar.gz |
Fix check_swap returning OK on & thresholds and no swap
Return 0% free instead of 100% free when total swap is 0
Diffstat (limited to 'plugins/check_swap.c')
-rw-r--r-- | plugins/check_swap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c index ce510e14..04256adf 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c @@ -350,7 +350,7 @@ main (int argc, char **argv) if(total_swap_mb) { percent_used = 100 * ((double) used_swap_mb) / ((double) total_swap_mb); } else { - percent_used = 0; + percent_used = 100; } result = max_state (result, check_swap (percent_used, free_swap_mb)); |