Preparing a command file

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

When you install the Export Tool, the command.txt file is stored in the installation directory. This file contains sample scripts for your command file. It is recommended that you customize scripts in command.txt according to your needs. For detailed information 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 below.

Example of a command file

ip 158.214.135.57:1099          ; Specifies IP address of
                                 ; SVP and connection port number
dkcsn 123456                     ; Specifies target DKC serial
                                 ; number.
login expusr                     ; Logs user into SVP
show                             ; Outputs storing period in 
                                 ; SVP to standard output
group PhyPG                      ; Specifies type of data to 
                                 ; be exported and storing 
                                 ; period 
group RemoteCopy                 ; Specifies type of data to 
                                 ; be exported 
range 200610010850:200610010910  ; Specifies range in 
                                 ; which files will be saved
outpath out                      ; Specifies 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 SVP whose IP address is 158.214.135.57, and 1099 as a port number to connect SVP. You must log into SVP when using the Export Tool.

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

For detailed information about the ip subcommand, see ip.

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 into SVP.

The login subcommand logs the specified user into 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 the Export Tool. See Requirements for the Export Tool for reference.

The show subcommand checks SVP to find the period of monitoring data stored in 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 the above example, the monitoring data is stored every 1 minute in the term of 1:00 - 15:00 on October 1, 2006. When you run the Export Tool, you can export monitoring data into the file.

The use of the show subcommand is not mandatory, but it is recommended that you include the show subcommand in your command file. If an error occurs when you run the 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. 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 the Export Tool, it will export the statistics about remote copy operations by TrueCopy in the term specified by the range subcommand.

If you run the 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 the 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