IBM TotalStorage DS6000 Series User Manual

Page 239

Advertising
background image

Chapter 10. DS CLI

215

# Default target Storage Image ID
devid: IBM.2105-23953

An example of a command where the password is entered in plain text is shown in
Example 10-17. In this example the

lsuser

command is issued directly to a DS MC. Note that

the password will still be sent using SSL so a network sniffer would not be able to view it
easily. Note also that the syntax between the command and the profile is slightly different.

Example 10-17 Example of a DS CLI command that specifies the username and password

C:\Program Files\IBM\dscli>dscli -hmc1 10.0.0.1 -user admin -passwd passw0rd lsuser
Name Group
=============
admin admin
csadmin op_copy_services
exit status of dscli = 0

C:\Program Files\IBM\dscli>

Issuing a DS CLI command and scripting it

Having created a userid and preferably a password file, and then having edited the default
profile, it is now possible to issue DS CLI commands without logging onto the DS CLI
interpreter. An example is shown in Example 10-18.

Example 10-18 Establishing a FlashCopy with a single command

anthony@aixsrv:/opt/ibm/dscli > dscli mkflash -nocp 1004:1005
CMUC00137I mkflash: FlashCopy pair 1004:1005 successfully created.
exit status of dscli = 0
anthony@aixsrv:/opt/ibm/dscli >

The command can also be placed into a file and that file made executable. An example is
shown in Example 10-19.

Example 10-19 Creating an executable file

anthony@aixsrv:/home >echo “/opt/ibm/dscli/dscli mkflash -nocp 1004:1005” > flash1005
anthony@aixsrv:/home >chmod +x flash1005
anthony@aixsrv:/home >./flash1005
anthony@aixsrv:/home >CMUC00137I mkflash: FlashCopy pair 1004:1005 successfully created.
anthony@aixsrv:/home >

Finally, the command could be issued using script mode. An example of creating and using
script mode is shown in Example 10-20.

Example 10-20 Using script mode

arielle@aixsrv:/opt/ibm/dscli >echo “mkflash -nocp 1004:1005” > scripts/flash1005
arielle@aixsrv:/opt/ibm/dscli >dscli -script scripts/flash1005
arielle@aixsrv:/opt/ibm/dscli >CMUC00137I mkflash: FlashCopy pair 1004:1005 successfully
created.
arielle@aixsrv:/opt/ibm/dscli >

Advertising