[ngw] monitor/restart groupwise agents

Greg DeLuca gdeluca at cwu.EDU
Tue Dec 11 22:24:16 UTC 2012


This basic check-up runs every 2 minutes and should work after creating the files and setting a few variables....  This setup can be easily modified for other agents too.  It also avoids using rcgrpwise status which does not always return the proper status or return code. 


cat /usr/local/bin/check_po 
#!/bin/bash 

declare -i CNT=0 
#Modify the name of the GroupWise agent startup file to match the actual name. 
CNT=`ps -aef | grep -v grep | grep -c '@admin.poa'` 

if [ $CNT -eq 0 ] 
then 
echo "Restarting the Admin POA" 
echo "Restarted the Admin POA" `! date` >> /usr/local/bin/gwpoachk.log 
#Modify the name of the GW agent. Check the name by typing the command "rcgrpwise status". Set your email address too.  
/etc/init.d/grpwise start Admin.CWU & 
mail -s "GroupWise Admin POA restarted" user at domain < /usr/local/bin/smtpalertpoa.txt 
else 
echo "The GroupWise Admin POA is running" 
fi 

---------------- 
cat /usr/local/bin/smtpalertpoa.txt  
# set your po's name and the server's name 
{po} POA on {servername} restarted. 

------------------ 
crontab -e 

*/2 * * * * /usr/local/bin/check_po 



>>> On 12/11/2012 at 01:33 PM, in message <50C7606702000013000E74DA at mail.msktd.com>, Kenneth Etter <kle at msktd.com> wrote:


Sorry, I know this has been talked about plenty of times, but I can't find what I need.  I am running GW 2012 SP1 on OES 11.  I have had a post office go dead a couple of times now - just needed a restart.  I would really like to have it monitored and auto-restarted in case I am not around when it goes down.  I was reading up on the Monitor Agent and GWHA.  Is that my only option?  Or are there other ways to monitor and restart a post office agent?

Thanks,
Ken


More information about the ngw mailing list