Skip to end of metadata
Go to start of metadata



rurun runs a program on a target identified by an index. It uses the pnet server which is started automatically if required.


usage: rurun [options] <target> <arg> ...
       rurun [--pnet <addr>] --count

Launch a program on a pnet target. If a pnet server specified
(command line or environment variable), the local host will be used.

If --count is specified, then the number of pnet targets is printed.

-a|--attr <name>=<value>
	Provide attribute/environment variable settings. A
	comma-separated list of environment variable names in
	$RURUN_ENV are also passed.
	Enable debugging. Or set RURUN_DEBUG=1.
--exec simple|shell|login
	Environment to launch with:
	simple - without shell
	shell - shell with basic environment
	login - shell with login environment
	Defaults to $RURUN_EXEC_METHOD or "shell".
--pnet <addr>
	Use a given pnet address. Defaults to $RURUN_PNET_ADDR.
--relay <name>
	Use a given relay service. Defaults to ${RURUN_RELAY} or
--shell <path>
	Alternative shell to run on target. The arguments are passed
	to it for execution. Forces "--exec simple".
--targetsfile <path>
	Use targets file. Defaults ${RURUN_PNET_TARGETSFILE}.
-t|--timeout <seconds>
	Allow a given amount of time to connect before aborting.
	Defaults to ${RURUN_TIMEOUT} if set.

Environment Variables

RURUN_ENVoptionalComma-separated list of environment variable names to pass to the target.
RURUN_EXEC_METHODoptionalOne of simple, shell, login. Default is shell.
RURUN_PNET_ADDRrequired*pnet server address used to connect to targets.
RURUN_PNET_TARGETSFILErequired*Targets file used by pnet server.
RURUN_RELAYoptionalRelay service to use to connect to targets when RURUN_PNET_ADDR points to a directory or file. Default is ssh.
RURUN_SHELLoptionalAlternative shell to run on target. Forces exec method simple.
RURUN_TIMEOUToptionalTimeout for connecting to the target.


When rurun launches programs onto targets, there are some settings that can only be determined and set on the target. The RURUN_SHELL settings tells rurun which program to use instead of the shell. The program specified in RURUN_SHELL is expected to launch the program passed to rurun.


To run on a target (id 0):

rurun 0 hostname

To use an alternate shell (e.g., myshell), we start with the myshell implementation:

#! /bin/ksh
export HI=joe
exec /bin/ksh -c "$@"

The default behavior:

$ export HI=jim
$ rurun 0 'echo $HI'

Using the alternate shell:

$ export RURUN_SHELL=myshell
$ rurun 0 'echo $HI'