Restart BTS nightly and nicely when thee are borken channels
This commit is contained in:
parent
51873284d4
commit
22b392bbc7
2 changed files with 19 additions and 0 deletions
16
modules/rhizo_base/files/bin/check_broken.sh
Executable file
16
modules/rhizo_base/files/bin/check_broken.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
RHIZO_SCRIPT="/home/rhizomatica/bin"
|
||||||
|
. $RHIZO_SCRIPT/vars.sh
|
||||||
|
. $RHIZO_SCRIPT/rccn-functions
|
||||||
|
|
||||||
|
NACK=`echo "show lchan" | nc -q1 localhost 4242 | grep "BROKEN UNUSABLE Error reason: NACK on activation" | wc -l`
|
||||||
|
|
||||||
|
if [ $NACK -gt 0 ]; then
|
||||||
|
waitfor0calls
|
||||||
|
_bts=0
|
||||||
|
for bts in $BTS1 $BTS2 $BTS3; do
|
||||||
|
echo "Dropping BTS connection $_bts due to $NACK broken (NACK) Channels"
|
||||||
|
echo -e "enable\n drop bts connection $_bts oml" | nc -q1 localhost 4242
|
||||||
|
done
|
||||||
|
((_bts+=2))
|
||||||
|
fi
|
|
@ -60,6 +60,9 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
|
||||||
#Restart osmo-nitb every 6 hours (This wasn't working anyway. If it is needed, do something more elegant!)
|
#Restart osmo-nitb every 6 hours (This wasn't working anyway. If it is needed, do something more elegant!)
|
||||||
# 0 */6 * * * root /usr/bin/sv restart osmo-nitb 2>&1 > /dev/null
|
# 0 */6 * * * root /usr/bin/sv restart osmo-nitb 2>&1 > /dev/null
|
||||||
|
|
||||||
|
# It's a new day....
|
||||||
|
30 5 * * * root /home/rhizomatica/bin/check_broken.sh
|
||||||
|
|
||||||
# Check if FS or NTIB needs restart
|
# Check if FS or NTIB needs restart
|
||||||
30 3 * * * root /home/rhizomatica/bin/check_dirty.sh
|
30 3 * * * root /home/rhizomatica/bin/check_dirty.sh
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue