+

Added performance data return

root [2011-01-17 16:07:17]
Added performance data return
Filename
check_mem
diff --git a/check_mem b/check_mem
index 1620d8a..6b292d4 100755
--- a/check_mem
+++ b/check_mem
@@ -66,6 +66,12 @@ then
 	[ $DEBUG -eq 1 ] && echo "Swap : $SU / $ST => $SR%"
 fi

+let MWV=MT*WM/100
+let MCV=MT*CM/100
+let SWV=ST*WS/100
+let SCV=ST*CS/100
+MSG="$MSG | mem=${MU}B;$MWV;$MCV;0;$MT swap=${SU}B;$SWV;$SCV;0;$ST"
+
 [ $RET -eq 2 ] && echo "CRITICAL - $MSG" && exit 2
 [ $RET -eq 1 ] && echo "WARNING - $MSG" && exit 1
 echo "OK - $MSG"
ViewGit