Configuring Online Diagnostics


This chapter describes how to configure the online diagnostics on the switch.


Note For complete syntax and usage information for the commands used in this chapter, see the command reference for this release.


This chapter consists of these sections:

Understanding Online Diagnostics

Configuring Online Diagnostics

Running Online Diagnostic Tests

Understanding Online Diagnostics

With online diagnostics, you can test and verify the hardware functionality of the switch while the switch is connected to a live network.

The online diagnostics contain packet switching tests that check different hardware components and verify the data path and the control signals.

The online diagnostics detect problems in these areas:

Hardware components

Interfaces (Ethernet ports and so forth)

Solder joints

Online diagnostics are categorized as on-demand, scheduled, or health-monitoring diagnostics. On-demand diagnostics run from the CLI; scheduled diagnostics run at user-designated intervals or at specified times when the switch is connected to a live network; and health-monitoring runs in the background.

Configuring Online Diagnostics

You must configure the failure threshold and the interval between tests before enabling diagnostic monitoring.

This section has this information:

Scheduling Online Diagnostics

Configuring Health-Monitoring Diagnostics

Scheduling Online Diagnostics

You can schedule online diagnostics to run at a designated time of day or on a daily, weekly, or monthly basis for a switch. Use the no form of this command to remove the scheduling.

Use this global configuration command to schedule online diagnostics:

Command
Purpose

diagnostic schedule switch number test {name | test-id | test-id-range | all | basic | non-disruptive} {daily hh:mm | on mm dd yyyy hh:mm | weekly day-of-week hh:mm}

Schedule on-demand diagnostic tests for a specific day and time.

The range for the switch number keyword is from 1 to 9.

When specifying the tests to be scheduled, use these options:

name—Name of the test that appears in the show diagnostic content command output.

test-id—ID number of the test that appears in the show diagnostic content command output.

test-id-range—ID numbers of the tests that appear in the show diagnostic content command output.

all—All of the diagnostic tests.

basic—Basic on-demand diagnostic tests.

non-disruptive—Nondisruptive health-monitoring tests.

You can schedule the tests as follows:

Daily—Use the daily hh:mm parameter.

Specific day and time—Use the on mm dd yyyy hh:mm parameter.

Weekly—Use the weekly day-of-week hh:mm parameter.

For detailed information about this command, see the command reference for this release.


Use the no diagnostic schedule switch number test {name | test-id | test-id-range | all | basic | non-disruptive} {daily hh:mm | on mm dd yyyy hh:mm | weekly day-of-week hh:mm} global configuration command to remove the scheduled tests.

This example shows how to schedule diagnostic testing for a specific day and time on a standalone switch:

Switch(config)# diagnostic schedule test TestPortAsicCam on december 3 2006 22:25

This example shows how to schedule diagnostic testing to occur weekly at a specific time on member switch 6 when this command is entered on a stack master:

Switch(config)# diagnostic schedule switch 6 test 1-4,7 weekly saturday 10:30

For more examples, see the "Examples" section of the diagnostic schedule command in the command reference for this release.

Configuring Health-Monitoring Diagnostics

You can configure health-monitoring diagnostic testing on a switch while it is connected to a live network. You can configure the execution interval for each health-monitoring test, enable the switch to generate a syslog message because of a test failure, and enable a specific test.

By default, health monitoring is disabled, but the switch generates a syslog message when a test fails.

Beginning in privileged EXEC mode, follow these steps to configure and enable the health-monitoring diagnostic tests:

 
Command
Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

diagnostic monitor interval switch number test {name | test-id | test-id-range | all} hh:mm:ss milliseconds day

Configure the health-monitoring interval of the specified tests.

The range for the switch number keyword is from 1 to 9.

When specifying the tests, use one of these parameters:

name—Name of the test that appears in the show diagnostic content command output.

test-id—ID number of the test that appears in the show diagnostic content command output.

test-id-range—ID numbers of the tests that appear in the show diagnostic content command output.

all—All of the diagnostic tests.

When specifying the interval, set these parameters:

hh:mm:ss—Monitoring interval in hours, minutes, and seconds. The range for hh is 0 to 24, and the range for mm and ss is 0 to 60.

milliseconds—Monitoring interval in milliseconds (ms). The range is from 0 to 999.

day—Monitoring interval in the number of days. The range is from 0 to 20.

Step 3 

diagnostic monitor syslog

(Optional) Configure the switch to generate a syslog message when a health-monitoring test fails.

Step 4 

diagnostic monitor threshold switch number test {name | test-id | test-id-range | all} failure count count

(Optional) Set the failure threshold for the health-monitoring tests.

The range for the switch number keyword is from 1 to 9.

When specifying the tests, use one of these parameters:

name—Name of the test that appears in the show diagnostic content command output.

test-id—ID number of the test that appears in the show diagnostic content command output.

test-id-range—ID numbers of the tests that appear in the show diagnostic content command output.

all—All of the diagnostic tests.

The range for the failure threshold count is 0 to 99.

Step 5 

diagnostic monitor switch number test {name | test-id | test-id-range | all}

Enable the specified health-monitoring tests.

The range for the switch number keyword is from 1 to 9.

When specifying the tests, use one of these parameters:

name—Name of the test that appears in the show diagnostic content command output.

test-id—ID number of the test that appears in the show diagnostic content command output.

test-id-range—ID numbers of the tests that appear in the show diagnostic content command output.

all—All of the diagnostic tests.

Step 6 

end

Return to privileged EXEC mode.

Step 7 

show diagnostic {content | post | result | schedule | status | switch}

Display the online diagnostic test results and the supported test suites. See the "Displaying Online Diagnostic Tests and Test Results" section for more information.

Step 8 

show running-config

Verify your entries.

Step 9 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

To disable diagnostic testing and return to the default settings, use these commands:

To disable online diagnostic testing, use the no diagnostic monitor switch number test {name | test-id | test-id-range | all} global configuration command.

To return to the default health-monitoring interval, use the no diagnostic monitor interval switch number test {name | test-id | test-id-range | all} global configuration command.

To configure the switch to not generate a syslog message when the health-monitoring test fails, use the no diagnostic monitor syslog global configuration command.

To return to the default failure threshold, use the no diagnostic monitor threshold switch number test {name | test-id | test-id-range | all} failure count count global configuration command.

This example shows how to configure a health-monitoring test:

Switch(config)# diagnostic monitor threshold switch 3 test 1 failure count 50
Switch(config)# diagnostic monitor interval switch 3 test TestPortAsicRingLoopback

Running Online Diagnostic Tests

After you configure online diagnostics, you can manually start diagnostic tests or display the test results. You can also see which tests are configured for the switch or switch stack and the diagnostic tests that have already run.

These sections describe how to run online diagnostic tests:

Starting Online Diagnostic Tests

Displaying Online Diagnostic Tests and Test Results

Starting Online Diagnostic Tests

After you configure diagnostic tests to run on the switch, use the diagnostic start privileged EXEC command to begin diagnostic testing.

Use this privileged EXEC command to manually start online diagnostic testing:

Command
Purpose

diagnostic start switch number test {name | test-id | test-id-range | all | basic | non-disruptive}

Start the diagnostic tests.

The range for the switch number keyword is from 1 to 9.

You can specify the tests by using one of these options:

name—Enter the name of the test. Use the show diagnostic content privileged EXEC command to display the test ID list.

test-id—Enter the ID number of the test. Use the show diagnostic content privileged EXEC command to display the test ID list.

test-id-range—Enter the range of test IDs by using integers separated by a comma and a hyphen. For more information, see the diagnostic start command in the command reference for this release.

all—Use this keyword when you want to run all of the tests.

basic—Use this keyword when you want to run the basic test suite.

non-disruptive—Use this keyword when you want to run the non-disruptive test suite.


After starting the tests, you cannot stop the testing process.

This example shows how to start a diagnostic test by using the test name:

Switch# diagnostic start switch 2 test TestInlinePwrCtlr

This example shows how to start all of the basic diagnostic tests:

Switch# diagnostic start switch 1 test all

Displaying Online Diagnostic Tests and Test Results

You can display the online diagnostic tests that are configured for the switch or switch stack and check the test results by using the privileged EXEC show commands in Table 49-1:

Table 49-1 Commands for Diagnostic Test Configuration and Results

Command
Purpose

show diagnostic content switch [number | all]

Display the online diagnostics configured for a switch.

show diagnostic status

Display the currently running diagnostic tests.

show diagnostic result switch [number | all] [detail | test {name | test-id | test-id-range | all} [detail]]

Display the online diagnostics test results.

show diagnostic switch [number | all] [detail]

Display the online diagnostics test results.

show diagnostic schedule switch [number | all]

Display the online diagnostics test schedule.

show diagnostic post

Display the POST results. (The output is the same as the show post command output.)


For examples of the show diagnostic command output, see the "Examples" section of the show diagnostic command in the command reference for this release.