+

viewgit/inc/functions.php:74 Function create_function() is deprecated [8192]

Fix memory used detection

Benjamin Renard [2021-09-16 15:34:53]
Fix memory used detection
Filename
check_mem
diff --git a/check_mem b/check_mem
index 3ed6691..881e691 100755
--- a/check_mem
+++ b/check_mem
@@ -26,7 +26,7 @@ RET=0
 MSG=""

 MT=`free -b|grep Mem|awk '{print $2}'`
-MU=`free -b|grep Mem|awk '{print $3-$7}'`
+MU=`free -b|grep Mem|awk '{print $3}'`
 if [ "$MT" == "0" -o "$MT" == "" ]
 then
 	echo "CRITICAL - Can't read memory informations"
ViewGit