beautypg.com

Using a single command with output, Using an input file to execute a script – Avago Technologies 3ware SAS 9750-4i User Manual

Page 14

background image

Chapter 1. Introduction to the 3ware Command Line Interface

6

3ware SATA+SAS RAID Controller Card CLI Guide, Version 10.0

The main prompt is displayed, indicating that the program is awaiting a
command.

//localhost>

3

At the CLI prompt, you can enter commands to show or act on 3ware
controllers, units, and drives.

For example,

//localhost> show

displays all controllers in the system and shows summary information
about them, like this:

Ctl Model Ports Drives Units NotOpt RRate VRate BBU

------------------------------------------------------------

c0 9750-4I 4 12 2 0 1 1 -

c1 9650SE-4 4 4 1 0 3 5 TESTING

c2 7500-12 12 8 3 1 2 - -

Using a single command with output

You can use 3ware CLI with line arguments, processing a single command at
a time. To do so, simply enter the command and the arguments.

Single commands can be useful when you want to perform a task such as
redirecting the output of the command to a file. It also allows you to use the
command line history to eliminate some typing.

Syntax

tw_cli

Example

tw_cli /c0 show diag > /tmp/3w_diag.out

Using an input file to execute a script

You can operate 3ware CLI scripts by executing a file. The file is a text file
containing a list of CLI commands which you have entered in advance. Each
command must be on a separate line.

Syntax

tw_cli -f

Where

is the name of the text file you want to execute.

Example

tw_cli -f clicommand.txt