If you want to monitor vos3000 services and start if vos3000 services stop .VOS3000 version 2.1.2.0 is stop after some time so you can monitor the vos3000 services and start it . Here I am using three shell scripts to monitor to vos3000 service and start it. I am checking vos3000 service every 5 second and if stops I am starting with a script and send email alert.
1- I have created watchdog script to check mbx3000d service and send email alert
Linux# nano /etc/voscheck.sh
#!/bin/bash
#
# watchdog
NAME=mbx3000
START=/etc/mbx3000.sh
NOTIFY=your-email-address
NOTIFYCC=your-email-address
GREP=/bin/grep
PS=/bin/ps
NOP=/bin/true
DATE=/bin/date
MAIL=/bin/mail
RM=/bin/rm
$PS -ef|$GREP -v grep|$GREP $NAME >/dev/null 2>&1
case “$?” in
0)
# It is running in this case so we do nothing.
$NOP
;;
1)
echo “$NAME is NOT RUNNING. Starting $NAME and sending notices.”
$START 2>&1 >/dev/null &
NOTICE=/tmp/watchdog.txt
echo “$NAME was not running and was started on `$DATE`” > $NOTICE
$MAIL -n -s “watchdog notice” -c $NOTIFYCC $NOTIFY < $NOTICE
$RM -f $NOTICE
;;
esac
exit
2- create script for start mbx3000 service
Linux# nano /etc/mbx3000.sh
#!/bin/bash
service mbx3000d start
3- check service every 5 second
Linux# nano /etc/check5.sh
#!/bin/bash
while true
do
/etc/voscheck.sh
sleep 5
done
4-execute the script in background
Linux# nohup /etc/check5.sh &
Just want to say your article is as astounding.
The clarity for your publish is just great and i could assume you’re knowledgeable
on this subject. Well along with your permission allow me to seize your RSS
feed to keep up to date with forthcoming post. Thanks one million and
please continue the rewarding work.
Hi,
MBX auto start script was applied many times before by many Chinese 5-6 years back but they never use this as this is a wrong way to sort this out, as each time the MBX crash all call will be running in vendor side if the calls run in signalling mode but the VOS which will be crashed or mbx will stop he will not able to make any billing as as his server is down, so end of the day there will be big billing disputes and if this happen multiple time everyday then each day the loss can be 100-1000 USD, so its not a good solution because client will never know even why he is not getting right billing match with vendor and client! if client start manually at least he will know something happening and he can use media proxy in those bad times when chinese attacks, or client should use better FIREWALL solution to prevent it.
Thanks
Hello,
I tried a lotz in many different ways. But it never works, I did everything never script run nor it act. The VOS 2.1.2.0 gets offline by itself but at that moment script don’t show it’s miracle then need to restart the mbx by manually through putty command. Can you please advice and give the actual details with files which I will really appreciate as suffering so much with this offline headache. KINDLY SAVE AND YOU WILL BE BLESSED!