| 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)
|