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, command output is still 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

Quiet mode, do not show command to execute.

-P

Outputs the hostname as prefix to each output line. This can make script processing of 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 code.
-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:

HOSTS

List of hosts, used if -h option not supplied.

HOSTS_FILE

File containing list of hosts, used in absence of -f and -h.

FF_MAX_PARALLEL

When -p option is used, maximum concurrent operations are performed.

FF_SERIALIZE_OUTPUT

Serialize output of parallel operations (yes or no).

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, internally SSH is used. 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.

Info

Intel Corporation Copyright(C) 2020 EFSFFCLIRG (Man Page)