Preparing a command file

To run Export Tool, you must write scripts for exporting monitoring data. When writing scripts, you must write several subcommands in a command file. When you run Export Tool, the subcommands in the command file are run sequentially, and then the monitoring data is saved in files.

When you install Export Tool, the command.txt file is stored in the installation directory. This file contains sample scripts for your command file. Customize the scripts in command.txt according to your needs. For details about subcommand syntax, see Export Tool command reference.

In the following example of a command file, a semicolon (;) indicates the beginning of a comment, so the characters from a semicolon to the end of the line are comments. The scripts in this sample command file are described in the following example.

Example of a command file

ip 158.214.135.57:1099          ; Specifies the IP address of
                                 ; the SVP and the connection port number
dkcsn 123456                     ; Specifies the target DKC serial
                                 ; number.
login expusr                     ; Logs the user into the SVP
show                             ; Outputs the storing period in 
                                 ; the SVP to standard output
group PhyPG                      ; Specifies the type of data to 
                                 ; be exported and the storing 
                                 ; period 
group RemoteCopy                 ; Specifies the type of data to 
                                 ; be exported 
range 200610010850:200610010910  ; Specifies the range in 
                                 ; which files will be saved
outpath out                      ; Specifies the directory in
                                 ; which files will be saved
option compress                  ; Specifies whether to
                                 ; compress files
apply                            ; Executes processing for 
                                 ; saving monitoring data in 
                                 ; files

Scripts in this sample command file

This script specifies that you are logging into the SVP whose IP address is 158.214.135.57 and that 1099 is the port number to connect to the SVP. You must log on to the SVP when using Export Tool.

The ip subcommand specifies the IP address of the SVP. You must include the ip subcommand in your command file.

For detailed information about the ip subcommand, see ip.

For Export Tool, a directory is created with a value name specified by the ip subcommand under the following directory:

When the value specified by the ip subcommand is an IP address, a hexadecimal value is specified as the directory name. Periods (.) and colons (:) are not included. When it is a host name, the IP address of the specified server is specified as the directory name.

The following table provides examples of the directory names.

Value specified by the ip subcommand

Directory name

ip subcommand value is ip 158.214.135.57 (for IPv4)

9ED68739

ip subcommand value is ip 0000:0000:0020:00B4:0000:0000:9ED6:874 (for IPv6)

000000000020:00B40000:00009ED6874

ip subcommand value is ip host01 (when the IP address of host01 is 158.214.135.57)

9ED68739

This script specifies the serial number of the system from which monitored data will be acquired. This subcommand specifies the system to provide the monitored data. Make sure to notate the dkcsn subcommand in the command file.

For detailed information about the dkcsn subcommand, see dkcsn in dkcsn.

This script specifies that you use the user ID expusr and the password passwd to log on to the SVP.

The login subcommand logs the specified user into the SVP. You must include the login subcommand in your command file.

For detailed information about the login subcommand, see login.

olh-caution.gif When you write the login subcommand in your command file, you must specify a user ID that should be used exclusively for running Export Tool. See Requirements for Export Tool for reference.

The show subcommand checks the SVP to find the period of monitoring data stored in the SVP and the data collection interval (called sampling interval in Performance Monitor), and then outputs them to the standard output (for example, the command prompt) and the log file.

The show subcommand displays the storing period of monitoring data.

The following is an example of information that the show subcommand outputs:

Range From: 2006/10/01 01:00  -  To: 2006/10/01 15:00
 Interval: 1min.

In this example, the monitoring data is stored every 1 minute in the term of 1:00 - 15:00 on October 1, 2006. When you run Export Tool, you can export monitoring data into the file.

The use of the show subcommand is not required, but it is recommended that you include the show subcommand in your command file. If an error occurs when you run Export Tool, you might be able to find the error cause by checking the log file for information issued by the show subcommand.

For detailed information about the show subcommand, see show.

The group subcommand specifies the type of data that you want to export. Specify an operand following group to define the type of data to be exported.

The example script group PhyPG in Preparing a command file specifies to export usage statistics about parity groups. Also, the script group RemoteCopy specifies to export statistics about remote copy operations by TrueCopy and global-active device. You can describe multiple lines of the group subcommand to export multiple monitoring items at the same time.

For detailed information about the group subcommand, see group.

The range subcommand specifies the term of monitoring data to be exported. Use these subcommands when you want to narrow the export-target term within the stored data.

You can use this subcommand to narrow the export-target term for all of the monitoring items you can specify by the group subcommand.

Specify a term within "Range From XXX To XXX" which is output by the show subcommand.

In the sample file in Preparing a command file, the script range 200610010850:200610010910 specifies the term 8:50-9:10 on October 1, 2006. This script is applied to the group RemoteCopy subcommand in this example. When you run Export Tool, it will export the statistics about remote copy operations by TrueCopy and global-active device in the term specified by the range subcommand.

If you run Export Tool without specifying the range subcommand, the monitoring data in the whole storing period (data in the period displayed by the show subcommand) will be exported.

For detailed information about the range subcommand, see range

This script specifies that files should be saved in the directory named out in the current directory.

The outpath subcommand specifies the directory in which files should be saved. For detailed information about the outpath subcommand, see outpath.

This script specifies that Export Tool should compress monitoring data in ZIP files.

The option subcommand specifies whether to save files in ZIP format or in CSV format. For detailed information about the option subcommand, see option.

The apply subcommand saves monitoring data in files. For detailed information about the apply command, see apply.

Related topics