Update dsmon.sh

This commit is contained in:
2025-06-01 23:10:13 -05:00
parent 18b662f2e4
commit e130c9c814

View File

@@ -56,7 +56,7 @@ 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}');"
MYSQL_PWD="sysmoninsert" ${mysqlcmd} ${mysql_conn} -u sysmoninsert -e "${QRY}"
fi