From 1dae6acd9883e8e3608875006b489bce31659cb0 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Fri, 26 Mar 2021 11:31:25 +0100
Subject: [PATCH] update check_memory: set critical swap level from 5 to 50%

---
 check_memory | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/check_memory b/check_memory
index cb0fb16..7ebf17d 100755
--- a/check_memory
+++ b/check_memory
@@ -21,6 +21,7 @@
 # 2020-04-28  v1.2  <axel.hahn@iml.unibe.ch>  allow small swap usage before critical; update output RAM + Swap usage
 # 2020-07-08  v1.3  <axel.hahn@iml.unibe.ch> FIX: set "ph." instead "ps."
 # 2020-07-16  v1.4  <axel.hahn@iml.unibe.ch> FIX: add unit MB in the performance data (see #3939)
+# 2021-03-24  v1.5  <axel.hahn@iml.unibe.ch> increase Swap critical limit 5 --> 50
 # ======================================================================
 
 
@@ -52,7 +53,7 @@ if [ "$1" = "-h" ]; then
 
         -w  Warning level for RAM usage [%]; default: 75
         -c  Critical level for RAM usage; default: 90
-        -s  Critical level for SWAP usage; default: 5
+        -s  Critical level for SWAP usage; default: 50
         -h  this help
     "
     exit 0
@@ -61,7 +62,7 @@ fi
 # set default / override from command line params
 typeset -i iWarnLimit=`     ph.getValueWithParam 75 w "$@"`
 typeset -i iCriticalLimit=` ph.getValueWithParam 90 c "$@"`
-typeset -i iCriticalSwap=`  ph.getValueWithParam 5  s "$@"`
+typeset -i iCriticalSwap=`  ph.getValueWithParam 50 s "$@"`
 
 # --- RAM
 typeset -i ramTotal=`    getMemvalue MemTotal`
-- 
GitLab