Update dsmon.sh
This commit is contained in:
4
dsmon.sh
4
dsmon.sh
@@ -56,9 +56,9 @@ RUN(){
|
||||
|
||||
MEMORY=$(free -m | awk 'NR==2{printf "%.2f\t\t", $3*100/$2 }')
|
||||
CPU=$(top -bn1 | grep load | awk '{printf "%.2f\t\t\n", $(NF-2)}')
|
||||
echo "HERE: $MEMORY - $CPU"
|
||||
|
||||
QRY="USE servermonitor; INSERT INTO sysinfo (\`host\`, \`entry\`, \`value\`) VALUES ('${SERVERMON_ID}','sys','${CPU// /};${MEMORY// /}');"
|
||||
echo $QRY
|
||||
|
||||
MYSQL_PWD="sysmoninsert" ${mysqlcmd} ${mysql_conn} -u sysmoninsert -e "${QRY}"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user