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.

Writing Shell Scripts in lstcsh<br />

Writing Shell Scripts in lstcsh<br />

You should write shell scripts in /bin/sh and use the lstools commands for<br />

load sharing. However, lstcsh can be used to write load-sharing shell scripts.<br />

By default, an lstcsh script is executed as a normal tcsh script with loadsharing<br />

disabled.<br />

Running a script with load sharing enabled<br />

The lstcsh -L option tells lstcsh that a script should be executed with load<br />

sharing enabled, so individual commands in the script may be executed on<br />

other hosts.<br />

There are three different ways to run an lstcsh script with load sharing<br />

enabled:<br />

◆ Run lstcsh -L script_name<br />

OR:<br />

◆ Make the script executable and put the following as the first line of the<br />

script. By default, lstcsh is installed in <strong>LSF</strong>_BINDIR.<br />

The following assumes you installed lstcsh in the /usr/share/lsf/bin<br />

directory):<br />

#!/usr/share/lsf/bin/lstcsh -L<br />

OR:<br />

1 Start an interactive lstcsh.<br />

2 Enable load sharing, and set to remote mode:<br />

lsmode on remote<br />

3 Use the source command to read the script in.<br />

560<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!