2017-06-21 18:02:59 +00:00
|
|
|
nodeshell(8) -- Execute command on many nodes in a noderange through ssh
|
|
|
|
=========================================================================
|
|
|
|
|
|
|
|
## SYNOPSIS
|
|
|
|
|
2021-03-02 20:51:48 +00:00
|
|
|
`nodeshell [options] <noderange> <command to execute on each node>`
|
2017-06-21 18:02:59 +00:00
|
|
|
|
|
|
|
## DESCRIPTION
|
|
|
|
|
|
|
|
Allows execution of a command on many nodes in parallel. Like noderun(8), it
|
|
|
|
accepts and interpolates confluent attribute expressions as documented in
|
2017-06-21 18:30:54 +00:00
|
|
|
nodeattribexpressions(5). `nodeshell` provides stdout as stdout and stderr
|
|
|
|
as stderr, unlike psh which combines all stdout and stderr into stdout.
|
2017-06-21 18:02:59 +00:00
|
|
|
|
2018-02-23 19:26:40 +00:00
|
|
|
## OPTIONS
|
2021-03-02 20:51:48 +00:00
|
|
|
|
|
|
|
* `-c COUNT`, `-f COUNT`, `--count=COUNT`
|
|
|
|
Specify the maximum number of instances to run concurrently
|
|
|
|
|
|
|
|
* `-m MAXNODES`, `--maxnodes=MAXNODES`
|
|
|
|
Specify a maximum number of nodes to run remote ssh command to, prompting
|
|
|
|
if over the threshold
|
|
|
|
|
|
|
|
* `-n`, `--nonodeprefix`
|
|
|
|
Do not prefix output with node names
|
|
|
|
|
|
|
|
* `-p PORT`, `--port=PORT`
|
|
|
|
Specify a custom port for ssh
|
2021-05-25 19:46:22 +00:00
|
|
|
|
|
|
|
* `-s SUBSTITUTION`, `--substitutename=SUBSTITITUTION`
|
|
|
|
Specify a substitution name instead of the nodename. If no {} are in the substitution,
|
|
|
|
it is considered to be an append. For example, '-s -ib' would produce 'node1-ib' from 'node1'.
|
|
|
|
Full expression syntax is supported, in which case the substitution is considered to be the entire
|
|
|
|
new name. {node}-ib would be equivalent to -ib. For example, nodeshell -s {bmc} node1
|
|
|
|
would ssh to the BMC instead of the node.
|
|
|
|
|
2017-06-21 18:02:59 +00:00
|
|
|
## EXAMPLES
|
|
|
|
|
|
|
|
* Running `echo hi` on for nodes:
|
|
|
|
`# nodeshell n1-n4 echo hi`
|
|
|
|
`n1: hi`
|
|
|
|
`n2: hi`
|
|
|
|
`n3: hi`
|
|
|
|
`n4: hi`
|
|
|
|
|
|
|
|
* Setting a new static ip address temporarily on secondary interface of four nodes:
|
2018-05-22 13:59:30 +00:00
|
|
|
`# nodeshell n1-n4 ifconfig eth1 172.30.93.{n1}`
|
|
|
|
|
|
|
|
* If wanting to use literal {} in the command, they must be escaped by doubling:
|
|
|
|
`# nodeshell n1-n4 "ps | awk '{{print $1}}'"`
|
2017-06-21 18:02:59 +00:00
|
|
|
|
|
|
|
## SEE ALSO
|
|
|
|
|
|
|
|
noderun(8)
|