Configuring Online Diagnostics

Information About Configuring Online Diagnostics

Online Diagnostics

With online diagnostics, you can test and verify the hardware functionality of the Device while the Device 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 Device is connected to a live network; and health-monitoring runs in the background with user-defined intervals. By default, the health-monitoring test runs for every 30 seconds.

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 Device and the diagnostic tests that have already run.


Note


The Catalyst 2960L switch is not stackable. Hence, the switch number keyword is not supported on this switch.


How to Configure Online Diagnostics

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.

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

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

SUMMARY STEPS

  1. diagnostic start test {name | test-id | test-id-range | all | basic | non-disruptive }

DETAILED STEPS

Command or Action Purpose

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

Example:


Device# diagnostic start test basic

Starts the diagnostic tests.

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

  • name —Enters the name of the test.

  • test-id —Enters the ID number of the test.

  • test-id-range —Enters the range of test IDs by using integers separated by a comma and a hyphen.

  • all —Starts all of the tests.

  • basic — Starts the basic test suite.

  • non-disruptive —Starts the non-disruptive test suite.

Configuring Online Diagnostics

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

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.

SUMMARY STEPS

  1. configure terminal
  2. diagnostic schedule test {name | test-id | test-id-range | all | basic | non-disruptive |} {daily | on mm dd yyyy hh:mm | weekly day-of-week hh:mm}

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 2

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

Example:


Device(config)# diagnostic schedule test 1-5 on July 3 2013 23:10

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

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 test IDs.

  • basic —Starts the basic on-demand diagnostic tests.

  • non-disruptive —Starts the non-disruptive test suite.

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.

Configuring Health-Monitoring Diagnostics

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

Use the no form of this command to disable testing.

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

Follow these steps to configure and enable the health-monitoring diagnostic tests:

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. diagnostic monitor interval test {name | test-id | test-id-range | all} hh:mm:ss milliseconds day
  4. diagnostic monitor syslog
  5. diagnostic monitor threshold number test {name | test-id | test-id-range | all} failure count count
  6. diagnostic monitor test {name | test-id | test-id-range | all}
  7. end
  8. show running-config
  9. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

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

Example:


Device(config)# diagnostic monitor interval test 1 12:30:00 750 5

Configures the health-monitoring interval of the specified tests.

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 4

diagnostic monitor syslog

Example:


Device(config)# diagnostic monitor syslog

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

Step 5

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

Example:


Device(config)# diagnostic monitor threshold test 1 failure count 20

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

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 6

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

Example:


Device(config)# diagnostic monitor test 1

Enables the specified health-monitoring tests.

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 7

end

Example:


Device(config)# end

Returns to privileged EXEC mode.

Step 8

show running-config

Example:


Device# show running-config 

Verifies your entries.

Step 9

copy running-config startup-config

Example:


Device# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

What to do next

Use the no diagnostic monitor interval testtest-id | test-id-range } global configuration command to change the interval to the default value or to zero. Use the no diagnostic monitor syslog command to disable generation of syslog messages when a health-monitoring test fails. Use the diagnostic monitor threshold testtest-id | test-id-range }failure count command to remove the failure threshold.

Monitoring and Maintaining Online Diagnostics

Displaying Online Diagnostic Tests and Test Results

You can display the online diagnostic tests that are configured for the Device and check the test results by using the privileged EXEC show commands in this table:

Table 1. Commands for Diagnostic Test Configuration and Results

Command

Purpose

show diagnostic content

Displays the online diagnostics configured for a switch.

show diagnostic status

Displays the currently running diagnostic tests.

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

Displays the online diagnostics test results.

show diagnostic detail]

Displays the online diagnostics test results.

show diagnostic schedule

Displays the online diagnostics test schedule.

show diagnostic post

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

Configuration Examples for Online Diagnostic Tests

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.

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

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

SUMMARY STEPS

  1. diagnostic start test {name | test-id | test-id-range | all | basic | non-disruptive }

DETAILED STEPS

Command or Action Purpose

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

Example:


Device# diagnostic start test basic

Starts the diagnostic tests.

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

  • name —Enters the name of the test.

  • test-id —Enters the ID number of the test.

  • test-id-range —Enters the range of test IDs by using integers separated by a comma and a hyphen.

  • all —Starts all of the tests.

  • basic — Starts the basic test suite.

  • non-disruptive —Starts the non-disruptive test suite.

Example: Configure a Health Monitoring Test

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


Device(config)# diagnostic monitor threshold test 1 failure count 50
Device(config)# diagnostic monitor interval test TestPortAsicLoopback


Note


The Catalyst 2960L switch is not stackable. Hence, the switch number keyword is not supported on this switch.


Examples: Schedule Diagnostic Test

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


Device(config)# diagnostic schedule test DiagThermalTest on June 3 2013  22:25

This example shows how to schedule diagnostic testing to occur weekly at a certain time on a specific switch:


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


Note


The Catalyst 2960L switch is not stackable. Hence, the switch number keyword is not supported on this switch.


Displaying Online Diagnostics: Examples

This example shows how to display the online diagnostic detailed information on a switch:

Device# show diagnostic switch detail

:   SerialNo :

  Overall Diagnostic Result : UNTESTED

  Test results: (. = Pass, F = Fail, U = Untested)

  ___________________________________________________________________________

    1) TestPortAsicLoopback ------------> U

          Error code ------------------> 3 (DIAG_SKIPPED)
          Total run count -------------> 0
          Last test testing type ------> n/a 
          Last test execution time ----> n/a
          First test failure time -----> n/a
          Last test failure time ------> n/a
          Last test pass time ---------> n/a
          Total failure count ---------> 0
          Consecutive failure count ---> 0
  ___________________________________________________________________________

    2) TestPortAsicCam -----------------> U
          
          Error code ------------------> 3 (DIAG_SKIPPED)
          Total run count -------------> 0
          Last test testing type ------> n/a 
          Last test execution time ----> n/a
          First test failure time -----> n/a
          Last test failure time ------> n/a
          Last test pass time ---------> n/a
          Total failure count ---------> 0
          Consecutive failure count ---> 0
  ___________________________________________________________________________

    3) TestPortAsicMem -----------------> U

          Error code ------------------> 3 (DIAG_SKIPPED)
          Total run count -------------> 0
          Last test testing type ------> n/a 
          Last test execution time ----> n/a
          First test failure time -----> n/a
          Last test failure time ------> n/a
          Last test pass time ---------> n/a
          Total failure count ---------> 0
          Consecutive failure count ---> 0
  ___________________________________________________________________________ 
 

This example shows how to display the online diagnostics that are configured on a switch:

Device# show diagnostic content

: 

  Diagnostics test suite attributes:
      B/* - Basic ondemand test / NA
    P/V/* - Per port test / Per device test / NA
    D/N/* - Disruptive test / Non-disruptive test / NA
      S/* - Only applicable to standby unit / NA
      X/* - Not a health monitoring test / NA
      F/* - Fixed monitoring interval test / NA
      E/* - Always enabled monitoring test / NA
      A/I - Monitoring is active / Monitoring is inactive
      R/* - Switch will reload after test list completion / NA
      P/* - will partition stack / NA

                                                          Test Interval   Thre-
  ID   Test Name                          Attributes      day hh:mm:ss.ms shold
  ==== ================================== ============    =============== =====
    1) TestPortAsicLoopback ------------> B*D*X**IR*      not configured  n/a
    2) TestPortAsicCam -----------------> B*D*X**IR*      not configured  n/a
    3) TestPortAsicMem -----------------> B*D*X**IR*      not configured  n/a


This example shows how to display the online diagnostic results for a switch:

Device# show diagnostic result

:   SerialNo : 

  Overall Diagnostic Result : UNTESTED

  Test results: (. = Pass, F = Fail, U = Untested)

    1) TestPortAsicLoopback ------------> U
    2) TestPortAsicCam -----------------> U
    3) TestPortAsicMem -----------------> U


This example shows how to display the online diagnostic test status:

Device# show diagnostic status


<BU> - Bootup Diagnostics, <HM> - Health Monitoring Diagnostics,
<OD> - OnDemand Diagnostics, <SCH> - Scheduled Diagnostics

====== ================================= =============================== ======
Card   Description                       Current Running Test            Run by
------ --------------------------------- ------------------------------- ------
                                         N/A                             N/A   

====== ================================= =============================== ======
Switch# 


This example shows how to display the online diagnostic test schedule for a switch:

Device# show diagnostic schedule

Current Time = 17:06:07 IST Tue Sep 11 2018

Diagnostic is not scheduled.