next up previous contents
Next: consl Up: Utility Programs Previous: sync-node   Contents


pwr

 Usage: pwr $<$FUNCTION$>$ $<$NODESPEC$>$... [OPTION]...  


This program is a wrapper script that calls an external power command (specified in /etc/sysimage.conf) to power on/off cluster nodes.

FUNCTION can be one of: on, off, cycle, status, ledon, ledoff, or ledstatus
Note: Unambiguous short forms of the functions are also accepted.

NODESPEC can be:
[-h] HOSTNAME  
$[$-r] RANGESPEC (any text with one or more RANGEs in brackets)
  a RANGE is of the form $<$a-b [,x-y $\vert$ ,z]...$>$, where a$<$b and x$<$y
  ie: cn[1-10,15,20-32] or su[1,4]cn[1-32] or my[1-32]nodes
-re REGEXP (perl-style regular expression matching hostnames)
-c CLASS (oneSIS class name)

Options:
-h, -host=HOSTNAME Operate on hostname
-r, -range=RANGESPEC Specify a range of nodes to operate on
-re, -regexp=REGEXP Specify a regular expression of nodes to operate on
-c, -class=CLASS Specify a class of nodes to operate on
-p, -parallelism=NUM Specify the maximum number of parallel commands to run
    (default: no limit)
-d, -dryrun Show command(s) that would be executed
-q, -quiet Suppress output

The pwr script is a convenient wrapper script supplied to provide a unified interface for handling power management for cluster nodes. It enables the same command to be used on every cluster regardless of the underlying mechanisms for handling node power.

Note: At least one valid SPECFORMAT directive and a POWERCMD for each FUNCTION must be supplied for the pwr command to be able to perform that function.

The pwr script builds commands that it runs (in parallel) to power on, power off, cycle, or query the power status of a given set of nodes. It can also turn on, turn off, or query the status of a chassis LED (or similar mechanism) if that functionality is available.

To power on nodes named cn1 through cn100:

To power off all nodes with hostnames starting with cn and ending with sn: To power cycle all nodes belonging to the `compute' class: Several different commands may be being issued under the covers. The actual command that is run is specified in /etc/sysimage.conf with a POWERCMD directive.

For example consider an environment using IPMI for remote power operations and assume hostname of the form node1 use node1-ipmi for their ipmi interface. Yo have pwr use the ipmipower utility in this scenario, you could add the following lines to /etc/sysimage.conf: SPECFORMAT freeipmi_spec -h ext_range HOST:/$/-ipmi/


next up previous contents
Next: consl Up: Utility Programs Previous: sync-node   Contents
root 2017-02-23