11-1-4 examples of batch file creation, 11-2 executing batch function of commands – HP XP Command View Advanced Edition Software User Manual
Page 275
Command line interface commands
275
4-11-1-4 Examples of batch file creation
The following shows an example of a batch file created according to the input rules from (1) to (3).
beginbatch
hdvmcli ADDLUN model=XP12000 serialnum=14053 portname=CL1-A domain=0
devnum=816 lun=100
hdvmcli ADDLUN model=XP12000 serialnum=14053 portname=CL1-A domain=0
devnum=817 lun=101
hdvmcli ADDLUN model=XP12000 serialnum=14053 portname=CL1-B domain=0
devnum=816 lun=102
hdvmcli ADDLUN model=XP12000 serialnum=14053 portname=CL1-B domain=0
devnum=817 lun=103
endbatch
4-11-2 Executing batch function of commands
This section explains how to execute the batch function of commands by using a created batch file:
When specifying the batch option (-b or --batch), specify the following items on the command line
or in the properties file:
•
The URL of the Device Manager server
•
Options other than -i or --input
The following items cannot be specified with the batch option, as this will cause an error:
•
The -i or --input option
•
Commands
•
Command parameters
•
help
NOTE:
For details about displaying help information when specifying the batch option, see section
.
The following shows an example of an execution with the batch option specified, and an example of
the command execution results.
In this example, a batch file created in
is specified as the file name batch.txt and is
executed.
Command execution example:
C:\hdvm> hdvmcli http://servername:2001/service -b batch.txt
Command execution results example:
In the execution results, the start line number and the end line number, which are the numbers
counted from the top of the batch file and indicate the start and end line number of the batch
processing, are displayed following the executed command name. In the following output example,
AddLUN(2-5)
indicates that the AddLun commands on lines 2 to 5 of the batch file have
processed together.
NOTE:
A blank line is also counted as a line.
RESPONSE OF ADDLUN(2-5): An instance of StorageArray
objectID=*****
name= [email protected]