Creating a default configuration setup with a profile file

You can create default settings for the command-line interface by defining one or more profiles on the system. For example, you can specify the storage management console (SMC) for the session, the output format for list commands, the number of rows per page in the command-line output, and the banner that is included with the command-line output.

If a user enters a value with a command that is different from a value in the profile, the command overrides the profile.

You have several options for using profile files:
  • You can modify the default profile. The default profile, dscli.profile, is installed in the profile directory with the software. For example, c:\Program Files\IBM\DSCLI\profile\dscli.profile is the directory path for the Windows platform and /opt/ibm/dscli/profile/dscli.profile is the directory path for UNIX and Linux platforms.
  • You can create a personal default profile by making a copy of the system default profile as <user_home>/dscli/profile/dscli.profile.
  • You can create a profile for the storage unit operations. Save the profile in the user profile directory. For example:
    • <user_home>\dscl\profile\operation_name1
    • <user_home>\dscl\profile\operation_name2

    These profile files can be specified using the DS CLI command parameter -cfg <profile_name>. If the -cfg profile file is not specified, the user's default profile file is used. If a user's profile file does not exist, the system default profile file is used.

The home directory <user_home> is defined by the Java system property named "user.home" The location of your password file is determined by your operating system. The following examples are home directories in different operating systems:
Windows operating system
For a Windows operating system, the property value defaults to the environment variable %USERPROFILE%. As a result, your personal profile is C:\Documents and Settings\username\dscli\profiles\dscli.profile.
UNIX or Linux operating system
For an UNIX or Linux operating system, the property value defaults to the environment variable $HOME. As a result, your personal profile is ~/dscli/profile/dscli.profile.
OpenVMS system
For an OpenVMS operating system, the property value defaults to the logical name SYS$LOGIN. As a result, your personal profile is [.dscli.profile]dscli.profile.
Note: The values of the Java system properties can be redefined by JRE options. If you are having problems, check to see if you have an environment setting like the following on your local system:
_JAVA_OPTIONS=-Duser.home=…

When you install the command-line interface software, the default profile is installed in the profile directory with the software. The file name is dscli.profile. For example. c:\Program Files\IBM\DSCLI\profile\dscli.profile.

Example profile file modification: The following steps represent a typical modification process for some of the key items. Making these changes before you begin using DS CLI commands could save you time.
  1. Click the DSCLI icon on your desktop (a DOS window opens)
  2. Enter edit dscli.profile at the command prompt. The profile configuration file is displayed.
  3. Scroll down to the # sign in front of HMC1: and remove the # sign.
  4. Enter the correct IP address of your management console.
  5. Scroll down to the # sign in front of DEVID and remove the # sign.
  6. Enter the serial number of your machine type (include the values for manufacture, machine type, and serial number).
  7. Save the file.
  8. Enter cd.. at your command prompt.
  9. Enter DSCLI at your command prompt and the DS CLI applications starts. You are asked to provide only your user ID and password and not the address of your management consoles.

Table 1 provides the list of profile variables that you can use to create the profile.

Table 1. Profile variables
Variable Description
banner: on|off Enables or disables the banner that appears before the command output. This variable is equivalent to the command option -bnr. The command option -bnr overrides this default value.
delim Specifies a delimiter character for the format: delim variable. The default character is a comma. This variable is equivalent to the command option -delim. The command option -delim overrides this default value.
devid Specifies the storage image ID that is the target for the command. This value is equivalent to the command option -dev. The command option -dev overrides this default value.
format Specifies the output format for list commands.
Specify one of the following formats:
  • default: Specifies default output.
  • xml: Specifies XML format.
  • delim: Specifies columnar format. Columns are delimited with the character that you must specify with the delim variable.
  • stanza: Specifies a horizontal table.
This variable is equivalent to command option -fmt. The command option -fmt overrides this default value.
fullid Specifies that IDs display in fully qualified format, which includes the storage image ID.
header: on|off Enables or disables the headers that display with the columns of data in the list commands. This variable is equivalent to the command option -hdr. The command option -hdr overrides this default value.
hmc1 Specifies the primary Storage Manager IP address. This variable is equivalent to the command option -hmc1. The command option -hmc1 overrides this default value.
hmc2 Specifies the secondary Storage Manager IP address. This variable is equivalent to the command option -hmc2. The command option -hmc2 overrides this default value.
locale Specifies the language for the output on the local computer.
  • ar: Arabic
  • be: Byelorussian
  • bg: Bulgarian
  • ca: Catalan
  • cs: Czech
  • da: Danish
  • de: German
  • el: Greek
  • en: English
  • es: Spanish
  • et: Estonian
  • fi: Finnish
  • fr: French
  • gu: Gujarati
  • hi: Hindi
  • hr: Croatian
  • hu: Hungarian
  • in: Indonesian
  • is: Icelandic
  • it: Italian
  • iw: Hebrew
  • ja: Japanese
  • kk: Kazakh
  • kn: Kannada
  • ko: Korean
  • lt: Lithuanian
  • lv: Latvian (Lettish)
  • mk: Macedonian
  • mr: Marathi
  • ms: Malay
locale, continued
  • nl: Dutch
  • no: Norwegian
  • pa: Punjabi
  • pl: Polish
  • pt: Portuguese
  • ro: Romanian
  • ru: Russian
  • sa: Sanskrit
  • sh: Serbo-Croatian
  • sk: Slovak
  • sl: Slovenian
  • sq: Albanian
  • sr: Serbian
  • sv: Swedish
  • ta: Tamil
  • te: Telugu
  • th: Thai
  • tr: Turkish
  • uk: Ukrainian
  • vi: Vietnamese
  • zh: Chinese
paging: on|off Controls the display of output. If paging is enabled, a limited number of lines of output displays when a command is issued. The lines do not scroll. You must set the number of lines per page with the rows variable. This variable is equivalent to command option -p. The command option -p overrides this default value.
timeout Set timeout value of client/server synchronous communication. The unit of the value is second. The default value is 420 seconds. You can set this timeout if the processing of a command ends by timeout due to network or client/server performance issue.
Note: The command timeout value can be longer than this value because one command can consist of multiple client/server requests.
timeout.connection
Set timeout value to establish client or server connection. The unit of this value is seconds. The timeout value must be greater than zero. System default socket timeout value is used if the value is set to zero. The default value is 20 seconds.
Notes:
  1. If the DS CLI returns a connection error, check for the following conditions:
    • Is there a secure physical connection between the client and server?
    • Is the default timeout value too short to establish a connection?
  2. Setting a connection timeout value too short can cause unexpected connection problems.
remotedevid Specifies the remote storage image ID. This variable is equivalent to the command option -remotedev. The command option -remotedev overrides this default value.
rows Specifies the number of rows per page of output if the paging variable is enabled. This variable is equivalent to command option -r. The command option -r overrides this default value.
verbose: on|off Enables or disables verbose output. This variable is equivalent to the command option -v. The command option -v overrides this default value.

Example

#
# DS CLI Profile
#

#
# Management Console/Node IP Address(es)
#   hmc1 and hmc2 are equivalent to -hmc1 and -hmc2 command options.
#hmc1:	127.0.0.1
#hmc2:	127.0.0.1

#
# Default target Storage Image ID
#    "devid" and "remotedevid" are equivalent to 
#    "-dev storage_image_ID" and "-remotedev storeage_image_ID" command options,
#     respectively. 
#devid:		IBM.1750-AZ12341
#remotedevid:	IBM.1750-AZ12341

#
# locale
#    Default locale is based on user environment.
#locale:		en

# Timeout value of client/server synchronous communication in second.
#    DSCLI command timeout value may be longer than client/server communication
#    timeout value since multiple requests may be made by one DSCLI command
#    The number of the requests made to server depends on DSCLI commands.
#    The default timeout value is 420 seconds.
#timeout:		900

# Socket connection timeout value in seconds.
#    The timeout value must be greater than zero.
#    System default socket timeout value is used if timeout value is set to zero.
#    The default connection timeout value is 20 seconds.
#timeout.connection: 20

# Output settings
#
# ID format of objects:
#   on:		fully qualified format
#   off:	short format
fullid:		off

# Paging and Rows per page. 
# paging enables/disables paging the output per line numbers specified by "rows".
# "paging" is equivalent to "-p on|off" option.
#   on  : Stop scrolling per output lines defined by "rows".
#   off : No paging. (default)
# "rows" is equivalent to "-r #" option.
paging:		off
#rows:		24

# Output format type for ls commands, which can take one of the following values:
#   default: Default output
#   xml    : XML format
#   delim  : delimit columns using a character specified by "delim"
#   stanza  : Horizontal table format
# "format" is equivalent to option "-fmt default|xml|delim|stanza".
#format:		default

# delimitter character for ls commands.
#delim:		|
# Display banner message. "banner" is equivalent to option "-bnr on|off".
#   on  : Banner messages are displayed. (default)
#   off : No Banner messages are displayed.
banner:		on

#
# Display table header for ls commands. "header" is equivalent 
# to option "-hdr on|off".
#   on  : Table headers are displayed. (default)
#   off : No table headers are displayed.
header:		on

#
# Display verbose information. "verbose" is equivalent to option "-v on|off".
#   on  : Display verbose information.
#   off : No verbose information.
verbose:	off

# End of Profile
Related reference
mkuser
managepwfile
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2004, 2007. All Rights Reserved.