Listing 9: collect_events.ksh--Collects events spooled to loggerhost
#!/bin/ksh
#====================================================
# "@(#)collect_events.ksh"
#
# A Script that will copy the condition files from
# "loggerhost" (the relay host) and to the
# notifying system.
#
# Author :
# Ravindra Nemlekar
#
#===================================================
BINDIR=/usr/local/admin/sysmon
BASEDIR=/usr/local/admin/sysmon
umask 0
# Copy the messages from the loggerhost
# and remove them from loggerhost, so that they
# are not repeated again.
# Logevent.ksh and logok.ksh will take care or
# re-creating directories if not present.
cd ${BASEDIR}
rcp -r loguser@loggerhost:hosts . > /dev/null 2>&1
rsh -l loguser loggerhost /bin/rm -rf hosts \
> /dev/null 2>&1
#End of File
|