ethcmdall - Man Page
Name
ethcmdall
(Linux) Executes a command on all hosts. This powerful command can be used for configuring servers, verifying that they are running, starting and stopping host processes, and other tasks.
NOTE: ethcmdall depends on the Linux convention that utilities return 0 for success and > 0 for failure. If ethcmdall is used to execute a non-standard utility like diff or a program that uses custom exit codes, then ethcmdall may erroneously report "Command execution FAILED" when it encounters a non-zero exit code. However, the command output is returned normally and the error may be safely ignored.
Syntax
ethcmdall [-pqP] [-f hostfile] [-h hosts] [-u user]
[-T timelimit] cmd
Options
- --help
Produces full help text.
- -p
Runs command in parallel on all hosts.
- -q
Specifies quiet mode and does not show the command to execute.
- -P
Outputs the hostname as a prefix to each output line. This can make script processing of the output easier.
- -f hostfile
Specifies the file with hosts in cluster. Default is /etc/eth-tools/hosts file.
- -h host
Specifies the list of hosts to execute command on.
- -u user
Specifies the user to perform the command as:
- For hosts, the default is current user.
- -T timelimit
Specifies the time limit in seconds when running host commands. Default is -1 (infinite).
Examples
Operations on Host
ethcmdall date
ethcmdall 'uname -a'
ethcmdall -h 'elrond arwen' date
HOSTS='elrond arwen' ethcmdall date
Environment Variables
The following environment variables are also used by this command:
Notes
All commands performed with ethcmdall must be non-interactive in nature. ethcmdall waits for the command to complete before proceeding. For example, when running host commands such as rm, the -i option (interactively prompt before removal) should not be used. (Note that this option is sometimes part of a standard bash alias list.) For further information about Linux operating system commands, consult the man pages.
When performing ethcmdall against hosts, SSH is used internally. The command ethcmdall requires that password-less SSH be set up between the host running the Intel(R) Ethernet Fabric Suite FastFabric Toolset and the hosts ethcmdall is operating against. The ethsetupssh FastFabric tool can aid in setting up password-less SSH.