update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS=2.2.34-10092023
|
||||
VERS=2.2.36-11012023
|
||||
|
||||
DS_FOLDER=/opt/idssys/dsmon
|
||||
DS_CRONTAB_FOLDER=/opt/idssys/nodemgmt/crontabs
|
||||
|
||||
8
dsmon.sh
8
dsmon.sh
@@ -28,6 +28,8 @@ RUN(){
|
||||
|
||||
if [ "${ia}" = "sda1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${ia}" = "sda14" ] && [ ${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
|
||||
@@ -43,14 +45,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
|
||||
@@ -157,6 +159,8 @@ CHECK(){
|
||||
|
||||
if [ "${dname}" = "sda1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${dname}" = "sda14" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${dname}" = "sda15" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${dname}" = "sda2" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
|
||||
Reference in New Issue
Block a user