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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user