Commit 13ea7642 authored by 's avatar
Browse files

All scripts now use common log file


git-svn-id: file:///home/svn/mapi/trunk@1279 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 0f72d884
......@@ -39,7 +39,8 @@ RRD_DIR=${ABW_VAR_DIR}/rrd
LOG_DIR=${ABW_VAR_DIR}/log
ABW_SCRIPT=${ABW_DIR}/bin/abw.sh
MAPI_SCRIPT=${ABW_DIR}/bin/mapi.sh
LOG_FILE=${LOG_DIR}/abw_check_data.log
LOG_FILE=${LOG_DIR}/abw.log
SCRIPT_NAME=`basename $0`
usage() {
echo "Usage: abw_check_data.sh [ -d ]"
......@@ -97,7 +98,7 @@ do
if [ $MAX_VALUE_INTEGER -le 0 ]; then
echo "$CURRENT_DATE: Maximum recent value is 0, restarting abw"
echo "$CURRENT_DATE: Maximum recent value is 0, restarting abw" >> $LOG_FILE
echo "$CURRENT_DATE: $SCRIPT_NAME: Maximum recent value is 0, restarting abw" >> $LOG_FILE
RESTART=1
else
echo "Maximum recent value is $MAX_VALUE_INTEGER, abw is running"
......
......@@ -39,7 +39,8 @@ RRD_DIR=${ABW_VAR_DIR}/rrd
LOG_DIR=${ABW_VAR_DIR}/log
ABW_SCRIPT=${ABW_DIR}/bin/abw.sh
MAPI_SCRIPT=${ABW_DIR}/bin/mapi.sh
LOG_FILE=${LOG_DIR}/abw_check_rrd.log
LOG_FILE=${LOG_DIR}/abw.log
SCRIPT_NAME=`basename $0`
usage() {
echo "Usage: abw_check_rrd.sh [ -d ]"
......@@ -86,7 +87,7 @@ do
if [ $TIME_DIFF -gt 60 ]; then
echo "$CURRENT_DATE: RRD file is not being updated, restarting abw"
echo "$CURRENT_DATE: RRD file is not being updated, restarting abw" >> $LOG_FILE
echo "$CURRENT_DATE: $SCRIPT_NAME: RRD file is not being updated, restarting abw" >> $LOG_FILE
RESTART=1
fi
done
......
......@@ -36,7 +36,8 @@ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
ABW_DIR=@ABW_DIR@
ABW_VAR_DIR=@ABW_VAR_DIR@
LOG_DIR=${ABW_VAR_DIR}/log
LOG_FILE=${LOG_DIR}/abw_check_rrd.log
LOG_FILE=${LOG_DIR}/abw.log
SCRIPT_NAME=`basename $0`
usage() {
echo "Usage: abw_mapi.sh [ -d ]"
......@@ -66,17 +67,17 @@ RESTART=0
if [ $PROCESSES_MAPID -eq 0 ]; then
RESTART=1
echo "$CURRENT_DATE: mapid is not running" >> $LOG_FILE
echo "$CURRENT_DATE: $SCRIPT_NAME: mapid is not running" >> $LOG_FILE
fi
if [ $PROCESSES_MAPICOMMD -eq 0 -a "$1x" = "-dx" ]; then
RESTART=1
echo "$CURRENT_DATE: mapicommd is not running and -d was specified" >> $LOG_FILE
echo "$CURRENT_DATE: $SCRIPT_NAME: mapicommd is not running and -d was specified" >> $LOG_FILE
fi
if [ $PROCESSES_ABW -eq 0 ]; then
RESTART=1
echo "$CURRENT_DATE: abw is not running" >> $LOG_FILE
echo "$CURRENT_DATE: $SCRIPT_NAME: abw is not running" >> $LOG_FILE
fi
if [ $RESTART -gt 0 ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment