オンライン診断の設定 
     
 
    この章では、Catalyst 2960、2960-S、または 2960-C スイッチで、オンライン診断を設定する方法について説明します。
 
    
   
 
   (注) オンライン診断がサポートされているのは、LAN Base イメージが実行されている Catalyst 2960-S スイッチだけです。
 
    
    
    
   
 
   (注) この章で使用するコマンドの構文および使用方法の詳細については、このリリースのスイッチ コマンド リファレンスを参照してください。
 
    
    
    • 「オンライン診断の機能概要」
 「オンライン診断の機能概要」
 
    • 「オンライン診断テストの実行」
 「オンライン診断テストの実行」
 
   
   
    オンライン診断の機能概要
 
    オンライン診断では、動作中のネットワークにスイッチが接続されている間に、スイッチのハードウェア機能についてテストし、確認することができます。
 
    オンライン診断には、異なるハードウェア コンポーネントをチェックするパケット交換テストが含まれ、データ パスおよび制御信号が確認されます。
 
    オンライン診断では、次の領域の問題が検出されます。
 
    • ハードウェア コンポーネント
 ハードウェア コンポーネント 
 
    • インターフェイス(イーサネット ポートなど)
 インターフェイス(イーサネット ポートなど)
 
    • はんだ接合
 はんだ接合 
 
    オンライン診断は、オンデマンド診断、スケジュール診断、ヘルスモニタリング診断に分類できます。オンデマンド診断は、CLI から実行されます。スケジュール診断は、動作中のネットワークにスイッチが接続されているときに、ユーザが指定した間隔または指定した時刻に実行されます。ヘルスモニタリング診断は、バックグラウンドで実行されます。
 
   
   
    オンライン診断のスケジューリング
 
    ユーザは、指定時刻、毎日、毎週、または毎月、特定のスイッチに対してオンライン診断をスケジューリングすることができます。スケジューリングを削除するには、コマンドの no 形式を入力します。
 
    次のように、グローバル コンフィギュレーション モードで、このコマンドを使用してオンライン診断をスケジューリングします。
 
     
 
    
     
      
       
       |  |  | 
 
       
       |   diagnostic schedule  switch  num  test { test_id |  test_id_range  |  all  | basic | non-disruptive } {  daily  hh  :  mm |  on  mm  dd  yyyy  hh  :  mm } |  weekly  day_of_week  hh  :  mm } |  オンデマンド診断テストに対し、日時、テストの実行回数(繰り返し)、エラー発生時に行われる処理を、スケジューリングします。 | 
 
      
    
 
    
    次の例では、特定のスイッチに対して特定の日時に診断テストをスケジューリングする方法を示します。
 
    
    Switch(config)# diagnostic schedule switch 1 test 1,2,4-6 on january 3 2006 23:32 
    
    
    次の例では、特定のスイッチに対し、毎週特定の時間に診断テストを行うようスケジューリングする方法を示します。
 
    
    Switch(config)# diagnostic schedule switch 1 test 1,2,4-6 weekly friday 09:23 
    
   
   
    ヘルス モニタリング診断の設定
 
    スイッチが動作中のネットワークに接続されている間に、指定されたスイッチに対するヘルスモニタリング診断を設定できます。ユーザは、ヘルスモニタリングテストの実行間隔、テストに失敗した場合にシステム メッセージが生成されるかどうか、または、個々のテストをイネーブルまたはディセーブルにするかを、設定できます。テストをディセーブルにするには、コマンドの no 形式を入力します。
 
    次のように、グローバル コンフィギュレーション モードで、これらのコマンドを使用してヘルスモニタリング診断をスケジューリングします。
 
     
 
    
     
      
       
       |  |  | 
 
       
       |   diagnostic monitor interval  switch    num    test { test_id |  test_id_range  }   hour:mm:ss  milliseconds  day  |  指定したスイッチに対して指定したテストのヘルス モニタリングの間隔を設定します。モニタリングは、デフォルトではディセーブルに設定されています。 | 
 
       
       |  diagnostic monitor syslog  |  ヘルスモニタリング テストに失敗した場合、Syslog メッセージを生成します。Syslog は、デフォルトではディセーブルに設定されています。 | 
 
       
       |  diagnostic monitor threshold  switch    num   test { test_id |  test_id_range }  failure count  count  |  モニタリング テストの障害しきい値を設定します。モニタリングは、デフォルトではディセーブルに設定されています。 | 
 
      
    
 
    
    間隔をデフォルト値またはゼロに変更するには、 no diagnostic monitor    interval switch  {  num  }   test  {  test-id  |   test-id-range  |   all  } グローバル コンフィギュレーション コマンドを使用します。ヘルスモニタリング テストに失敗した場合、  no diagnostic monitor syslog  コマンドを使用して、Syslog メッセージの生成をディセーブルに設定します。  diagnostic monitor threshold  switch    num   test { test_id |  test_id_range | all}  failure count  コマンドを使用して、障害しきい値を削除します。
 
    次の例では、2 分ごとに指定したテストを行うように設定する方法を示します。
 
    
    Switch(config)# diagnostic monitor interval switch 1 test 1 00:02:00 0 1 
    
    
    次の例では、スイッチ上でテスト モニタリング用の障害しきい値を設定する方法を示します。
 
    
    Switch(config)# diagnostic monitor threshold switch 1 test 1 failure count 50 
    
    
    次の例では、ヘルス モニタリング テストが失敗した場合に Syslog メッセージの生成をイネーブルにする方法を示します。
 
    
    Switch(config)# diagnostic monitor syslog 
    
   
   
    オンライン診断テストの実行
 
    オンライン診断の設定後、診断テストを開始するか、または、テスト結果を表示することができます。各スイッチに対して設定されているテスト、および、すでに実行された診断テストを、参照することができます。
 
    ここでは、オンライン診断テストを設定したあとに実行する例を示します。
 
    • 「オンライン診断テストの開始」
 「オンライン診断テストの開始」
 
    • 「オンライン診断テストおよびテスト結果の表示」
 「オンライン診断テストおよびテスト結果の表示」
 
    
     オンライン診断テストの開始
 
     スイッチ上または個々のスイッチで実行する診断テストの設定後、start を使用して診断テストを開始できます。
 
     次のように、グローバル コンフィギュレーション モードで、このコマンドを使用してオンライン診断テストを開始します。
 
      
 
     
      
       
        
        |  |  | 
 
        
        |  diagnostic start switch  num  test { test-id |  test-id-range | all | basic | non-disruptive} |  特定のスイッチで診断テストを開始します。 | 
 
       
     
 
     
     次の例では、特定のスイッチで診断テストを実行する方法を示します。
 
     
     Switch# diagnostic start switch 1 test 1 
     
     
     
     06:27:50: %DIAG-6-TEST_RUNNING: Switch 1 Running TestPortAsicStackPortLoopback{ID=1} ... 
     
     
     
     06:27:51: %DIAG-6-TEST_OK: Switch 1 TestPortAsicStackPortLoopback{ID=1} has completed 
     
     
     
     
     次に、正常なシステム動作が阻害されているスイッチ上で診断テスト 2 を開始する方法と、これによって、スイッチからスタックへの接続が失われ、リロードが実行される例を示します。
 
     
     Switch# diagnostic start switch 1 test 2 
     
     
     Switch 1: Running test(s) 2 will cause the switch under test to reload after completion of 
     
     
     
     Switch 1: Running test(s) 2 may disrupt normal system operation 
     
     
     Do you want to continue?[no]: y 
     
     
     
     16:43:29: %STACKMGR-4-STACK_LINK_CHANGE: Stack Port 2 Switch 2 has changed to state DOWN 
     
     
     16:43:30: %STACKMGR-4-STACK_LINK_CHANGE: Stack Port 1 Switch 9 has changed to state DOWN 
     
     
     16:43:30: %STACKMGR-4-SWITCH_REMOVED: Switch 1 has been REMOVED from the stack 
     
     
     
     16:44:35: %STACKMGR-4-STACK_LINK_CHANGE: Stack Port 1 Switch 2 has changed to state UP 
     
     
     16:44:37: %STACKMGR-4-STACK_LINK_CHANGE: Stack Port 2 Switch 2 has changed to state UP 
     
     
     16:44:45: %STACKMGR-4-SWITCH_ADDED: Switch 1 has been ADDED to the stack 
     
     
     16:45:00: %STACKMGR-5-SWITCH_READY: Switch 1 is READY 
     
     
     16:45:00: %STACKMGR-4-STACK_LINK_CHANGE: Stack Port 1 Switch 1 has changed to state UP 
     
     
     16:45:00: %STACKMGR-4-STACK_LINK_CHANGE: Stack Port 2 Switch 1 has changed to state UP 
     
     
     00:00:20: %STACKMGR-4-SWITCH_ADDED: Switch 1 has been ADDED to the stack (Switch-1) 
     
     
     00:00:20: %STACKMGR-4-SWITCH_ADDED: Switch 2 has been ADDED to the stack (Switch-1) 
     
     
     00:00:25: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan (Switch-1) 
     
     
     00:00:29: %SYS-5-CONFIG_I: Configured from memory by console (Switch-1) 
     
     
     00:00:29: %STACKMGR-5-SWITCH_READY: Switch 2 is READY (Switch-1) 
     
     
     00:00:29: %STACKMGR-5-MASTER_READY: Master Switch 2 is READY (Switch-1) 
     
     
     00:00:30: %STACKMGR-5-SWITCH_READY: Switch 1 is READY (Switch-1) 
     
     
     00:00:30: %DIAG-6-TEST_RUNNING: Switch 1: Running TestPortAsicLoopback{ID=2} ... 
     
     
     
     00:00:30: %DIAG-6-TEST_OK: Switch 1: TestPortAsicLoopback{ID=2} has completed successfully 
     
     
     
     テストによって、スタックがパーティション化された場合、このメッセージを参照できます。
 
     
     Switch 6: Running test(s) 2 will cause the switch under test to reload after completion of 
     
     
     
     Switch 6: Running test(s) 2 will partition stack 
     
     
     Switch 6: Running test(s) 2 may disrupt normal system operation 
     
     
     Do you want to continue?[no]: 
     
    
   
   
    オンライン診断テストおよびテスト結果の表示
 
    show コマンドを使用すると、特定のスイッチに対して設定されたオンライン診断テストを表示し、テストの結果をチェックすることができます。
 
    あるスイッチに対して設定されている診断テストとテスト結果を表示するには、特権 EXEC コマンドを使用します。
 
     
 
    
     
      
       表 41-1 show diagnostic コマンド
 
      
      
       
       |  |  | 
 
       
       |  show diagnostic content switch [num |  all ] |  スイッチに対して設定されているオンライン診断を表示します。 | 
 
       
       |   show diagnostic status  |  スイッチでテストが実行中かどうかを表示します。 | 
 
       
       |  show diagnostic result switch [num | all] detail  show diagnostic result switch [num | all] test [test_id | test_id_range | all] [detail] |  オンライン診断テスト結果を表示します。 | 
 
       
       |  show diagnostic schedule switch [num | all] |  オンライン診断テスト スケジュールを表示します。 | 
 
       
       |   show diagnostic post  |  POST の結果を表示します。( show post コマンドと同じ)。 | 
 
      
    
 
    
    次の例では、スイッチに設定されているオンライン診断を表示する方法を示します。
 
    
    Switch# show diagnostic contentswitch 3 
    
    
    
    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 
    
    
    
    ID Test Name attributes day hh:mm:ss.ms shold 
    
    
    ==== ================================== ============ =============== ===== 
    
    
     1) TestPortAsicStackPortLoopback B*N****A** 000 00:01:00.00 n/a 
    
    
     2) TestPortAsicLoopback B*D*X**IR* not configured n/a 
    
    
     3) TestPortAsicCam B*D*X**IR* not configured n/a 
    
    
     4) TestPortAsicRingLoopback B*D*X**IR* not configured n/a 
    
    
     5) TestMicRingLoopback B*D*X**IR* not configured n/a 
    
    
     6) TestPortAsicMem B*D*X**IR* not configured n/a 
    
    
    次の例では、スイッチのオンライン診断結果を表示する方法を示します。
 
    
    Switch# show diagnostic result 
    
    
    
    Overall diagnostic result: PASS 
    
    
    Test results: (. = Pass, F = Fail, U = Untested) 
    
    
    1) TestPortAsicStackPortLoopback ---> . 
    
    
    2) TestPortAsicLoopback ------------> . 
    
    
    3) TestPortAsicCam -----------------> . 
    
    
    4) TestPortAsicRingLoopback --------> . 
    
    
    5) TestMicRingLoopback -------------> . 
    
    
    6) TestPortAsicMem -----------------> . 
    
    
    次の例では、オンライン診断テストのステータスを表示する方法を示します。
 
    
    Switch# show diagnostic status 
    
    
    <BU> - Bootup Diagnostics, <HM> - Health Monitoring Diagnostics, 
    
    
    <OD> - OnDemand Diagnostics, <SCH> - Scheduled Diagnostics 
    
    
    ====== ================================= =============================== ====== 
    
    
    Card Description Current Running Test Run by 
    
    
    ------ --------------------------------- --------------------- ------ 
    
    
    
    2 TestPortAsicStackPortLoopback <OD> 
    
    
     TestPortAsicLoopback <OD> 
    
    
    
     TestPortAsicRingLoopback <OD> 
    
    
    
    
    
    
    
    ============================= =============================== ====== 
    
    
    
    次の例では、スイッチのオンライン診断のテスト スケジュールを表示する方法を示します。
 
    
    Switch# show diagnostic scheduleswitch 1 
    
    
    Current Time = 14:39:49 PST Tue Jul 5 2005 
    
    
    
    
    
    Test ID(s) to be executed: 1.