User Tools

Site Tools


bpsh

NAME

bpsh - run a command on a remote node

SYNOPSIS

bpsh -h
 
bpsh -v
 
bpsh nodespec command arguments .
 
bpsh -a command arguments .
 
bpsh -A command arguments .

DESCRIPTION

bpsh executes command on the nodes given by nodespec. bpsh is designed to operate in a fashion similar to rsh.

The node specification can be any comma delimited combination of the following:

  • numbers

e.g. 5, 11, 10

  • node ranges

e.g. 5-10 means 5,6,7,8,9 and 10

node states prefixed with “all” e.g. “allup” means all nodes which are up and “allnotup” means all nodes which are not up. Listing the same node more than once will cause the command to get executed on that node more than once. The remote commands will be executed on the nodes in the order given.

-h Print help information and exit.
 
-v Print version information and exit.
 
-a Execute command on all nodes which are up. This is equivalent to saying bpsh allup com- mand ... .
 
-A Execute command on all nodes which are not down. This is equivalent to saying bpsh all- notdown command.		
 
-n Redirect standard in from /dev/null.
 
-N Provide no IO forwarding at all. 
(If only one remote process is starting, this will cause bpsh to do a bproc_execmove without forking.)
 
-L Line buffer output from remote processes.
 
-p Prefix each line of output from remote processes with the node number. This option implies -L.
 
-s Show the output from each remote process sequentially.
 
-d Print a divider with the node number between the output from each remote process. This option implies -s.
 
-b bufferbytes Set IO buffer size to bufferbytes. This affects the maximum line length for line buffered IO.
(default=4096)
 
-I filename   Redirect standard in from filename. This redirection will take place on the remote node.
 
-O filename   Redirect standard out to filename. This redirection will take place on the remote node.
 
-E filename   Redirect standard error to filename. This redirection will take place on the remote node.

The binary that bpsh is to execute remotely is taken from the front end and executed remotely via the bproc_exec- move function. The implications of this are that while the binary does not have to be available on the remote machine, any libraries that it will try to dynamically link against do have to exist on the remote node. They may exist either on the remote file system or be made available via the library caching mechanism. The dynamic linker will notify you of missing libraries in the usual way.

BUGS

bpsh currently does not print any error message if the exec part of bproc_execmove succeeds but the bproc_move part fails. Exit status is set correctly.

bpsh.txt · Last modified: 2010/04/15 21:18 (external edit)