Event Handling
::: matches node:atlas0:status
Note that the class, name, type and description must all be specified when posting
events but one or more of the class, name and type can be null when waiting on events.
8.2 Event Handling
Event handler scripts are specifiedin the event_handlers table. The default handlers
installed by RMS are as follows:
rmsquery -v "select * from event_handlers"
name class type timeout handler
-------------------------------------------------------------------------------
node status 600 /usr/opt/rms/etc/rmsevent_node
temphigh 300 /usr/opt/rms/etc/rmsevent_env
tempwarn 300 /usr/opt/rms/etc/rmsevent_env
fan 300 /usr/opt/rms/etc/rmsevent_env
psu 300 /usr/opt/rms/etc/rmsevent_env
event escalation -1 /usr/opt/rms/etc/rmsevent_escalate
partition status 600 /usr/opt/srasysman/bin/rmsevent_partition
The script rmsevent_node is run for all node status events. rmsevent_env is run for
all environment events (temperature warnings,fan failures and PSU failures).
A timeout can be associated with each event handler.If the timeout is exceeded, the
handler is killed and an event escalation event posted. rmsevent_escalate is run
when one ofthe other handlers does not complete in the time allowed.
The eventmgr daemon runs on the rmshost node.
The handler scripts can send mail to users warning them of events. To enable this, set
the users-to-mail attribute in the machine attributes table.
By default, event handler scripts are filed in /usr/opt/rms/etc. Local scripts should
be filed in /usr/local/rms as the contents of the bin directory may change when a
new release is installed.
Each of the scripts tests for the existence of both site-specific and OS-specific handler
scripts before performing the default action.
Event handler scripts are called with five arguments: the event identifier, the class,
name and type of the event and the event description. For example:
#!/bin/sh
#
# default OSF1 handler for node status events
#
# args: id class name type description
#
Event Handling 8-3