Cover V04, I06
Article
Figure 1
Figure 2
Figure 3
Listing 1
Listing 10
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9

nov95.tar


Listing 5: logevent.ksh--Log a condition/event

#!/bin/ksh
#===================================================
# "@(#)logevent.ksh"
#
# This script is used to log a condition. It can
# be a condition or an event. It should be specified
# in the configuration files if its an event. It
# should be run on the host which wants to log
# the condition or event.
#
# Parameters : (only one)
#   arg1 : Name of the message file (along with path)
#          Contents of this file should be the message
#
# Author :
# 	Ravindra Nemlekar
#
#===================================================

if [ $# -ne 1 ] ; then
echo Usage: $0 MESSAGE_FILE_NAME
exit 1
fi
rsh loggerhost  -l loguser mkdir -p \
hosts/$(hostname) >/dev/null 2>&1
rcp -p $1 loguser@loggerhost:hosts/$(hostname)/\
Condition.$(basename $1)