Chapter 1. TotalStorage Productivity Center for Replication introduction 17
1.5.1 Command line interface overview
In addition to the GUI interface, a command line interface (CLI) is also provided with your
installation. A command-line interface command consists of one to four types of components,
arranged in the following order:
򐂰 The
command name
򐂰 One or more flags
򐂰 each followed by any flag parameters it might require
򐂰 The
command parameter
Example 1-1 shows the CLI structure.
Example 1-1 CLI structure
csmcli command name -flag flag parameter -command parameter
The
command name specifies the task that the command-line interface is to perform. For
example, lssess tells the command-line interface to list sessions, and mksess tells the
command-line interface to create a session.
Flags modify the command. They provide additional information that directs the
command-line interface to perform the command task in a specific way. For example, the -v
flag tells the command-line interface to display the command results in verbose mode. Some
flags may be used with every command-line interface command. Others are specific to a
command and are invalid when used with other commands. Flags are preceded by a hyphen
(-), and may be followed immediately by space and a flag parameter.
Flag parameters provide information that is required to implement the command modification
that is specified by a flag. If you do not provide a parameter, then a default value is assumed.
For example, you can specify -v on, or -v off to turn verbose mode on or off; but if you
specify -v only, then the flag parameter is assumed to be on.
The
command parameter provides basic information that is necessary to perform the
command task. When a command parameter is required, it is always the last component of
the command; and it is not preceded by a flag. Some commands permit multiple command
parameters with each parameter separated by a blank space and not a comma (unlike flag
parameters that allow multiple values).
The CLI can be invoked in three different ways:
򐂰 Single-shot
cli> csmcli mkcpset –cptype fc mySession
򐂰 Script
cli> csmcli –script ~/scripts/volreport
򐂰 Interactive
cli> csmcli
Full details of the CLI can be found in the manual IBM TotalStorage Productivity Center for
Replication Command-Line Interface User’s Guide, SC32-0104.
Help can be obtained for the relevant syntax via the commands shown in Figure 1-16 on
page 18. In the first command csmcli help, we request generic help and as a result we are
presented with a list of valid commands. In the second instance we are requesting help on a
specific command via the csmcli help rmsess.
18 IBM TotalStorage Productivity Center for Replication on Windows 2003
Figure 1-16 CSMCLI help
C:\CSM-CLI>csmcli help
adddevice lsdevice lsvol rmsess
chdevice lshaservers mkcpset rmsnmp
chsess lslss mklogpkg rmstdby
cmdsess lspair mkpath setasstdby
exit lspath mksess setoutput
hareconnect lsrolepairs mksnmp setparameter
hatakeover lsrolescpset quit setstdby
help lssess repcli showcpset
lsavailports lssessactions rmcpset showdevice
lscpset lssessdetails rmdevice showha
lscptypes lssnmp rmpath showsess
C:\CSM-CLI>csmcli help rmsess
rmsess
Use the rmsess command to delete an existing session.
Syntax
>>-rmsess-- --+---------+-- --session_name--+-[...]-+----------><
'- -quiet-' '- -----'
-quiet
An optional parameter that turns off the confirmation prompt for this
command.
session_name [...] | -
Specifies the session name to delete. Separate multiple session names
with a white space between each name. Alternatively, use the dash (-)
to specify that input for this parameter comes from an input stream
(STDIN).
You can use the rmsess command to delete an existing session.
* Session session_name successfully deleted.
* Session session_name does not exist.
* Cannot delete a session currently in progress. Stop the session
before attempting to delete it.
An invocation example:
rmsess session2
The resulting output:
Are you sure you want to delete session session2? Y/N
Y
Session session2 successfully deleted.
C:\CSM-CLI>

Get IBM TotalStorage Productivity Center for Replication on Windows 2003 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.