Update dsmon.sh
This commit is contained in:
6
dsmon.sh
6
dsmon.sh
@@ -28,6 +28,8 @@ RUN(){
|
|||||||
|
|
||||||
if [ "${ia}" = "sda1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
if [ "${ia}" = "sda1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||||
systempartition=true
|
systempartition=true
|
||||||
|
elif [ "${ia}" = "sda15" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||||
|
systempartition=true
|
||||||
elif [ "${ia}" = "sda2" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
elif [ "${ia}" = "sda2" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||||
systempartition=true
|
systempartition=true
|
||||||
elif [ "${ia}" = "shm" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
elif [ "${ia}" = "shm" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||||
@@ -41,14 +43,14 @@ RUN(){
|
|||||||
elif [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
elif [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||||
systempartition=true
|
systempartition=true
|
||||||
else
|
else
|
||||||
#echo "${ia};${ib};${ic}"
|
echo "${ia};${ib};${ic}"
|
||||||
DRIVE_INFO+=("${ia};${ib};${ic}")
|
DRIVE_INFO+=("${ia};${ib};${ic}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
QRY="USE servermonitor; INSERT INTO sysinfo (\`host\`, \`entry\`, \`value\`) VALUES ('${SERVERMON_ID}','hdd','${DRIVE_INFO[@]}');"
|
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}"
|
MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "${QRY}"
|
||||||
|
|
||||||
elif [ "${1}" = "sys" ]; then
|
elif [ "${1}" = "sys" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user