A P P E N D I X  C

Diagnostics Commands

The diags commands allow you to manage the diagnostics tests.

TABLE C-1 lists the diags subcommands.



Note - Every subcommand returns a return code upon completion.





Note - The diagnostics commands are also provided in the Sun Fire V20z and Sun Fire V40z--Troubleshooting Techniques and Diagnostics Guide.




TABLE C-1 Diagnostics Subcommands

Subcommand

Description

diags cancel tests

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

diags get modules

Returns a list of test modules that are available. Queries the framework to obtain the test module information.

diags get state

Returns the state of the platform-diagnostics control server.

diags get tests

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

diags run tests

Submits one or more diagnostics 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.



Diags Cancel Tests Subcommand

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

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).

NWSE_ServiceNotAvailable

24

Requested service is not available.



Diags Get Modules Subcommand

Description: Returns a list of test modules that are available. The diags get modules command queries the framework to obtain the test module information.

diags get modules [{-v|--verbose}]

Examples of successful output are:

diags get modules Modulefanflashmemory
 
diags get modules -vModule Host Typefan    SPflash  SPmemory PF

TABLE C-4 Arguments for diags get modules

Arguments

Description

[ { -v|--verbose}]

Displays all columns in output.



TABLE C-5 Return Codes for diags get modules

Return Code

ID

Description

NWSE_RPCTimeout

0

Request was issued but not serviced by the server.

NWSE_RPCNotConnected

1

Unable to connect to the RPC server.

NWSE_NoPermission

6

Not authorized to perform operation.

NWSE_InvalidArgument

4

One or more arguments were incorrect or invalid.

NWSE_ServiceNotAvailable

24

Requested service is not available. CD diagnostics are running, user is trying to run diagnostics on the service processor.



Diags Get State Subcommand

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

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 diagnostics tests for execution.

The following success text messages might return:

SP Diagnostics is ready to accept tests. Run 'diags get state' to determine availability of Platform Diagnostics. 
SP Diagnostics (in no-platform mode) is ready to accept tests.
Platform and SP Diagnostics are ready to accept tests.

 

The following error text messages might return:

Error. Verify that the platform state is 'off' and retry or use the 'diags start --forced' option to ignore the current state.
Error. Platform CD Diagnostics is currently running.
Error. Diagnostics is currently running. Run 'diags terminate' and try again.
Error. Unable to load Platform Diagnostics. Diagnostics terminated.
Error. Unable to load SP Diagnostics. Diagnostics terminated.
Error. SP no-platform Diagnostics is already running.

Return Codes

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


TABLE C-6 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_ServiceNotAvailable

24

Requested service is not available.

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

diags get tests [{-H | --noheader}] [{-D |--Delim} <DELIMITER>] [-v | --verbose]


Note - If the output for certain tests wraps, you can redirect the output to a file and view it with an editor for better readability.



TABLE C-7 lists the arguments for this subcommand.


TABLE C-7 Arguments for Subcommand diags get tests

Arguments

Description

{-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.

[-v | --verbose]

If specified, Host Type, Services, and Devices are displayed in addition to Module and Testname.


Return Codes

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


TABLE C-8 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).

NWSE_ServiceNotAvailable

24

Requested service is not available.



Diags Run Tests Subcommand

Description: Submits one or more diagnostics tests for execution.

Format

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


Note - If the output for certain tests wraps, you can redirect the output to a file and view it with an editor for better readability.



TABLE C-9 lists the arguments for this subcommand.


TABLE C-9 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 is displayed following the test result line.


The following data displays after a test is run:

Return Codes

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


TABLE C-10 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).

NWSE_ServiceNotAvailable

24

Requested service is not available.



Diags Start Subcommand

Description: Starts the SP and platform-diagnostics framework. You must execute this command before running any tests.

Format

diags start {--noplatform} [{-f|--forced}] 

TABLE C-11 Arguments for Subcommand diags start

Arguments

Description

{--noplatform}

Specifies to start diagnostics on the SP from the NFS mount, without rebooting the platform into diags mode.

Note: This option is not available when running diagnostics from CD-ROM.

{-f|--forced}

Forces diagnostics to start.


After running this command, you can immediately run the SP tests.

This command reboots the platform into diagnostics mode. This process might take between two and three minutes to complete. You can begin to run diagnostics on the SP while the platform diagnostics are loading. However, before you run the platform diagnostics, wait approximately one minute for the diagnostic kernel to completely load on the platform.

To verify whether the diagnostics tests are available to run, run the subcommand diags get state. Refer to Diags Get State Subcommand.

This subcommand returns one of the following states:

If the state returned from the command is that the platform is up and ready for diagnostics, then you can submit platform diagnostic tests for execution. You can optionally start diagnostics on the SP from the NFS mount without rebooting the platform into diags mode. This enables you to continue to run the production OS while you simultaneously perform SP diagnostics testing.

To do so, run the diags start subcommand with the following option:

diags start --no platform 

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

Return Codes

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


TABLE C-12 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_NoRouteToHost

13

No route to host (network down). Occurs when CD Diagnostics is unable to send a packet to the SP on a specific port.

NWSE_InvalidOpForState

22

Invalid operation for current state.

NWSE_ServiceNotAvailable

24

Requested service is not available.



Diags Terminate Subcommand

Description: Terminates all diagnostics tests and the diagnostics session.

Format

diags terminate 

Return Codes

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


TABLE C-13 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).

NWSE_NoRouteToHost

13

No route to host (network down). Occurs when CD Diagnostics is unable to send a packet to the SP on a specific port.

NWSE_ServiceNotAvailable

24

Requested service is not available.