An intermediate server which simplifies access to remote targets. Although it can be used otherwise, it is used by
|path||Path to file containing list of targets.|
The targets file contains a list of targets, one per line:
<cgroup> may use ":" in place of "/" where it contains slashes.
Provides access to local/remote targets (e.g., user@host) using a
relay (e.g., ssh service).
Output the number of targets registered.
Connect to service ... at target (i.e., user@host) verified
by a lookup into the targetsfile list. Only available if a
targetsfile was given at startup.
Connect to service ... at target (host only) identified by a
lookup into the targetsfile list at <index>. A negative index
starts at the last entry (-1 is the last entry). An index
starting with : loops around to continue the lookup.
Connect to service ... at unregistered target (i.e.,
Connect to the 'next' target selected from the targetsfile
list. Each call bumps to 'next' and wraps to 0 as needed.
Connect to a randomly selected target from the targetsfile
Run exec-based service, where method corresponds to what is
provided by the exec server (e.g., simple, shell, login), at
target identified by a lookup into the targetsfile list at
<index>. A negative index starts at the last entry (1 is the
last entry). An index starting with : loops around to continue
the lookup. If a cgroup is defined in targetsfile, it is used
in the call.
A basic targets file contains only hosts (one per line):
Each target corresponds to an index, starting at 0 (i.e., hostA in the list above).
The targets file also allows for specifying cgroups:
The ":" in the cgroup name is understood by the exec server to mean "/" when determining a final cgroup path.
Once set up, the pnet
id service can be used to connect to a target. E.g., assuming an existing pnet server running at
ruexec pnet/id/0/+/debug/exit 1
The target associated with index 0 (the first line in the targets list) will be called to run the
debug/exit service. This is functionally equivalent to:
ruexec +/ssh/host0/+/debug/exit 1
run service called in a slightly different way, i.e., specifying the exec method (simple, shell, or login):
ruexec pnet/run/0/shell hostname
and is functionally equivalent to:
ruexec +/ssh/host0/+/exec/cgroup/jobs:123-0/shell hostname
Notice how the spath generated by the
run service provides:
+/ssh - the relay
+/exec - in preparation to execute a program
cgroup/jobs:123-0 - to select a cgroup in which to execute a program