25.06.2015 Views

Administering Platform LSF - SAS

Administering Platform LSF - SAS

Administering Platform LSF - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

External Load Indices and ELIM<br />

Environment<br />

variables<br />

Writing an ELIM<br />

ELIM output<br />

ELIM location<br />

There is only one ELIM on each host, regardless of the number of resources<br />

on which it reports. If only cluster-wide resources are to be collected, then an<br />

ELIM will only be started on the master host.<br />

When LIM starts, the following environment variables are set for ELIM:<br />

◆ <strong>LSF</strong>_MASTER: This variable is defined if the ELIM is being invoked on the<br />

master host. It is undefined otherwise. This can be used to test whether the<br />

ELIM should report on cluster-wide resources that only need to be<br />

collected on the master host.<br />

◆ <strong>LSF</strong>_RESOURCES: This variable contains a list of resource names (separated<br />

by spaces) on which the ELIM is expected to report. A resource name is<br />

only put in the list if the host on which the ELIM is running shares an<br />

instance of that resource.<br />

The ELIM must be an executable program, either an interpreted script or<br />

compiled code.<br />

The ELIM communicates with the LIM by periodically writing a load update<br />

string to its standard output. The load update string contains the number of<br />

indices followed by a list of name-value pairs in the following format:<br />

number_indices [index_name index_value]...<br />

For example,<br />

3 tmp2 47.5 nio 344.0 licenses 5<br />

This string reports three indices: tmp2, nio, and licenses, with values 47.5,<br />

344.0, and 5 respectively. Index values must be numbers between<br />

-INFINIT_LOAD and INFINIT_LOAD as defined in the lsf.h header file.<br />

If the ELIM is implemented as a C program, as part of initialization it should<br />

use setbuf(3) to establish unbuffered output to stdout.<br />

The ELIM should ensure that the entire load update string is written<br />

successfully to stdout. This can be done by checking the return value of<br />

printf(3s) if the ELIM is implemented as a C program or as the return code<br />

of /bin/echo(1) from a shell script. The ELIM should exit if it fails to write<br />

the load information.<br />

Each LIM sends updated load information to the master every 15 seconds.<br />

Depending on how quickly your external load indices change, the ELIM<br />

should write the load update string at most once every 15 seconds. If the<br />

external load indices rarely change, the ELIM can write the new values only<br />

when a change is detected. The LIM continues to use the old values until new<br />

values are received.<br />

The executable for the ELIM must be in <strong>LSF</strong>_SERVERDIR.<br />

Use the following naming conventions:<br />

◆ On UNIX, <strong>LSF</strong>_SERVERDIR/elim.application<br />

For example, elim.license<br />

◆<br />

On Windows, <strong>LSF</strong>_SERVERDIR\elim.application.[exe |bat]<br />

160<br />

<strong>Administering</strong> <strong>Platform</strong> <strong>LSF</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!