D-Link DSN-540 CLI User's Guide for DSN-1100-10 - Page 35

Stream Mode, Completion Code Mode

Page 35 highlights

3.2.3 Stream Mode By default, the CLI directs output to two destinations: Error messages go to standard error (STDERR). All other output goes to standard out (STDOUT). This separation may be undesirable for some scripting methods. Therefore, you can enable stream mode to direct all output to STDOUT, obviating the need to read two streams at the same time. To enable stream mode, type: Mode streamMode Mixed_STDOUT_Only To disable stream mode, type: Mode streamMode Mixed_STDOUT_STDERR If the CLI is invoked with redirection to a file using a standard redirection (greater-than) character, standard out will be directed to the file and error messages will be directed to the screen. 3.2.4 Completion Code Mode Completion code mode determines whether the CLI returns a text code and text description each time it executes (or tries to execute) a command line, or only when the command line fails due to an error. Figure 3-5 shows examples of error messages returned due to errors in command lines. 192.168.55.224 :: create Zeus 3tb jbod UA_E_REQUEST_FAILED = Error - CIM_ERR_FAILED: A general error occurred that is not covered by a more specific error code: "Not enough space available 192.168.55.224 :: addInitiator UA_E_INVALIDARG = Error - Expected 1 arguments 192.168.55.224 :: addInitiator Windows3 UA_E_UNEXPECTED = Error - CIM_ERR_ALREADY_EXISTS: Operation cannot be carried out because an object already exists: "An Initiator with that name already exists" Figure 3-5. Examples of Errors Displayed in Completion Code Mode Command Line Interface User's Guide 25

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97

Command Line Interface User’s Guide
25
3.2.3
Stream Mode
By default, the CLI directs output to two destinations:
°
Error messages go to standard error (STDERR).
°
All other output goes to standard out (STDOUT).
This separation may be undesirable for some scripting methods. Therefore, you can enable
stream mode to direct all output to STDOUT, obviating the need to read two streams at the
same time.
To enable stream mode, type:
Mode streamMode Mixed_STDOUT_Only
To disable stream mode, type:
Mode streamMode Mixed_STDOUT_STDERR
If the CLI is invoked with redirection to a file using a standard redirection
(greater-than) character, standard out will be directed to the file and error
messages will be directed to the screen.
3.2.4
Completion Code Mode
Completion code mode determines whether the CLI returns a text code and text description
each time it executes (or tries to execute) a command line, or only when the command line
fails due to an error. Figure 3-5 shows examples of error messages returned due to errors in
command lines.
192.168.55.224 :: create Zeus 3tb jbod
UA_E_REQUEST_FAILED
= Error - CIM_ERR_FAILED: A general error
occurred that is not covered by a more specific error code: "Not
enough space available
192.168.55.224 :: addInitiator
UA_E_INVALIDARG
= Error - Expected 1 arguments
192.168.55.224 :: addInitiator Windows3
UA_E_UNEXPECTED
= Error - CIM_ERR_ALREADY_EXISTS: Operation cannot
be carried out because an object already exists: "An Initiator with
that name already exists"
Figure 3-5. Examples of Errors Displayed in Completion Code Mode