Cool Solutions

Agent Monitoring – GWPOA Agent Monitor Script (modified)



By:

January 2, 2008 11:43 am

Reads:11,803

Comments:0

Score:Unrated

Problem

I read this article:
http://gwavacon.com/resources/pdf/Best_Practices_Running_GroupWise_Linux.pdf

The article says to use the Agent Monitoring Monitor script, running as a cron job. My POA is running on SLES10, but from time to time the GroupWise POA breaks. For a normal restart (in my case), I need to manually delete folders:

/poa/wpcsin
/poa/wpcsout

As a result, I cannot use AUTOMATE RESTART.

Solution

I’ve modified this script so it renames these folders to unique names and then restarts the POA:

#!/bin/bash
declare -i CNT=0
NDT=`date +%Y%m%d%H%M%S`
SIN=/srv/mail/mrp/mrpp/wpcsin
SOUT=/srv/mail/mrp/mrpp/wpcsout

CNT=`ps -aef | grep -v grep | grep -c '@mrpp.poa'`
if [ $CNT -eq  0  ]
then
    echo "Restarting MRPP POA" `! date` >> /var/log/novell/groupwise/gwagentchk.log
    echo "$SIN.$NDT"  >> /var/log/novell/groupwise/gwagentchk.log
    echo "$SOUT.$NDT" >> /var/log/novell/groupwise/gwagentchk.log
    mv $SIN  $SIN.$NDT
    mv $SOUT  $SOUT.$NDT
    /etc/init.d/grpwise start mrpp.mrpd &
fi

Example

This will be the new name: …/wpcsin.20071230183001
The time format is: yyyymmddhhmmss

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading ... Loading ...


Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS