From:	CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  3-FEB-1989 08:57
To:	MRGATE::"ARISIA::EVERHART"
Subj:		DOITON utility for executing commands on other nodes.


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Fri,  3 FEB 89 05:30:51 PDT
Received: from NSS.Cs.Ucl.AC.UK by KL.SRI.COM with TCP; Fri, 3 Feb 89 05:31:10 PST
Received: from vax1.physics.oxford.ac.uk by NSS.Cs.Ucl.AC.UK 
           via Janet with NIFTP  id aa05076; 3 Feb 89 12:58 GMT
Date:		 3-FEB-1989 13:15:53 GMT +01:00
From:		MACALLSTR%vax1.physics.oxford.ac.uk@NSS.Cs.Ucl.AC.UK
To:		info-vax <@NSS.Cs.Ucl.AC.UK:info-vax@kl.sri.com>
Subject:	DOITON utility for executing commands on other nodes.
Sender:         John_Macallister <MACALLSTR%vax1.physics.oxford.ac.uk@NSS.Cs.Ucl.AC.UK>
From:           John_Macallister <MACALLSTR%vax1.physics.oxford.ac.uk@NSS.Cs.Ucl.AC.UK>
X-Info:         Nuclear Physics Lab,Keble Rd,Oxford OX1 3RH. Phone+44-865-273388
X-Info2:        Fax +44-865-273418. Telex 83295 NUCLOX G.

Here's something which may be of interest to a few people.
                     .....

            The DOITON Utility.
            ===================


DOITON lets you execute any command on another cluster node.  

Here are the procedures I have been using to execute any command on one
 ( or more : simply have a procedure which runs through executing DOITON
  on each node ) cluster node(s).

The files are:
                 DOITON.COM                - user command file
                 YOUR$SYSTEM:OXDOITON.COM  - object command file
                 Network object definition.
                 DOITON.HLP                - help file

You may define   DOITON:==@xxx:DOITON  in your login file.

Assumptions are of a uniform cluster of any sort and that proxy's are
 in use. ( Uniform means that the commands, objects, files are visible
 on all nodes ). It could also be used for general DECnet nodes provided the
 relevant files are visible.

This procedure has saved me hours when having to update VAX's, microVAX's
 and VAXstations. A DOITONALL procedure which runs through all nodes in the
 cluster ( could be simply a list of $ DOITON <node> <command> commands ) lets
 you update all nodes more or less simultaneously!

I'm aware of SYSMAN in V5 but DOITON is accessible to all users. This version
 is for VMS 4.7 as I haven't yet upgraded to V5.

Good luck,
  John

Files are to be found below.

========================== DOITON.COM ======================
$ SET NOON
$ SET NOVER
$ !
$ ! Execute a command on another node.
$ !
$ ! P1 - remote node name ( no default ).
$ ! P2 - command to be executed .
$ !
$ IREP=0
$ AGAIN_P1:
$ IREP=IREP+1
$ IF IREP.GT.5 THEN GOTO DOITON_EXIT
$ IF P1.EQS."" THEN INQUIRE P1 "Node name on which to execute the command?"
$ IF P1.EQS."" THEN GOTO AGAIN_P1
$ P1=P1-"::"
$ !
$ IREP=0
$ AGAIN_P2:
$ IREP=IREP+1
$ IF IREP.GT.5 THEN GOTO DOITON_EXIT
$ IF P2.EQS."" THEN INQUIRE P2 "Command to be executed?"
$ IF P2.EQS."" THEN GOTO AGAIN_P2
$ !
$ OPEN/WRITE IOIO TEMP_DOITON_COM_HERE.TMP
$ WRITE IOIO "''P2' ''P3' ''P4' ''P5' ''P6' ''P7' ''P8'"
$ CLOSE IOIO
$ COPY/NOLOG TEMP_DOITON_COM_HERE.TMP 'P1'::SYS$LOGIN:TEMP_DOITON_COM.TMP
$ DELE/NOLOG TEMP_DOITON_COM_HERE.TMP.*
$ TYPE 'P1'::"TASK=OXDOITON"
$ DELE/NOLOG 'P1'::SYS$LOGIN:TEMP_DOITON_COM.TMP.*
$ DOITON_EXIT:
$ EXIT

=========================================================================


======================== Define/set obj at startup  ====================
$ !
$ ! Define the permanent network objects on all nodes.
$ !
$ SET NOVER
$ SET NOON
$ RUN SYS$SYSTEM:NCP
DEFINE OBJECT OXDOITON NUMBER 0 FILE YOUR$SYSTEM:OXDOITON.COM PROXY BOTH
EXIT
$ SET NOVER
$ EXIT
========================================================================



========================= YOUR$SYSTEM:OXDOITON.COM =======================
$ SET NOVER
$ SET NOON
$ !
$ ! Execute a remote command procedure found in SYS$LOGIN:DOITON_COM.TMP .
$ !
$ DEFINE/PROC SYS$OUTPUT SYS$NET
$ !
$ TYPE SYS$INPUT
 The following command or procedure will be executed remotely.
................................................................................
$ TYPE SYS$LOGIN:TEMP_DOITON_COM.TMP
$ TYPE SYS$INPUT
................................................................................
$ ! Do it.
$ WRITE SYS$OUTPUT "Now running procedure on node ''F$LOGICAL(""SYS$NODE"")' ."
$ @SYS$LOGIN:TEMP_DOITON_COM.TMP
$ WRITE SYS$OUTPUT "Procedure completed on node ''F$LOGICAL(""SYS$NODE"")' ."
$ !
$ EXIT
=========================================================================

======================= DOITON Help item ================================
1 DOITON
 Execute a command on another node within the Department.

 Format

    $ DOITON <node> <command>

 <node> is the node name of the remote system on which the command will
      be executed.
 <command> is the command to be executed. 

2 Examples

 The command 

  $ DOITON V6 SHOW USERS

  will show the currently logged in users on node V6.

 The command

  $ DOITON VS3 @U1:[BLOGS]CHECKFILES.COM

  will execute the command procedure CHECKFILES.COM in user BLOGGS'
  directory.
2 Comment
 Only commands or procedures which produce some output or no output may
  be executed withe the  $ DOITON  command. Commands requiring interactive
  input from the terminal cannot normally be executed.
============================================================================

