A P P E N D I X  C

Diagnostics Commands

The diags commands allow you to manage the diagnostics tests.


Known Issues with Diagnostics

Do Not Access the SP While Diagnostics Are Loaded

While running diagnostics on your server, do not interact with the Service Processor (SP) through the command-line interface or IPMI.

The sensor commands cannot be used reliably while the diagnostics are running. Issuing sensor commands, while diagnostics are loaded, may result in "false" or erroneous critical events being logged in the events log. The values returned by the sensors are not reliable in this case.

Benign Error Message

When the diagnostics are launched on the platform, the system tries to mount the floppy drive. The following error is returned:

mount : Mounting /dev/fd0 on /mnt/floppy failed. No such device.

You can safely ignore this error message.

TABLE C-1 lists the groups of diags subcommands.



Note - The diagnostics commands are also provided in the Sun Fire V20z Server User Guide, 817-5248.




TABLE C-1 Diagnostics Subcommand Groups

Subcommand

Description

diags cancel tests

Cancels one or more diagnostic tests, resulting in the deletion of the results data.

diags get state

Returns the state of the platform-diagnostics control server.

diags get tests

Returns data describing the diagnostic tests that are available and their requirements and parameters.

diags run tests

Submits one or more diagnostic tests for execution.

diags start

Starts the Service Processor (SP) and platform-diagnostics framework.

diags terminate

Terminates all diagnostics tests and terminates the diagnostics subsystem.




Note - Every command returns a return code upon completion.




Diags Cancel Tests Subcommand

Description: Cancels one or more diagnostic tests, resulting in the deletion of results data.

Format

Command format:

diags cancel tests [[{ -t | --test} TEST HANDLE] [{-a|--all}] [{-H | --noheader}]]

TABLE C-2 lists the arguments for this subcommand.



Note - Specifying no arguments cancels all tests for each device in the server.




TABLE C-2 Arguments for Subcommand diags cancel tests

Arguments

Description

{ -t | --test}

Specifies the test to cancel.

NOTE: The TEST HANDLE is the same TEST HANDLE that is output to the screen when you submit the test.

{-a | --all}

Cancels all tests.

{-H | --noheader}

Suppresses header output.


Return Codes

TABLE C-3 lists the return codes for this subcommand.


TABLE C-3 Return Codes for Subcommand diags cancel tests

Return Code

ID

Description

NWSE_Success

0

Command successfully completed.

NWSE_InvalidUsage

1

Invalid usage: bad parameter usage, conflicting options specified.

NWSE_RPCTimeout

2

Request was issued, but was not serviced by the server. RPC procedure timed out and the request may or may not have been serviced by the server.

NWSE_RPCNotConnected

3

Unable to connect to the RPC server.

NWSE_InvalidArgument

4

One or more arguments were incorrect or invalid.

NWSE_NoPermission

6

Not authorized to perform operation.

NWSE_MissingArgument

7

Missing argument(s).



Diags Get State Subcommand

Description: Returns the state of the platform-diagnostics control server.

Format

Command format:

diags get state 

If the result returned from the command is that the platform is up and ready for diagnostics, then you can submit platform diagnostic tests for execution.

Success text message - The platform diagnostics are up and are available to receive test requests.

Platform diags not ready message - The platform diagnostics are loading, but not available yet.

Diagnostic system not loaded message - The diagnostics system is not loaded. Use the diags start command to load diagnostics.

Return Codes

TABLE C-4 lists the return codes for this subcommand.


TABLE C-4 Return Codes for Subcommand diags get state

Return Code

ID

Description

NWSE_Success

0

Command successfully completed.

NWSE_InvalidUsage

1

Invalid usage: bad parameter usage, conflicting options specified.

NWSE_DeviceError

25

Unable to read or write to the device.



Diags Get Tests Subcommand

Description: Returns data describing the diagnostic tests that are available. This data includes the specific test name and the module to which the test applies.

Format

Command format:

diags get tests [{ -a | --all}] [{-H | --noheader}]] [{-D | --delim <DELIMITER>}] 

TABLE C-5 lists the arguments for this subcommand.


TABLE C-5 Arguments for Subcommand diags get tests

Arguments

Description

{-a | --all}

Specifies to return information for all tests in the server. Specifying no arguments also returns all tests available for each device in the server.

{-H | --noheader}

Suppresses header output.

{-D | --delim <DELIMITER>}

Delimits columns with the specified delimiter. Headings are also delimited unless suppressed. The delimiter can be any character or string.


Return Codes

TABLE C-6 lists the return codes for this subcommand.


TABLE C-6 Return Codes for Subcommand diags get tests

Return Code

ID

Description

NWSE_Success

0

Command successfully completed.

NWSE_InvalidUsage

1

Invalid usage: bad parameter usage, conflicting options specified.

NWSE_RPCTimeout

2

Request was issued, but was not serviced by the server. RPC procedure timed out and the request may or may not have been serviced by the server.

NWSE_RPCNotConnected

3

Unable to connect to the RPC server.

NWSE_InvalidArgument

4

One or more arguments were incorrect or invalid.

NWSE_NoPermission

6

Not authorized to perform this operation.

NWSE_MissingArgument

7

Missing argument(s).



Diags Run Tests Subcommand

Description: Submits one or more diagnostic tests for execution.

Format

Command format:

diags run tests [ [{ -n | --name} TEST NAME ] [{-a| --all}] [-H | --noheader] [-P | --noprogress] [{-m | --module} MODULE NAME] [-v | --verbose] 

TABLE C-7 lists the arguments for this subcommand.


TABLE C-7 Arguments for Subcommand diags run tests

Arguments

Description

{ -n | --name}

Specifies the specific test(s) to execute. Run diags get tests for a list of individual test names.

{-a | --all}

Specifies that all tests are to be executed. Run diags get tests for a list of all available tests. Specifying no arguments also runs all tests for each device in the server.

{-H |--noheader}

Suppresses header output.

{-P | --noprogress}

Suppresses progress dots when waiting for test results.

{-m | --module}

Specifies that only tests for the specified module are to be executed. Run diags get tests for a list of modules.

[-v | --verbose]

If specified, the Test Details display following the test result line.


The following data displays after a test is run:

Return Codes

TABLE C-8 lists the return codes for this subcommand.


TABLE C-8 Return Codes for Subcommand diags run tests

Return Code

ID

Description

NWSE_Success

0

Command successfully completed.

NWSE_InvalidUsage

1

Invalid usage: bad parameter usage, conflicting options specified.

NWSE_RPCTimeout

2

Request was issued, but was not serviced by the server. RPC procedure timed out and the request may or may not have been serviced by the server.

NWSE_RPCNotConnected

3

Unable to connect to the RPC server.

NWSE_InvalidArgument

4

One or more arguments were incorrect or invalid.

NWSE_NoPermission

6

Not authorized to perform this operation.

NWSE_MissingArgument

7

Missing argument(s).



Diags Start Subcommand

Description: Starts the SP and platform-diagnostics framework. You must execute this command before running any tests. After running this command, you can immediately run Service Processor tests or wait for the subcommand diags get state to return the result platform diags available, at which point you can run platform tests.

The platform state must be either off or OS Communicating. Refer to the subcommand platform get os state for details about these states.

Format

Command format:

diags start {--noplatform} 

 

Arguments

Description

{--noplatform}

Lets you enable diagnostics when the platform power is on and the OS is running.

Note: If you use this option, you cannot use any platform diagnostics, which include diagnostics for memory, NIC cards and storage.


Return Codes

TABLE C-9 lists the return codes for this subcommand.


TABLE C-9 Return Codes for Subcommand diags start

Return Code

ID

Description

NWSE_Success

0

Command successfully completed.

NWSE_InvalidUsage

1

Invalid usage: bad parameter usage, conflicting options specified.

NWSE_RPCTimeout

2

Request was issued, but was not serviced by the server. RPC procedure timed out and the request may or may not have been serviced by the server.

NWSE_RPCNotConnected

3

Unable to connect to the RPC server.

NWSE_InvalidArgument

4

One or more arguments were incorrect or invalid.

NWSE_NoPermission

6

Not authorized to perform this operation.

NWSE_InvalidOpForState

22

Invalid operation for current state.



Diags Terminate Subcommand

Description: Terminates all diagnostics tests and the diagnostics session.

Format

Command format:

diags terminate 

Return Codes

TABLE C-10 lists the return codes for this subcommand.


TABLE C-10 Return Codes for Subcommand diags terminate

Return Code

ID

Description

NWSE_Success

0

Command successfully completed.

NWSE_InvalidUsage

1

Invalid usage: bad parameter usage, conflicting options specified.

NWSE_RPCTimeout

2

Request was issued, but was not serviced by the server. RPC procedure timed out and the request may or may not have been serviced by the server.

NWSE_RPCNotConnected

3

Unable to connect to the RPC server.

NWSE_InvalidArgument

4

One or more arguments were incorrect or invalid.

NWSE_NoPermission

6

Not authorized to perform this operation.

NWSE_MissingArgument

7

Missing argument(s).