tx0
10-01-2010, 09:49 PM
Hello.
Multicas is not OK on hop 2 these days. Some may say 'What do you expect from hop 2 anyway'?.. I've made a watch script that should be started from cron every minute, it does some checks and restarts multicas if needed. Also it handles blue LED.
#!/bin/sh
PATH=/bin:/usr/bin:/MMP/usr/bin
#12000 is your server port
date=`date`
IFRUNMCAS=`cat /EMU/OpenXCAS/module.seq | grep -i ^MultiCAS | wc -l `
CONN=`netstat -an | grep '12000.*ESTABLISHED' | wc -l`
NOTVALID=`cat /tmp/ccc_ecm.info | tail -1 | grep ' 0.0' | wc -l`
NOTVALID2=`cat /tmp/ccc_ecm.info | grep 'Unable' | wc -l`
if [ "$CONN" -eq 1 ]
then
/MMP/usr/bin/vfd_display -td210 -led bon
fi
if [ "$IFRUNMCAS" -ne 0 ]
then
if [ "$NOTVALID" -eq 1 ] || [ "$NOTVALID2" -ne 0 ] || [ "$CONN" -eq 0 ]
then
/MMP/usr/bin/vfd_display -td210 -led boff
killall emu_module
sleep 2
/EMU/OpenXCAS/MultiCAS/emu_module &
fi
fi
Multicas is not OK on hop 2 these days. Some may say 'What do you expect from hop 2 anyway'?.. I've made a watch script that should be started from cron every minute, it does some checks and restarts multicas if needed. Also it handles blue LED.
#!/bin/sh
PATH=/bin:/usr/bin:/MMP/usr/bin
#12000 is your server port
date=`date`
IFRUNMCAS=`cat /EMU/OpenXCAS/module.seq | grep -i ^MultiCAS | wc -l `
CONN=`netstat -an | grep '12000.*ESTABLISHED' | wc -l`
NOTVALID=`cat /tmp/ccc_ecm.info | tail -1 | grep ' 0.0' | wc -l`
NOTVALID2=`cat /tmp/ccc_ecm.info | grep 'Unable' | wc -l`
if [ "$CONN" -eq 1 ]
then
/MMP/usr/bin/vfd_display -td210 -led bon
fi
if [ "$IFRUNMCAS" -ne 0 ]
then
if [ "$NOTVALID" -eq 1 ] || [ "$NOTVALID2" -ne 0 ] || [ "$CONN" -eq 0 ]
then
/MMP/usr/bin/vfd_display -td210 -led boff
killall emu_module
sleep 2
/EMU/OpenXCAS/MultiCAS/emu_module &
fi
fi