3ware HTML Bookshelf



3ware® CLI Guide > CLI Syntax Reference > Return Code

Return Code
While informative messages are written to standard output, error messages are written to standard error. On success, 0 is returned. On failure, 1 is returned.
To view the return code for Linux:
At the shell command prompt type:
echo $?
The screen prints either a 0 or a 1, depending on whether the command was successful or not.
For example, if you had a 3ware controller with an ID of 0, you could type this command:
tw_cli /c0 show
(c0 information displayed here)
echo $?                
0
If you type:
tw_cli /c7 show
error: (CLI003) specified controller does not exist.
echo $?                
1
This example fails (returns 1) because there is no controller 7.
To view the return code for Windows, in a command window type
tw_cli /c0 show
(c0 info displayed here)
if errorlevel 0 echo 0
0
 
tw_cli /c7 show
error....
if errorlevel 1 echo 1
1
This example fails (returns 1) because there is no controller 7.

Copyright AMCC 2004-2008
To contact Support, log in at https://www.3ware.com

www.3ware.com
1-858-535-6517
1-800-840-6055