Platform LSF Administration Guide Version 6.2

Writing Shell Scripts in lstcsh
Administering Platform LSF
636
Writing Shell Scripts in lstcsh
You should write shell scripts in /bin/sh and use the lstools commands for load
sharing. However,
lstcsh can be used to write load-sharing shell scripts.
By default, an
lstcsh script is executed as a normal tcsh script with load-sharing
disabled.
Running a script with load sharing enabled
The lstcsh -L option tells lstcsh that a script should be executed with load sharing
enabled, so individual commands in the script may be executed on other hosts.
There are three different ways to run an
lstcsh script with load sharing enabled:
Run lstcsh -L script_name
OR:
Make the script executable and put the following as the first line of the script. By
default,
lstcsh is installed in LSF_BINDIR.
The following assumes you installed
lstcsh in the /usr/share/lsf/bin
directory):
#!/usr/share/lsf/bin/lstcsh -L
OR:
1
Start an interactive lstcsh.
2
Enable load sharing, and set to remote mode:
lsmode on remote
3
Use the source command to read the script in.