Writing Monitors for the Event Monitoring Service (December 1999)

Chapter 4 137
Testing a Resource Monitor with montest
How montest Works
3. Sets up a target application to listen on a TCP port for responses from
the resource monitor each time the notification criteria is satisfied.
Successful notification verifies communication between the resource
and the resource monitor and between the resource monitor and the
target application that montest sets up.
The target application uses Berkeley sockets to receive notification
messages from the resource monitor. For interactive sessions, each
received message is written to standard output. For script-driven
sessions, each received message is written to a log file called
/var/opt/resmon/log/montest/log
hh
:
mm
:
ss
, where
hh
:
mm
:
ss
is
the time the log was created. You can read this log file to verify that
resource values are what they should be.
At this stage, montest may detect the following errors:
a. The resource monitor is not polling the resource, or the EMS API
is not detecting that the notification criteria is satisfied.
b. The resource monitor cannot communicate through montest’s
TCP port.
4. Unregisters the monitor request to end the verification test and stop
the notification messages from the resource monitor.