HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)
e
evmwatch(1) evmwatch(1)
• The following example shows how evmwatch
waits until another process posts a particular event and
then continues. Redirection of output to
/dev/null implies that the content of the event is of no con-
cern.
evmwatch -f "[name myco.ops.backup.done]" -x >/dev/null
The following script builds on the prior example. It waits for five minutes (300 seconds) for the event
to occur or exits as soon as the event happens.
#! /bin/ksh
evmwatch -f "[name myco.ops.backup.*]" -x -w 300 >/dev/null
if [ $? -eq 0 ]
then
echo Backup completed!
else
echo Backup timed out!
fi
• The following shell script waits for up to five minutes (300 seconds) for a pulse event to be received.
Each time the pulse arrives, the timer is reset and evmwatch waits for the next pulse. If the timer
expires, evmwatch terminates with an error code, a warning is displayed, a high priority event is
posted, and the script exits.
#! /bin/ksh
evmwatch -f "[name myco.myapp.pulse]" -w 300 >/dev/null
if [ $? -ne 0 ] then
echo ‘date‘ Pulse monitor: No pulse received.
evmpost <<END
event {
name myco.myapp.pulsemon.no_pulse
priority 650
}
END
fi
• The following example lists the names of all registered events that the user is authorized to access.
evmwatch -i | evmshow -t "@name" | more
WARNINGS
The evmwatch command rejects attempts to output raw events to a terminal device.
The evmwatch command receives events only for which the user has access authorization. See
evm.auth(4) for details of access authorization.
FILES
/etc/services Definition of the sockets and protocols used for Internet Services
SEE ALSO
Commands
evmget(1), evmpost(1), evmshow(1), evmsort(1).
Files
evmfilterfile(4), services(4).
Event Management
EVM(5).
EVM Events
EvmEvent(5).
Event Filter
EvmFilter(5).
HP-UX 11i Version 3: February 2007 − 2 − Hewlett-Packard Company 315