InterSystems IRIS Data Platform 2019.2  /  InterSystems Cloud Manager Guide  /  Using ICM  /  Provision the Infrastructure

InterSystems: The power behind what matters   

Infrastructure Management Commands
The commands in this section are used to manage the infrastructure you have provisioned using ICM.
icm inventory
The icm inventory command lists the provisioned nodes, as at the end of the provisioning output, based on the information in the instances.json file (see The Instances File in the chapter “Essential ICM Elements”). For example:
$ icm inventory
Machine            IP Address       DNS Name                      
-------            ----------       --------                      
ACME-LB-TEST-0002   (virtual AM)
You can also use the -machine or -role options to filter by node name or role, for example, with the same cluster as in the preceding example:
$ icm inventory -role AM
Machine            IP Address       DNS Name                      
-------            ----------       --------                      
icm ssh
The icm ssh command runs an arbitrary command on the specified compute nodes. Because mixing output from multiple commands would be hard to interpret, the output is written to files and a list of output files provided, for example:
$ icm ssh -command "ping -c 5" -role DM
Executing command 'ping -c 5' on ACME-DM-TEST-0001...
Executing command 'ping -c 5' on ACME-DM-TEST-0002...
...output in ./ICM-4780136574/ACME-DM-TEST/ACME-DM-TEST-0001/ssh.out
...output in ./ICM-4780136574/ACME-DM-TEST/ACME-DM-TEST-0002/ssh.out
However, when the -machine or -role options are used to specify exactly one node, as in the following, the output is also written to the console:
$ icm ssh -command "df -k" -machine ACME-DM-TEST-0001
Executing command 'df -k' on ACME-DM-TEST-0001...
...output in ./ICM-4780136574/ACME-DM-TEST/ACME-DM-TEST-0001/ssh.out 

Filesystem     1K-blocks    Used Available Use% Mounted on
rootfs          10474496 2205468   8269028  22% /
tmpfs            3874116       0   3874116   0% /dev
tmpfs            3874116       0   3874116   0% /sys/fs/cgroup
/dev/xvda2      33542124 3766604  29775520  12% /host
/dev/xvdb       10190100   36888   9612540   1% /irissys/data
/dev/xvdc       10190100   36888   9612540   1% /irissys/wij
/dev/xvdd       10190100   36888   9612540   1% /irissys/journal1
/dev/xvde       10190100   36888   9612540   1% /irissys/journal2
shm                65536     492     65044   1% /dev/shm
The icm ssh command can also be used in interactive mode to execute long-running, blocking, or interactive commands on a compute node. Unless the command is run on a single-node deployment, the -interactive flag must be accompanied by a -role or -machine option restricting the command to a single node. If the -command option is not used, the destination user's default shell (for example bash) is launched.
See icm exec for an example of running a command interactively.
Two commands described in Service Management Commands, icm exec (which runs an arbitrary command on the specified containers) and icm session (which opens an interactive session for the InterSystems IRIS instance on a specified node) can be grouped with icm ssh as a set of powerful tools for interacting with your ICM deployment.
icm scp
The icm scp command securely copies a file or directory from the local ICM container to the host OS of the specified node or nodes. The command syntax is as follows:
icm scp -localPath local-path [-remotePath remote-path]
Both localPath and remotePath can be either files or directories. If remotePath is a directory, it must contain a trailing forward slash (/), or it will be assumed to be a file. If both are directories, the contents of the local directory are recursively copied; if you want the directory itself to be copied, remove the trailing slash (/) from localPath.
The default for the optional remote-path argument is /home/ssh-user. The root directory of this path, /home, is the default home directory; to change it, specify a different root directory using the Home field. The user specified by the SSHUser field must have the needed permissions for remotePath.
See also the icm cp command, which copies a local file or directory on the specified node into the specified container.

Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-09-19 06:44:29