Index Index for
Section 1
Index Alphabetical
listing for E
Index Bottom of
page

evmwatch(1)

NAME

evmwatch - Monitors EVM events

SYNOPSIS

evmwatch [-f filter_expr] [-h hostname[:port_no]] [-w timeout] [-i | -x]

OPTIONS

-f filter_expr Subscribes for notification of events matching filter_expr. See the EvmFilter(5) reference page for the syntax of filter_expr. By default, the evmwatch command subscribes for all events. -h hostname[:port_no] Attempts to connect to the EVM daemon on the host hostname, rather than to the local daemon. The port number must be the same as the portnum specified in the EVM daemon configuration file, evmdaemon.conf(4). In most cases, the default should be used. If :port_no is specified, port_no is used for TCP communication with remote clients; otherwise, the evm port number found in /etc/services is used. If no entry is found in /etc/services, the reserved default value of 619 is used. -w timeout Terminates if no event is processed in timeout seconds. The timer is restarted each time an event is received. -i When this flag is used, the evmwatch command retrieves from the EVM daemon copies of all of the registered event templates that match the supplied filter string, and for which the user has access authorization. It writes the templates to stdout as EVM events and terminates. -x Terminates with a zero exit value as soon as the first event matching filter_expr is processed.

OPERANDS

None

DESCRIPTION

The evmwatch command subscribes to the events specified by the filter_expr, and passes all events to its stdout as they arrive. Events are output in raw form, and must be piped through evmshow if display is required.

RESTRICTIONS

The output device cannot be a terminal device.

EXAMPLES

The following ksh example watches for all events with a priority of at least 200, and displays them on stdout. export EVM_SHOW_TEMPLATE="@timestamp [@priority] @@" evmwatch -f "[priority >= 200]" | evmshow The following example will wait until some other process posts a particular event and then continue. Redirection of output to /dev/null implies that the content of the event is of no concern. evmwatch -f "[name myco.ops.backup.done]" -x >/dev/null The following script builds on the prior example. It will wait for 5 minutes (300 seconds) for the event to occur, or will exit 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 5 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.remote.pulse]" -w 300 >/dev/null if [ $? -ne 0 ] then echo `date` Pulse monitor: No pulse from remote system 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

EXIT VALUES

The following exit values are returned: 0 Successful completion not 0 An error occurred, including timeout

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)

Index Index for
Section 1
Index Alphabetical
listing for E
Index Top of
page