[monitoring-plugins] Improving output when swap space has zero size

Jan Wagner git at monitoring-plugins.org
Sun Oct 19 23:40:08 CEST 2014


 Module: monitoring-plugins
 Branch: master
 Commit: 40c870ed3aeb5971af7d4887bbf4c68da40805b5
 Author: Jan Wagner <waja at cyconet.org>
   Date: Sun Oct 19 22:58:47 2014 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=40c870e

Improving output when swap space has zero size

---

 plugins/check_swap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 4a573c7..25e0bac 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -352,6 +352,7 @@ main (int argc, char **argv)
 		percent_used = 100 * ((double) used_swap_mb) / ((double) total_swap_mb);
 	} else {
 		percent_used = 100;
+		status = "- Swap is either disabled, not present, or of zero size. ";
 	}
 
 	result = max_state (result, check_swap (percent_used, free_swap_mb));



More information about the Commits mailing list