Running Commands on Nodes

Applies To: Windows Compute Cluster Server 2003

The cluster administrator can run commands remotely on one or more nodes by doing one of the following:

  • Click the Run command from within the Compute Cluster Administrator.

  • Running clusrun at a command line.

Remote command execution

Using the Compute Cluster Administrator snap-in, a cluster administrator can issue a command-line action on one or more selected compute nodes. The command is immediately run through the Job Scheduler on a priority basis. The command can be any valid command-line argument. The credentials of the user submitting the command-line action is used to run the action.

A cluster administrator can use remote command execution to run scripts and programs on compute nodes. This command is very useful when running commands across multiple nodes. You can run commands on paused nodes.

Using this feature is the same as running the clusrun <node, node…> command.

You can place a script on a shared folder on the head node and then remotely run the script.

Important

Do not run commands that have a user interface. An example of such a command is Notepad.exe. If you run a command that results in a user interface, Microsoft Management Console will stop responding.

To run a command on a node

  1. From the Compute Cluster Administrator, navigate to the Node Management tile by selecting Node Management in the left-most (navigation) pane.

  2. In the central details pane, select one or more nodes and right-click.

  3. Select Execute Command….

  4. On the Execute Command dialog box, enter the command you want to run on the node or nodes selected.

    Note

    The commands you can run on a node are limited to local commands; you cannot run remote applications on the compute node.

  5. The command you enter will run under your credentials as a cluster administrator. If you want to run a command under user credentials, select Run As User.

  6. Click OK.

    The command you entered will now run on each node.

    If you are entering more than one command, the command drop-down text box stores previously issued commands and you can select from the list that is displayed.

The clusrun Command

The clusrun command takes the following form:

clusrun

[/scheduler:host][/user:[domainname\]username] [/pwd:{password | *}][/nodes:nodename{,nodename}*] [/all] [/pausednodes] [/readynodes][/stdin:file] [/spooldir:folder] [{/env:name=val}*]

command [arguments]

where

    command          - Command to execute.

    arguments        - Optional command arguments.

    options:

        /? or help   - Display this help message.

        /user        - User name under which the command will be executed.

        /pwd         - Password of the specified user.

        /nodes       - Execute command on specified compute nodes.

        /all         - Execute command on all compute nodes.

        /pausednodes - Execute command on paused compute nodes.

        /readynodes  - Execute command on ready compute nodes.

        /scheduler   - Cluster name. Default is localhost.

        /stdin       - Input file for standard input of the command.

        /spooldir    - Where to store the command output.

        /env         - Environment variables for the command.

See Also

Concepts

Compute Cluster Administrator Operations