Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Handling an Expired Event in UNIX

In this example, a demand-driven UEM Server (installed on a different UNIX system) watches for the creation of a file called uemtest.dat. The -filespec option contains no path information, so UEM Server looks for this file in the home directory of uemuser.

A relative inactive date / time instructs the demand-driven Server to monitor the event for one (1) minute. If the UEM Server detects the file, and the file completes within that time, UEM sets the event occurrence to the triggered state. Since the command options contain no event handler information for a triggered occurrence, the UEM Server simply renames the file (by default). UEM Server then makes the event inactive, and ends.

If the UEM Server detects the file, but the file does not complete within 60 seconds, UEM sets the occurrence to the rejected state. Since the command options contain no event handler information for a rejected occurrence, the UEM Server leaves the file as-is and takes no further action.

If the UEM Server does not detect the presence of uemtest.dat before the inactive time elapses, it sets the event to the expired state. When this happens, the UEM Server executes the command specified by the -cmd option corresponding to the -expired option. In this example, UEM executes the 'ls -alR /uem files' command.


Note

In this example, the -expired option is followed by the -options option, which redirects the output of the 'ls -alR "/uemfiles"' command to a file in uemuser's home directory called uemtest.log.


uem -host uemhost -event_type file -filespec uemtest.dat
-userid uemuser -pwd uemusers_password
-inact_date_time +1 
-expired -cmd 'ls -alR "/uem files"' -options '>uemtest.log 2>&1'

Command Line Options

The command line options used in this example are:

Option

Description

-host

List of one or more hosts upon which a command may run.

-event_type

Type of event to monitor.

-filespec

Name or pattern of the file whose creation should be detected and tracked for completion.

-userid

ID of a remote user account that the UEM Server uses to establish the security context in which event monitoring is performed.

-pwd

Password associated with -userid.

-inact_date_time

Date and time at which the state of the monitored event should be made inactive.

-expired

Event state that, when encountered, will result in the execution of the associated event handler.

-cmd

Complete path to an application file or remote script that should be executed on behalf of the event handler.

-options

Values that are passed as command line arguments to a particular handler specified for a given EVENT_STATE.

Components

Universal Event Monitor Manager for UNIX

Universal Event Monitor Server for UNIX

  • No labels