Knowledge Center Contents Previous Next Index |
Event Generation
Contents
Event Generation
LSF detects events occurring during the operation of LSF daemons. LSF provides a program which translates LSF events into SNMP traps. You can also write your own program that runs on the master host to interpret and respond to LSF events in other ways. For example, your program could:
- Page the system administrator
- Send email to all users
- Integrate with your existing network management software to validate and correct the problem
On Windows, use the Windows Event Viewer to view LSF events.
Enabling event generation
SNMP trap program
If you use the LSF SNMP trap program as the event handler, see the SNMP documentation for instructions on how to enable event generation.
Enable event generation for custom programs
If you use a custom program to handle the LSF events, take the following steps to enable event generation.
- Write a custom program to interpret the arguments passed by LSF. See Arguments passed to the LSF event program and Events list for more information.
- To enable event generation, define LSF_EVENT_RECEIVER in
lsf.conf
. You must specify an event receiver even if your program ignores it.The event receiver maintains cluster-specific or changeable information that you do not want to hard-code into the event program. For example, the event receiver could be the path to a current log file, the email address of the cluster administrator, or the host to send SNMP traps to.
- Set LSF_EVENT_PROGRAM in
lsf.conf
and specify the name of your custom event program. If you name your event programgenevent
(genevent.exe
on Windows) and place it in LSF_SERVERDIR, you can skip this step.- Reconfigure the cluster with the commands
lsadmin reconfig
andbadmin reconfig
.Events list
The following daemon operations cause
mbatchd
or the master LIM to call the event program to generate an event. Each LSF event is identified by a predefined number, which is passed as an argument to the event program. Events 1-9 also return the name of the host on which on an event occurred.
- LIM goes down (detected by the master LIM). This event may also occur if LIM temporarily stops communicating to the master LIM.
- RES goes down (detected by the master LIM).
sbatchd
goes down (detected bymbatchd
).- An LSF server or client host becomes unlicensed (detected by the master LIM).
- A host becomes the new master host (detected by the master LIM).
- The master host stops being the master (detected by the master LIM).
mbatchd
comes up and is ready to schedule jobs (detected bymbatchd
).mbatchd
goes down (detected bymbatchd
).mbatchd
receives a reconfiguration request and is being reconfigured (detected bymbatchd
).- LSB_SHAREDIR becomes full (detected by
mbatchd
).Arguments passed to the LSF event program
If LSF_EVENT_RECEIVER is defined, a function called
ls_postevent()
allows specific daemon operations to generate LSF events. This function then calls the LSF event program and passes the following arguments:
- The event receiver (LSF_EVENT_RECEIVER in
lsf.conf
)- The cluster name
- The LSF event number (LSF events list or
LSF_EVENT_XXXX
macros inlsf.h
)- The event argument (for events that take an argument)
Example
For example, if the event receiver is the string
xxx
and LIM goes down onHostA
inCluster1
, the function returns:xxx Cluster1 1 HostAThe custom LSF event program can interpret or ignore these arguments.
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next Index |