[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]
lstcsh
load sharing
tcsh
for LSFSYNOPSIS
lstcsh
[tcsh_options] [-L
] [argument ...]DESCRIPTION
lstcsh
is an enhanced version oftcsh
.lstcsh
behaves exactly liketcsh
, except that it includes a load sharing capability with transparent remote job execution for LSF.By default, a
lstcsh
script is executed as a normaltcsh
script with load sharing disabled.If a command line is considered eligible for remote execution, LSF selects a suitable host-- typically a powerful and/or lightly loaded host that can execute the command line correctly--and sends the command line to that host.
You can restrict who can use
@
for host redirection inlstcsh
with the parameter LSF_SHELL_AT_USERS inlsf.conf
.Remote Hosts
lstcsh
provides a high degree of network transparency. Command lines executed on remote hosts behave the same as they do on the local host. The remote execution environment is designed to mirror the local one as closely as possible by using the same values for environment variables, terminal setup, current working directory, file creation mask, and so on. Each modification to the local set of environment variables is automatically reflected on remote hosts.Shell variables, nice values, and resource limits are not automatically propagated to remote hosts.
Job Control
Job control in
lstcsh
is exactly the same as intcsh
except for remote background jobs.lstcsh
numbers background jobs separately for each of the hosts that are used to execute them. The output of the built-in commandjob
lists background jobs together with their execution hosts.To bring a remote background job to the foreground, the host name must be specified together with an at sign (
@
), as in the following example:
fg %2 @hostA
Similarly, the host name must be specified when killing a remote job. For example:
kill %2 @hostA
OPTIONS
tcsh_options
lstcsh
accepts all the options used bytcsh
. Seetcsh(1)
for the meaning of specific options.-L
Executes a script with load sharing enabled.
There are three ways to run a
lstcsh
script with load sharing enabled:- Execute the script with the
-L
option- Use the built
-
in commandsource
to execute the script- Insert "
#!/local/bin/lstcsh -L
" as the first line of the script (assuming you installlstcsh
in/local/bin
).Using
@
orlsmode
(see below) in a script will not enable load sharing if the script has not been executed using one of these three ways.USAGE
In addition to the built-in commands in
tcsh
,lstcsh
provides the following built-
in commands:lsmode [on | off] [local | remote] [
@
] [v
|-v
] [e | -e] [t
|-t
] [connect
[host_name ...]] [lsrtasks
[lsrtasks_options]] [lsltasks
[lsltasks_options]] [jobs
]on | off
Turns load sharing on or off. When off, you can send a command line to a remote host only if forced eligibility is specified with
@
.local | remote
Sets operation mode of
lstcsh
.The default is
local
.local
Local operation mode. This is the default mode.
In this mode, a command line is eligible for remote execution only if all the specified tasks are present in the remote task list in the user's tasks file
$HOME/.lsftask
, or if@
is specified on the command line to force specified tasks to be eligible for remote execution.Tasks in the local task list must be executed locally.
The local mode of operation is conservative, and can fail to take advantage of the performance benefits and load balancing advantages of LSF.
The way
lstcsh
handles tasks that are not present in the remote task list nor in the local task list, depends on the mode of operation oflstcsh
(local or remote).remote
Remote operation mode.
In this mode, a command line is considered eligible for remote execution only if none of the specified tasks are present in the local task list in the user's tasks file
$HOME/.lsftask.
Tasks in the remote list can be executed remotely.
The remote mode of operation is aggressive, and promotes extensive use of LSF.
The way
lstcsh
handles tasks that are not present in the remote task list nor in the local task list, depends on the mode of operation oflstcsh
(local or remote).@
Specify
@
to explicitly specify the eligibility of a command for remote execution.The
@
may be anywhere in the command line except in the first position (which is used to set the value of shell variables).There are several ways to use
@
:@
Specify
@
followed by nothing to indicate the command line is eligible for remote execution.@ host_name
Specify
@
followed by a host name to force the command line to be executed on that host.Host names and the reserved word
local
following@
can all be abbreviated as long as they do not cause ambiguity.@ local
Specify
@
followed by the reserved wordlocal
to force the command line to executed on the local host.@ /res_req
Specify
@
followed by / and a resource requirement string to indicate the command is eligible for remote execution, and that the specified resource requirements must be used instead of those in the remote task list.When specifying resource requirements following the
@
it is necessary to use / only if the first requirement characters specified are also the first characters of a host name.e | -e
Turns eligibility verbose mode on (
e
) or off (-e
).If eligibility verbose mode is on,
lstcsh
shows whether the command is eligible for remote execution, and displays the resource requirement used if the command is eligible.The default is off.
v | -v
Turns task placement verbose mode on (
v
) or off (-v
). If verbose mode is on,lstcsh
displays the name of the host on which the command is run if the command is not run on the local host.The default is on.
t | -t
Turns wall clock timing on (
t
) or off (-t
).If timing is on, the actual response time of the command is displayed. This is the total elapsed time in seconds from the time you submit the command to the time the prompt comes back.
This time includes all remote execution overhead. The
csh
time built-
in does not include the remote execution overhead.This is an impartial way of comparing the response time of jobs submitted locally or remotely, because all the load sharing overhead is included in the displayed elapsed time.
The default is off.
connect [host_name ...]
Establishes connections with specified remote hosts. If no hosts are specified, lists all the remote hosts to which an
lstcsh
connection has been established.A plus sign (+) with a remote host indicates that a server-shell has also been started on it.
lsrtasks [+ task_name[/res_req ...] | - task_name[/res_req ...]]
Displays or update a user's remote task list in the user's task list
$HOME/.lsftask
.This command has the same function as the external command
lsrtasks
, except that the modified remote task list takes effect immediately for the currentlstcsh
session.See
lsrtasks(1)
for more details.lsltasks [+ task_name ... | - task_name ...]
Displays or update a user's local task list in the user's task list
$HOME/.lsftask
.This command has the same function as the external command
lsltasks
, except that the modified local task list takes effect immediately for the currentlstcsh
session.See
lsltasks
(1) for more details.jobs
Lists background jobs together with the execution hosts. This break of transparency is intentional in order to provide you with more control over your background jobs.
FILES
There are three optional configuration files for
lstcsh
:
.shrc
.hostrc
.lsftask
The
.shrc
and.hostrc
files are used bylstcsh
alone, whereas .lsftask
is used by LSF to determine general task eligibility.~/.shrc
Use this file when you want an execution environment on remote hosts that is different from that on the local host. This file is sourced automatically on a remote host when a connection is established. For example, if the remote host is of different type, you may need to run a version of the executable for that particular host type, therefore it may be necessary to set a different path on the remote host.
~/.hostrc
Use this file to indicate a list of host names to which the user wants to be connected (asynchronously in the background) at
lstcsh
startup time. This saves the time spent in establishing the connections dynamically during execution of shell commands. Once a connection is set up, you can execute further remote commands on those connected hosts with very little overhead.~/.lsftask
Use this file to specify lists of remote and local tasks that you want to be added to the respective system default lists. Each line of this file is of the form task_name/res_req, where task_name is the name of a task, and res_req is a string specifying the resource requirements of the task. If res_req is not specified, the command is executed on machines of the same type as the local host.
SEE ALSO
csh(1), tcsh(1),
lsrtasks
(1),
lsltasks
(1),
lseligible
(1),
lsinfo
(1),
lsload
(1)
LIMITATIONS
Type-ahead for the
next
command is discarded when a job is executing in the foreground on a remote host.It is not possible to provide input data to load sharing shell scripts (that is, shell scripts whose content is load shared).
The
lstcsh
is fully compatible with tcsh 6.03 7-bit mode. Any feature that is not included intcsh
6.03 is not supported.[ Top ]
[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]
Date Modified: February 24, 2004
Platform Computing: www.platform.com
Platform Support: support@platform.com
Platform Information Development: doc@platform.com
Copyright © 1994-2004 Platform Computing Corporation. All rights reserved.