HCMD CLIReferenceGuide hcmd0044
HCMD CLIReferenceGuide hcmd0044
Command Director
CLI Reference Guide
MK-90HCMD004-04
© 2014 Hitachi. Ltd. All rights reserved.
Hitachi, Ltd., reserves the right to make changes to this document at any time without
notice and assumes no responsibility for its use. This document contains the most
current information available at the time of publication. When new or revised information
becomes available, this entire document will be updated and distributed to all registered
users.
Some of the features described in this document might not be currently available. Refer
to the most recent product announcement for information about feature and product
availability, or contact Hitachi Data Systems Corporation at https://portal.hds.com.
Notice: Hitachi, Ltd., products and services can be ordered only under the terms and
conditions of the applicable Hitachi Data Systems Corporation agreements. The use of
Hitachi, Ltd., products is governed by the terms of your agreements with Hitachi Data
Systems Corporation.
Hitachi is a registered trademark of Hitachi, Ltd., in the United States and other
countries. Hitachi Data Systems is a registered trademark and service mark of Hitachi,
Ltd., in the United States and other countries.
AIX, AS/400, DB2, Domino, DS6000, DS8000, Enterprise Storage Server, ESCON, FICON,
FlashCopy, IBM, Lotus, MVS, OS/390, RS/6000, S/390, System z9, System z10, Tivoli,
VM/ESA, z/OS, z9, z10, zSeries, z/VM, and z/VSE are registered trademarks or
trademarks of International Business Machines Corporation.
All other trademarks, service marks, and company names in this document or web site
are properties of their respective owners.
Microsoft product screen shots are reprinted with permission from Microsoft Corporation.
Notice on Export Controls. The technical data and technology inherent in this
Document may be subject to U.S. export control laws, including the U.S. Export
Administration Act and its associated regulations, and may be subject to export or import
regulations in other countries. Reader agrees to comply strictly with all such regulations
and acknowledges that Reader has the responsibility to obtain licenses to export, re-
export, or import the Document and any Compliant Products.
2
Hitachi Command Director CLI Reference Guide
Contents
Preface................................................................................................. 5
Intended Audience...................................................................................................6
Product Version........................................................................................................6
Release notes.......................................................................................................... 6
Document revision level............................................................................................6
Referenced documents............................................................................................. 6
Document conventions............................................................................................. 7
Conventions for storage capacity values.....................................................................8
Accessing product documentation............................................................................. 8
Getting help.............................................................................................................8
Comments...............................................................................................................9
1 Overview.............................................................................................11
About the Command Director CLI............................................................................ 12
Installing and setting up the Command Director CLI on Windows.............................. 13
Installing and setting up the Command Director CLI on Linux....................................13
Removing the Command Director CLI...................................................................... 13
Command syntax................................................................................................... 14
Using the properties file..........................................................................................15
Command output................................................................................................... 15
Using the help option............................................................................................. 16
HCmD CLI commands.............................................................................................17
User Roles in the Command Director CLI..................................................................18
Notes on executing commands................................................................................18
3
Hitachi Command Director CLI Reference Guide
3 Report generation commands............................................................... 33
GetReportList.........................................................................................................34
GetReport..............................................................................................................35
Generating a Chargeback Overview report..........................................................35
Report information in CSV file................................................................................. 36
Chargeback Overview report..............................................................................36
Index..................................................................................................39
4
Hitachi Command Director CLI Reference Guide
Preface
This manual describes how to use the Hitachi Command Director CLI.
□ Intended Audience
□ Product Version
□ Release notes
□ Referenced documents
□ Document conventions
□ Getting help
□ Comments
Preface 5
Hitachi Command Director CLI Reference Guide
Intended Audience
This document is intended for users of Hitachi Command Director. You should
have a working knowledge of the following:
• Hitachi Device Manager, Hitachi Tuning Manager, and Hitachi Tiered
Storage Manager.
• Storage array and performance concepts.
• Service Level Objectives (SLOs) and Service Level Agreements (SLAs).
Product Version
This document revision applies to Hitachi Command Director v8.0.1 or later.
Release notes
Read the release notes before installing and using this product. They may
contain requirements or restrictions that are not fully described in this
document or updates or corrections to this document.
Referenced documents
The following Hitachi referenced documents are available for download from
the Hitachi Data Systems Support Portal: https://portal.HDS.com
• Hitachi Command Director User guide, MK-90HCMD001
• Hitachi Command Director Installation and Configuration guide,
MK-90HCMD002
• Hitachi Command Director API Reference Guide, MK-90HCMD005
• Hitachi Command Director Release Notes, RN-90HCMD003
6 Preface
Hitachi Command Director CLI Reference Guide
• Hitachi Command Suite System Requirements, MK-92HC209
Document conventions
This document uses the following typographic conventions:
Convention Description
Bold Indicates text on a window, other than the window title, including menus,
menu options, buttons, fields, and labels. Example: Click OK.
Italic Indicates a variable, which is a placeholder for actual text provided by the
user or system. Example: copy source-file target-file
Note: Angled brackets (< >) are also used to indicate variables.
Monospace Indicates text that is displayed on screen or entered by the user. Example:
pairdisplay -g oradb
< > angled brackets Indicates a variable, which is a placeholder for actual text provided by the
user or system. Example: pairdisplay -g <group>
Preface 7
Hitachi Command Director CLI Reference Guide
Conventions for storage capacity values
Physical storage capacity values (for example, disk drive capacity) are
calculated based on the following values:
Logical storage capacity values (for example, logical device capacity) are
calculated based on the following values:
Getting help
Hitachi Data Systems Support Portal is the destination for technical support
of your current or previously-sold storage systems, midrange and enterprise
servers, and combined solution offerings. The Hitachi Data Systems customer
support staff is available 24 hours a day, seven days a week. If you need
technical support, log on to the Hitachi Data Systems Support Portal for
contact information: https://portal.hds.com
8 Preface
Hitachi Command Director CLI Reference Guide
Hitachi Data Systems Community is a new global online community for HDS
customers, partners, independent software vendors, employees, and
prospects. It is an open discussion among these groups about the HDS
portfolio of products and services. It is the destination to get answers,
discover insights, and make connections. The HDS Community complements
our existing Support Portal and support services by providing an area where
you can get answers to non-critical issues and questions. Join the
conversation today! Go to community.hds.com, register, and complete your
profile.
Comments
Please send us your comments on this document to [email protected].
Include the document title and number, including the revision level (for
example, -07), and refer to specific sections and paragraphs whenever
possible. All comments become the property of Hitachi Data Systems
Corporation.
Thank you!
Preface 9
Hitachi Command Director CLI Reference Guide
10 Preface
Hitachi Command Director CLI Reference Guide
1
Overview
The Hitachi Command Director (HCmD) command line interface (CLI) refers
to commands that can be remotely executed from a remote client to the
HCmD server.
□ Command syntax
□ Command output
Overview 11
Hitachi Command Director CLI Reference Guide
About the Command Director CLI
The Command Director command line interface (HCmD CLI) communicates
with the HCmD server to perform application management operations, such
as bulk management of applications.
Note: To ensure compatibility, the version of the HCmD CLI client must
match the exact version of the HCmD server.
Connection mode
The Command Director server can operate in secure or unsecure mode.
However, the CLI connection to the Command Director server is unsecured
(in other words, it uses the HTTP protocol).
Command permissions
Run HCmD CLI commands in a command prompt window with administrator
privileges (set to run as administrator).
12 Overview
Hitachi Command Director CLI Reference Guide
Note: All other HCmD reports can be accessed by using the Hitachi
Command Director graphical user interface (GUI). A subset of reports is also
supported in the HCmD REST API. For more information, see the Hitachi
Command Director User Guide or the Hitachi Command Director API
Reference Guide.
The HCmD CLI package comes in a zip file located at: HCmD-installation-
folder\cli\windows\hcmdcli.zip folder. Open the zip file and extract all
files to a local directory. You can also extract the CLI package to a remote
client (your computer) and connect to the HCmD server (using the HTTP
protocol) for executing the commands.
Procedure
Overview 13
Hitachi Command Director CLI Reference Guide
Command syntax
When you execute a command in the Command Director CLI, you are
submitting a request to the Command Director server to perform report
generation and application management operations.
where:
• command
Submits requests to the Command Director server. The command names
are not case-sensitive. You can enter them in uppercase, lowercase, or as
a combination of both.
• options
Command arguments that modify the request to the Command Director
server. For example, the options for report commands let you filter report
data based on the report criteria you specify. Options are case-sensitive.
Each option has a single character representation and an alternate word
representation; for the single character, prefix the character with a single
dash; for the word, prefix the word with two dashes. For example: -p or
--port. Some options require an argument, which follows the option. For
example, the -u option is followed by a user ID.
If run on
If run
Option Argument the HCmD Description
remotely:
server:
You can also set the options in the properties file. When you do so, you do
not need to enter them from the command line.
Note: You can specify all options in the properties file except the password
option.
14 Overview
Hitachi Command Director CLI Reference Guide
If options are specified both in the properties file and from the command line,
the options specified from the command line take precedence. For more
information about the properties file and how to use it to execute commands,
see Using the properties file on page 15.
Example
For example, if you set the following values in the properties file:
• hcmd.ip.address = 127.0.0.1
• hcmd.port = 25015
• hcmd.user.name = system
• hcmdcli.file.path= C:/out/out.csv
Command output
The HCmD CLI returns an execution result on the console at the end of each
command execution.
Overview 15
Hitachi Command Director CLI Reference Guide
The following table lists the command output displayed when the command is
executed successfully and when it fails with errors.
Basic help
Basic help displays the format for commands and a list of commands and
options.
or
hcmdcli -pwd password --help
16 Overview
Hitachi Command Director CLI Reference Guide
5. DeleteApplications
6. GetVolumeProfiles
7. ModifyVolumeProfiles
Command help
Command help explains the specific command functions and the options you
can specify for those commands.
or
hcmdcli command -pwd password --help
Report generation GetReportList on page Use this command to display a list of reports
34 you can generate.
GetReport on page 35 Use this command to generate a report, and
save the report data in CSV format to a default
or user-specified folder.
Application GetVolumeProfiles on Use this command to generate a list of SLO
management page 22 profiles assigned to application volumes and
save the SLO profile information to a CSV file.
ModifyVolumeProfiles on Use this command to modify SLO profiles of
page 24 application volumes in bulk.
GetApplications on page Use this command to generate a list of
25 applications and save their details to a CSV file.
ModifyApplications on Use this command to modify application details
page 27 in bulk.
Overview 17
Hitachi Command Director CLI Reference Guide
HCmD operation Command Description
Users with the View role are unable to perform the operations listed below
and the following error message displays: "ERR_10107 : The user does not
have sufficient permissions to perform this operation."
• ModifyApplications
• DeleteApplications
• ModifyVolumeProfiles
For more information about user roles in Command Director, see the Hitachi
Command Director User Guide.
18 Overview
Hitachi Command Director CLI Reference Guide
5. Save the file in CSV format (or as an Excel spreadsheet if you want to
retain the formatting).
• Notification in HCmD web user interface for application management
commands.
When you modify SLO profile details of application volumes using the
ModifyVolumeProfiles command, modify applications using the
ModifyApplications command, or delete applications using the
DeleteApplications command, a warning dialog opens in the Resources
tab to notify the user about the application and SLO profile modifications.
The following is an example of a Warning dialog box that is displayed in
the HCmD web user interface:
Overview 19
Hitachi Command Director CLI Reference Guide
20 Overview
Hitachi Command Director CLI Reference Guide
2
Application management commands
This module describes the commands you can use to manage applications in
bulk using the HCmD CLI.
□ GetVolumeProfiles
□ ModifyVolumeProfiles
□ GetApplications
□ ModifyApplications
□ DeleteApplications
Syntax
Options
Option Description
For common options you can specify with the command, see Command
syntax on page 14.
Output
The output CSV file includes information in the following format:
Second and subsequent lines include values for the following fields:
• Application Name: The application name. For logical group applications,
this is the qualified application name derived from Device Manager storage
groups.
Note: For EMC volumes this field will display Unmonitored. SLO profiles
cannot be assigned to EMC volumes.
Examples
1. To obtain a list of SLO profiles assigned to volumes that are allocated to
applications that contain "01_HBA" in their names, in a CSV file named
sloappname.csv:
hcmdcli GetVolumeProfiles -pwd myPassword -outputfile c:
\mygeneratedfiles\sloappname.csv -appnamelike '01_HBA'
2. To obtain a list of SLO profiles assigned to volumes that are allocated to
applications tagged to either Americas or HR category, in a CSV file
named sloapptagged.csv:
hcmdcli GetVolumeProfiles -pwd myPassword -outputfile C:
\mygeneratedfiles\sloapptagged.csv -tags Geography[Americas]
Function[HR] -tagsearchmode any
Note: SLO profiles cannot be assigned to EMC volumes. The SLO Profile field
will display Unmonitored.
Prerequisites
Prepare the input file you must provide as input to the command:
1. Run the GetVolumeProfiles command to obtain a CSV file that includes
a list of applications, volumes allocated to the applications, and SLO
profiles assigned to the application volumes. The data rows in the CSV
file are in the following field order with a comma that separates each
field:
Application Name, Storage System, Volume, SLO Profile,
Volume Label, Pool ID, Pool Name, Storage Type, Storage Names
2. Edit the CSV file and modify only the SLO Profile field as shown in the
following format:
Application Name, Storage System, Volume, SLO Profile,
Volume Label, Pool ID, Pool Name, Storage Type, Storage Names
To modify the existing SLO profile name, specify the new SLO profile
name in this field. Make sure that the SLO profile you want to assign
exists in HCmD, and specify the SLO profile name as it appears on the
HCmD web user interface.
3. Save the CSV file with a different name.
Syntax
Options
Option Description
Specify the file name with a CSV extension and include the file path.
For common options you can specify with the command, see Command
syntax on page 14.
Example
To modify SLO profiles for all volumes allocated to the 9715-01-HBA
application:
1. Prepare the input CSV file:
a. In the output file obtained from the GetVolumeProfiles command,
identify the application whose volume SLO profile you want to
modify.
In the following figure, the volumes allocated to the application
9715-01-HBA are assigned to the Default SLO Profile.
b. In the SLO Profile field, enter the new SLO profile name.
c. Save the file as mod_vol.csv.
2. Run the ModifyVolumeProfiles command using the input file
mod_vol.csv:
hcmdcli ModifyVolumeProfiles -pwd myPassword -inputfile
mod_vol.csv
3. Verify that the SLO profile information is modified by running the
GetVolumeProfiles command to generate a CSV file that includes an
updated list of SLO profiles for the application volumes. Alternatively, you
can verify the change in the SLO Profile Details report for this application
in the All Applications business view in HCmD web user interface.
Note: Volume profiles cannot be updated using this command when the
application auto-create mode is logical group.
GetApplications
Use the GetApplications command to generate a CSV containing a list of
applications existing in HCmD, along with the application details for each.
Options
Option Description
For common options you can specify with the command, see Command
syntax on page 14.
Second and subsequent lines include values for the following fields:
• Application Name: The application name. For logical group applications,
this is the qualified application name.
• SLO Profile: The SLO profile assigned to the application.
• Tags: One or more tags specified in the format category[tag] assigned to
the application. If the application is not assigned any tag, this field
displays a hyphen.
• Emails: One or more email addresses associated with the application. If
the application does not include any email address, this field displays a
hyphen.
Examples
• To generate a CSV file named appname.csv with a list of applications that
include "05_HBA_17" in their names :
hcmdcli GetApplications -pwd myPassword -outputfile
c:\mygeneratedlist\appname.csv -appnamelike "05_HBA_17"
• To generate a CSV file named apptagged.csv with a list of applications
that are tagged to both Geography and Function categories:
hcmdcli GetApplications -pwd myPassword -outputfile
c:\mygeneratedlist\apptagged.csv -tags
Geography[Europe] Function[HR]-tagsearchmode all
ModifyApplications
Use the ModifyApplications command to modify the following information:
• Application name
You cannot change the name of a logical group application.
• SLO profile assigned to the application
• Tags assigned to the application
• Email addresses associated with the application
Prerequisites
Prepare the input file you must provide as input to the command:
Enter false (default) if you do not want to apply the SLO profile
modification to application volumes. For a logical group application,
the value of this field is always true.
• To modify existing tags assigned to the application, specify new tags in
the format category[tag] in the Tags field. To specify multiple
values, enter the category-tag pairs separated by commas and enclose
the group in double quotation marks. For example,
"Geography[Americas],Geography[APAC],Function[IT],Function[
Marketing]"
You can change the category-tag pair by assigning another pair that
exists in HCmD, or you can create a new category and tag names.
Category names and tag names cannot exceed 64 characters. Do not
use reserved words for new categories or tags. For a list of reserved
words, refer to the topic on “Managing custom tags and tag categories
section” in the module on Managing resources in the Hitachi Command
Director User Guide.
To unassign existing tags, enter a hyphen or leave the field blank.
• To modify the email address associated with the application, specify
the new email address in the Emails field. To specify multiple values,
Syntax
Options
Option Description
Specify the file name with a CSV extension and include the file path.
For common options you can specify with the command, see Command
syntax on page 14.
Examples
To modify application information for application name ESX_76_15:
To apply the SLO profile change to all volumes associated with this
application, enter true after the New Name field, as shown in the
following figure:
DeleteApplications
Use the DeleteApplications command to delete applications from HCmD.
You cannot use this command to delete logical group applications.
Prerequisites
Prepare the input file you must provide as input to the command:
1. Run the GetApplications command to obtain a CSV file that includes a
list of applications and application details.
2. Edit the CSV file to include only those applications you want to delete.
3. Save the CSV file with a different name.
Syntax
Options
Option Description
Specify the file name with a CSV extension and include the file path.
For common options you can specify with the command, see Command
syntax on page 14.
2. Review details of the applications you want to delete and confirm the
applications to delete.
3. Delete rest of the applications from the file, and save the file as
del_app.csv.
4. Run the DeleteApplications command using the input file
del_app.csv:
hcmdcli DeleteApplications -pwd myPassword -inputfile
del_app.csv
5. Verify that the applications are deleted by running the GetApplications
command to generate an updated CSV file that does not include the
deleted applications.
□ GetReportList
□ GetReport
Note: Only the Chargeback Overview report is supported using the HCmD
command line interface. For more information about this report, see
Generating a Chargeback Overview report on page 35. Other reports are
supported in the HCmD REST API.
Syntax
password
hcmdcli GetReportList -pwd password
By default, the HCmD CLI displays the command output in your command
window. However, you can redirect the output to a file using the redirect
character (>). For example:
hcmdcli GetReportList -pwd password > filename
Options
Option Description
For common options you can specify with the command, see Command
syntax on page 14.
Example
To obtain the currently supported report:
hcmdcli GetReportList
You can specify report criteria as part of the command input to include only
the information that meets the criteria, and limit the amount of data saved in
the CSV file. For more information about report criteria, see About the
Command Director CLI on page 12.
Note: To access other reports that are managed and monitored by HCmD,
use the REST API. For more information, see the Hitachi Command Director
API Reference Guide.
Prerequisites
Run the GetReportList command to list the Chargeback Overview report.
Syntax
hcmdcli GetReport -pwd password -rn reportname[-f filename]
Options
Option Description
For common options you can specify with the command, see Command
syntax on page 14.
For this report, you must specify the attribute listed in the following table:
Example
To generate the Chargeback Overview report for a Virtual Storage Platform
G1000 and save the data to the C:/out.csv file:
hcmdcli GetReport -pwd myPassword -rn STANDARD_REPORTS/
CHARGEBACK/
CHARGEBACK_OVERVIEW -storagesystem in vspG1000 -f C:/out.csv
Output
To view the Chargeback Overview report information included in the output
CSV file, see Chargeback overview report on page 36.
Note: The following fields are not supported for EMC volumes: Pool ID,
Tier, Logical group path, SLO Profile, External volume, External
storage system, Virtual Model, Virtual Serial No., and Virtual LDEV.
A hyphen will appear in the field(s) to indicate that no field value is available.
Index 39
Hitachi Command Director CLI Reference Guide
U
user roles 18
V
version 6
View role 18
40 Index
Hitachi Command Director CLI Reference Guide
Hitachi Command Director CLI Reference Guide
Hitachi Data Systems
Corporate Headquarters
2845 Lafayette Street
Santa Clara, California 95050-2639
U.S.A.
www.hds.com
Americas
+1 408 970 1000
[email protected]
Asia Pacific
+852 3189 7900
[email protected]
MK-90HCMD004-04