Chapter 1. Introduction to the 3ware Command Line Interface
8
3ware 9000 Series Serial ATA Controller CLI Guide
2
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 details about them, like
this:
Ctl Model Ports Drives Units NotOpt RRate VRate BBU
------------------------------------------------------------
c0 7500-12 12 8 3 1 2 - -
c1 9506S-12 12 6 1 0 3 5 TESTING
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 <command line arguments>
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 <filename>
Where
<filename>
is the name of the text file you want to execute.
Example
tw_cli -f clicommand.txt
This example executes the file
clicommand.txt
, and runs the CLI commands
included in that file.
Scripting example
Following is a a scripting example using a text file called config_array.txt,
containing three commands. This example sets up a 12-port controller with