Looking for remote file view utility

Don Holmgren djholm at fnal.gov
Wed Jan 8 10:56:05 PST 2003


Although I know there are probably as many home-grown cluster command
dispatching utilities as there are clusters (or maybe that should be
#clusters/2 or ln(#clusters) ), if anyone's still looking for such
a beast they are welcome to try Fermilab's "rgang" - see

  http://fermitools.fnal.gov/abstracts/rgang/abstract.html

rgang is written in Python, and can be used to execute commands on a
set of nodes (command mode) or to distribute files to a set of nodes
(copy mode).  Node sets can either be specified by referring to a
farmlet name or a Python-style list specification, eg:

   rgang name "echo 'hi  there'"

where the file /usr/local/etc/farmlets/name lists a set of nodes, or

   rgang qcd01{01-4} "echo 'hi  there'"

which executes on qcd0101, qcd0102, qcd0103, and qcd0104.  The output of
an rgang command shows the response from each node:

   qcdhome:~$ rgang qcd01{01-2}  "echo 'hi  there'"

   - - - - - - - - - - - - - - qcd0101 - - - - - - - - - - - - - -
   /usr/bin/rsh qcd0101 "echo 'hi  there'"
   hi  there

   - - - - - - - - - - - - - - qcd0102 - - - - - - - - - - - - - -
   /usr/bin/rsh qcd0102 "echo 'hi  there'"
   hi  there

rgang can also be passed a list of nodes via stdin.  This is handy, for
example, for examining what's happening on a group of nodes running a
given PBS job (using another script to parse 'qstat -a').

Copy mode works similarly to rcp, except it takes a list of nodes as the
destination, e.g. the command

   rgang -c [nodespec] sourcefile destfile

copies sourcefile from this node to destfile on each node in [nodespec].
"-C" instead of "-c" excludes this node from the destination list.

rgang optionally runs in tree-mode, in which matching rgang commands are
spawned on the nodes in a tree structure.  For example, on a 3-way
fan-out to 10 destination nodes,

              /---  n0007  +---  n0009
              |            \---  n0008
   startNode  +---  n0004  +---  n0006
              |            \---  n0005
              |            /---  n0003
              \---  n0000  +---  n0002
                           \---  n0001

the rgang command would run on the startNode and the middle three nodes,
with the requested command executed on all 10 nodes.  Used in copy mode,
this gives a scalable file distribution mechanism for large clusters,
essentially using a number of "worms" to replicate a file down the
various paths of the tree.

rgang uses rsh/rcp or ssh/scp, set by command line switch or environment
variable.  It also understands Kerberos and can forward tickets, control
encryption, and so forth.

rgang was written by Ron Rechenmacher here at Fermilab and is actively
supported.

Don Holmgren
Fermilab







More information about the Beowulf mailing list