Update dsmon.sh

This commit is contained in:
2025-06-01 23:10:41 -05:00
parent e130c9c814
commit fef1551184

View File

@@ -58,6 +58,7 @@ RUN(){
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