Platform LSF Administration Guide Version 6.2

Chapter 10
Adding Resources
Administering Platform LSF
225
Example
1
Write an ELIM.
The following sample ELIM (
LSF_SERVERDIR/elim.mysrc) sets the value of
myrsc resource to 2. In a real ELIM, you would have a command to retrieve
whatever value you want to retrieve and set the value.
#!/bin/sh
while :
do
# set the value for resource "myrsc"
val=2
# create an output string in the format:
# number_indices index1_name index1_value...
reportStr="1 myrsc $val"
echo "$reportStr"
# wait for 30 seconds before reporting again
sleep 30
done
2
Test this ELIM by running it from the command line.
%
./elim.myrsc
It should give you the output:
1 myrsc 2
3
Copy the ELIM to LSF_SERVERDIR and make sure it has the name
elim.myrsrc.
4
Define the myrsc resource in lsf.shared.
In this case, we are defining the resource as Numeric because we want it to accept
numbers. The value does not increase with load.
Begin Resource
RESOURCENAME TYPE INTERVAL INCREASING DESCRIPTION
myrsc Numeric 30 N (custom resource to trigger elim to
start up)
End Resource
5
Map the myrsc resource to hosts in lsf.cluster.cluster_name. In this
case, we want this resource to reside only on
hostA.
Begin ResourceMap
RESOURCENAME LOCATION
myrsc [hostA]
End ResourceMap
6
Reconfigure the cluster:
% lsadmin reconfig
% badmin mbdrestart
7
Display the resource with the command lsload -l. You should be able to see the
new resource and value:
HOST_NAME status r15s r1m r15m ut pg io ls it tmp swp mem myrsc
hostA ok 0.4 0.4 0.4 0% 0.0 0 22 0 24M 26M 6M 2