Platform LSF Administration Guide Version 6.2
External Load Indices and ELIM
Administering Platform LSF
224
Environment
variables
When LIM starts, the following environment variables are set for ELIM:
◆
LSF_MASTER: This variable is defined if the ELIM is being invoked on the master
host. It is undefined otherwise. This can be used to test whether the ELIM should
report on cluster-wide resources that only need to be collected on the master host.
◆
LSF_RESOURCES: This variable contains a list of resource names (separated by
spaces) on which the ELIM is expected to report. A resource name is only put in
the list if the host on which the ELIM is running shares an instance of that resource.
Writing an ELIM
The ELIM must be an executable program, either an interpreted script or compiled
code.
ELIM output
The ELIM communicates with the LIM by periodically writing a load update string to
its standard output. The load update string contains the number of indices followed by
a list of name-value pairs in the following format:
number_indices
[
index_name
index_value
]...
For example,
3 tmp2 47.5 nio 344.0 licenses 5
This string reports three indices: tmp2, nio, and licenses, with values 47.5, 344.0,
and 5 respectively. Index values must be numbers between
-INFINIT_LOAD and
INFINIT_LOAD as defined in the lsf.h header file.
If the ELIM is implemented as a C program, as part of initialization it should use
setbuf(3) to establish unbuffered output to stdout.
The ELIM should ensure that the entire load update string is written successfully to
stdout. This can be done by checking the return value of printf(3s) if the ELIM
is implemented as a C program or as the return code of
/bin/echo(1) from a shell
script. The ELIM should exit if it fails to write the load information.
Each LIM sends updated load information to the master every 15 seconds. Depending
on how quickly your external load indices change, the ELIM should write the load
update string at most once every 15 seconds. If the external load indices rarely change,
the ELIM can write the new values only when a change is detected. The LIM continues
to use the old values until new values are received.
ELIM location
The executable for the ELIM must be in LSF_SERVERDIR.
Use the following naming conventions:
◆
On UNIX, LSF_SERVERDIR/elim.application
For example, elim.license
◆
On Windows, LSF_SERVERDIR\elim.application.[exe |bat]
For example, elim.license.exe
If LIM expects some resources to be collected by an ELIM according to configuration,
it invokes the ELIM automatically on startup. The ELIM runs with the same user ID
and file access permission as the LIM.
ELIM restart
The LIM restarts the ELIM if it exits; to prevent problems in case of a fatal error in the
ELIM, it is restarted at most once every 90 seconds. When the LIM terminates, it sends
a SIGTERM signal to the ELIM. The ELIM must exit upon receiving this signal.