Here is the "apcbeep" script that is used in the NetView for
Unix training courses.
-----------------------------------------------------------------------------------------------------
#! /usr/bin/ksh
#
# Written By: Don Davis 12/01/95
# This script will limit the number ov RED BEEPING
Xwindows to ONE
# Don't forget to make this script executable
#####################################################################
# Revision Record (Latest Revisions at Top)
# 08/30/00 DWD Added more comments
# 03/19/98 DWD Modified for Tivoli NV Admin Course
#####################################################################
# Set DISPLAY variable - get hostname using hostname
command, append colon zero to it
export DISPLAY=`hostname`:0
# Wait 3 seconds for ps command to find ovxbeeps
sleep 3
# EXIT IF NUMBER OF BEEPS ALREADY ON SCREEN IS GREATER THAN
ZERO
if [ `ps -eaf | grep -v grep | grep -c ovxbeep` -gt 0 ]
then
exit
fi
# Execute ovxbeep command - Note that command message is
within double quotes and back ticks
# Those are NOT single quotes
# Background color can be changed with the -bg option
/usr/OV/bin/ovxbeep -bg red -xrm XNm*FontList:9x15bold
"`echo A CRITICAL EVENT HAS OCCURRED \
PLEASE CHECK THE EVENT CARDS! | fold -s -w 30`" &
======================================================
Don Davis - Tivoli Certified Instructor / Consultant
Visit our Web site at: http://www.apc-services.com
|