Select Nodes using Shell-Based Tools

There are a number of ways to select nodes, also known as console servers, as targets on which to run a command. These can be used multiple times, or together, to select a range of console servers.

Select Nodes

Select individually by name, address, Lighthouse VPN address, config index or smart group (as per --list- nodes output):

node-command --node-name BNE-R01-IM4248

node-command --node-address 192.168.0.33

node-command --node-index nodes-1

node-command --smartgroup="model-acm"

To select all nodes:

node-command --all

Run commands on selected nodes

When nodes are selected, the commands to be run for each can be given. These are run on each managed node in parallel. Any command that can be run from a node shell can be run on each managed node.

Note:   All commands are run as root.

For example, to check the version on two specific, configured nodes, selecting one by name and the other by index, run the following command:

node-command --node-name BNE-R01-ACM7004-5 --node-index nodes-2 cat

/etc/version

When using non-trivial selection arguments, check which target nodes have been selected on the initial command pass by using the --list-nodes switch rather than the final command.