Bright:pshell

From Define Wiki
Revision as of 10:18, 11 February 2014 by Michael (talk | contribs) (Created page with "== The Parallel Shell == The Parallel shell allows a user to run one or commands on several nodes. Bright provides 'pexec' for this purpose. Pexec can be run from with the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Parallel Shell

The Parallel shell allows a user to run one or commands on several nodes. Bright provides 'pexec' for this purpose. Pexec can be run from with the OS, cmsh or the cmgui, although there are some differences in how the commands are executed.

Using cmsh or cmgui the commands are executed in parallel by defeault on each of the selected nodes. In contrast running the parallel shell from within the OS executes the commands sequentially one node at a time, unless it is daemonized using the -b flag.

The reason for this is that the OS does not have built in restrictions to prevent all nodes rebooting at the same time for example. This would put a large strain on power supplies potentially causing the entire system to go down. As such pexec should not be run from within the OS, other than to control cmdaemon across multiple nodes.


Parallel Shell in the OS (should not be used)

This should not be used other than for restarting cmdaemon. Please see the help on the pexec command in the OS.


Parallel Shell using CMSH

[bright61->device]% pexec -n node001,node002 "cd ; ls"

[node001] :
    anaconda-ks.cfg
    install.log
    install.log.syslog
[node002] :
    anaconda-ks.cfg
    install.log
    install.log.syslog

= Other parallel commands available

  • pcopy: parallel copy
  • pkill: parallel kill
  • plist: List the parallel commands that are currently running, with their tracker ID
  • pping: ping nodes in parallel
  • pread: read a small text file in parallel
  • psave: save a small text file in parallel
  • pwait: wait for parallel commands that are running to complete


Parallel Shell using CMGUI

The parallel shell is run from the Pshell Tab in the cluster section of the resource tree.