Fixed monitoring scripts.

This commit is contained in:
Ciaby 2015-02-20 12:47:02 -06:00
parent 529f8e788d
commit 82b25ddf60
4 changed files with 12 additions and 6 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Check for AMP status on each BTS, from BTS1 up to BTS3
. ./vars.sh
for bts in $BTS1 $BTS2 $BTS3; do

View file

@ -1,4 +0,0 @@
#!/bin/sh
. ./vars.sh
echo "BTS1: "
ssh root@$BTS1 sbts2050-util sbts2050-pwr-status

View file

@ -0,0 +1,10 @@
#!/bin/bash
. ./vars.sh
LOGFILE="/var/log/monitor_amp.log"
$RHIZO_SCRIPT/check_amp_status.sh | grep -q OFF
if [ $? == 0 ]; then
logc "Amplifier is OFF! Turn on amp"
$RHIZO_SCRIPT/turn_on_amplifier.sh >/dev/null 2>&1
logc 'Procedure completed'
fi

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Turn on AMP on all BTS, from BTS1 to BTS3
. ./vars.sh
LOGFILE="/var/log/rhizomatica/monitor_amp.log"
LOGFILE="/var/log/monitor_amp.log"
for bts in $BTS1 $BTS2 $BTS3; do
logc "Turning on AMP on BTS $bts:";