esscmd command
Runs a single command in a list of nodes.
Synopsis
esscmd [-N { Group Name | Node List}][-v ][-h ] command
Availability
Available with IBM Storage Scale System.
Description
The esscmd can be used within the container for running remote commands on a parsed nodelist. This command helps on running single command in multiple nodes. For example, esscmd -N ems,essio1,essio2 "uname -a". The result will be the output of the command from each node in the list.
Parameters
- -h | --help
- Displays usage information about this command and exits.
- -N {Group Name | Node List}
- Provides a comma-separated list of hosts.
- -v | -V
- Shows verbose output.
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred.
Security
You must have root authority to run the esscmd command.
Example
- This program can be used to run same command in a list of
nodes.
The system displays output similar to this:esscmd -N node1,node2 "ls -lrth"ESS UNIFIED v6.1.6.0 CONTAINER root@cems0:/ # esscmd -N essio3,essio4 "ls -lrth | wc -l" [INFO] 2023-01-17T19:31:36.427863 Running a cmd: ls -lrth | wc -l in essio3,essio4 Using /etc/ansible/ansible.cfg as config file PLAY [Ansible Ad-Hoc] ************************************************************** Tuesday 17 January 2023 19:31:36 +0000 (0:00:00.052) 0:00:00.052 ******* TASK [shell] ************************************************************** changed: [essio4] => changed=true ansible_facts: discovered_interpreter_python: /usr/libexec/platform-python cmd: ls -lrth | wc -l delta: '0:00:00.003507' end: '2023-01-17 14:30:42.090178' rc: 0 start: '2023-01-17 14:30:42.086671' stderr: '' stderr_lines: <omitted> stdout: '6' stdout_lines: <omitted> changed: [essio3] => changed=true ansible_facts: discovered_interpreter_python: /usr/libexec/platform-python cmd: ls -lrth | wc -l delta: '0:00:00.004267' end: '2023-01-17 14:30:03.861104' rc: 0 start: '2023-01-17 14:30:03.856837' stderr: '' stderr_lines: <omitted> stdout: '7' stdout_lines: <omitted> PLAY RECAP ************************************************************** essio3 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 essio4 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Tuesday 17 January 2023 19:31:37 +0000 (0:00:00.743) 0:00:00.796 ******* ========================================================================= shell ------------------------------------------------------------------- 0.74s ESS UNIFIED v6.1.6.0 CONTAINER root@cems0:/ #
See also
See also the following IBM
Storage Scale: Command and
Programming Reference topics:
- mmaddnode
- mmchconfig
- mmchlicense
- mmcrnodeclass
- mmstartup
Location
/opt/ibm/ess/deploy/bin