Update dsmon.sh

This commit is contained in:
2023-11-01 22:16:15 -05:00
parent a7dbd1a1f2
commit cb15c51ad7

View File

@@ -28,6 +28,8 @@ RUN(){
if [ "${ia}" = "sda1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
systempartition=true
elif [ "${ia}" = "sda15" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
systempartition=true
elif [ "${ia}" = "sda2" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
systempartition=true
elif [ "${ia}" = "shm" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
@@ -41,14 +43,14 @@ RUN(){
elif [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
systempartition=true
else
#echo "${ia};${ib};${ic}"
echo "${ia};${ib};${ic}"
DRIVE_INFO+=("${ia};${ib};${ic}")
fi
done
QRY="USE servermonitor; INSERT INTO sysinfo (\`host\`, \`entry\`, \`value\`) VALUES ('${SERVERMON_ID}','hdd','${DRIVE_INFO[@]}');"
# echo $QRY
echo $QRY
MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "${QRY}"
elif [ "${1}" = "sys" ]; then