
Example 10-8 Use of the help -l command
dscli> help -l mkflash
mkflash [ {
Man pages
A man page is available for every DS CLI command. Man pages are most commonly seen in
dscli> mkflash
or
dscli> help mkflash
10.7.4 Return codes
When the DS CLI is exited, an exit status code is provided. This is effectively a return code. If DS CLI commands are issued as separate commands (rather than using script mode) then a return code will be presented for every command. If a DS CLI command fails (for instance, due to a syntax error or the use of an incorrect password), then a failure reason and a return code will be presented. Standard techniques to collect and analyze return codes can be used.
The return codes used by the DS CLI are shown in Table
Table 10-1 DS CLI return codes
Return code | Category | Description |
|
|
|
0 | Success | The command was successful. |
|
|
|
2 | Syntax error | There is a syntax error in the command. |
|
|
|
3 | Connection error | There was a connection problem to the server. |
|
|
|
4 | Server error | The DS CLI server had an error. |
|
|
|
5 | Authentication error | Password or userid details are incorrect. |
|
|
|
6 | Application error | The DS CLI application had an error. |
|
|
|
In Example
Example 10-9 Sample Windows bat file to test return codes
@ECHO OFF
dscli lsflash
if errorlevel 5 goto level5 if errorlevel 4 goto level4 if errorlevel 3 goto level3 if errorlevel 2 goto level2 if errorlevel 0 goto level0
:level6