Update dsmon.sh
This commit is contained in:
22
dsmon.sh
22
dsmon.sh
@@ -243,7 +243,7 @@ CHECK(){
|
||||
|
||||
end=`date +%s`
|
||||
runtime=$((end-start))
|
||||
echo "runtime: ${runtime}"
|
||||
echo "Script Runtime: ${runtime}"
|
||||
}
|
||||
|
||||
SETUPSSH(){
|
||||
@@ -267,6 +267,8 @@ SETUPSSH(){
|
||||
}
|
||||
|
||||
RUNCMD(){
|
||||
start=`date +%s`
|
||||
|
||||
declare -A host_ip
|
||||
declare -A host_name
|
||||
|
||||
@@ -286,9 +288,17 @@ RUNCMD(){
|
||||
echo -e "${idsST[Bold]}${idsCL[Red]} ${host_name[$hostid]} - Timeout${idsCL[Default]}${idsST[Reset]}"
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
end=`date +%s`
|
||||
runtime=$((end-start))
|
||||
echo "Script Runtime: ${runtime}"
|
||||
echo
|
||||
}
|
||||
|
||||
GETCRONTABS(){
|
||||
GETCRONTABS(){
|
||||
start=`date +%s`
|
||||
|
||||
declare -A host_ip
|
||||
declare -A host_name
|
||||
|
||||
@@ -314,9 +324,17 @@ GETCRONTABS(){
|
||||
echo -e "${idsST[Bold]}${idsCL[Red]} ${host_name[$hostid]} - Timeout${idsCL[Default]}${idsST[Reset]}"
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
end=`date +%s`
|
||||
runtime=$((end-start))
|
||||
echo "Script Runtime: ${runtime}"
|
||||
echo
|
||||
|
||||
}
|
||||
GETCRONTAB(){
|
||||
crontab -l | sshpass -p${1} ssh -o 'StrictHostKeyChecking no' root@10.10.10.50 'cat > /opt/idssys/nodemgmt/crontabs/`hostname`.crontab'
|
||||
|
||||
}
|
||||
|
||||
case $action in
|
||||
|
||||
Reference in New Issue
Block a user