[monitoring-plugins] check_swap: Fix unit for total in perfdata (#1779)

GitHub git at monitoring-plugins.org
Mon Jul 25 10:20:10 CEST 2022


    Module: monitoring-plugins
    Branch: master
    Commit: 3ad5fe9d84138da1451429bfac3b9b4024393d25
    Author: Lorenz <12514511+RincewindsHat at users.noreply.github.com>
 Committer: GitHub <noreply at github.com>
      Date: Mon Jul 25 10:11:43 2022 +0200
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=3ad5fe9

check_swap: Fix unit for total in perfdata (#1779)

* check_swap: Fix unit for total in perfdata

* Remove trailing whitespaces

---

 plugins/check_swap.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 6c9418f..ff58b15 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -1,30 +1,30 @@
 /*****************************************************************************
-* 
+*
 * Monitoring check_swap plugin
-* 
+*
 * License: GPL
 * Copyright (c) 2000 Karl DeBisschop (kdebisschop at users.sourceforge.net)
 * Copyright (c) 2000-2007 Monitoring Plugins Development Team
-* 
+*
 * Description:
-* 
+*
 * This file contains the check_swap plugin
-* 
-* 
+*
+*
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
-* 
+*
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
-* 
+*
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* 
+*
+*
 *****************************************************************************/
 
 const char *progname = "check_swap";
@@ -389,7 +389,7 @@ main (int argc, char **argv)
 	                TRUE, warn_print,
 	                TRUE, crit_print,
 	                TRUE, 0,
-	                TRUE, (long) total_swap_mb));
+	                TRUE, (long) total_swap_mb * 1024 * 1024));
 
 	return result;
 }



More information about the Commits mailing list