HP NetRAID-4M Controller User Manual

Page 314

Advertising
background image

15-4

Command Line Interface User’s Guide

$ clist.txt

The CLI commands in this script file must be entered on a
single line and separated by a ":" (colon), as in the following
example. The script file may contain CLI and UNIX
commands. In the example, the first line of the script is the
UNIX ls command. The second line of the script is a series of
CLI commands separated by a ":" Note the use of the backslash
to make the script file more readable while adhering to the
single line restriction.

ls /tmp

/usr/sbin/hpncli open hpn1:\

logfile start /append 11-4-00-log.txt:\

container list:\

logfile end:\

close: exit

Enter the

hpncli

command followed by "@" (at sign) and a

script filename with a .hpn filename extension, as in the
following example.

$ hpncli @clist.hpn

The commands in this script file must be separated by a
carriage return. The script file may contain CLI commands
only. See Executing a Script from the CLI Command Prompt on
page 15-2 for an example of a script with commands separated
by a carriage return.

Enter a series of CLI commands at the UNIX command
prompt. A series of commands entered after the

hpncli

command must be delimited by ":" (colon) and enclosed in a
pair of double quotation marks (" "), as in the following
example.

$ hpncli "open HPN0:logfile start /append=true 3-22-

log.txt: container list: logfile end:close:exit"

You can also execute a CLI script at the same time that you open the
controller. The following example shows how to execute the
getcfg.hpn script file while at the same time opening the controller:

$ hpncli "open HPN0:@/usr/sbin/getcfg.hpn"

See Example 1 on page 15-6 for more information on the getcfg.hpn
script file.

Advertising