Skip to main content
Cluster and storage switches
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

設定記錄收集

貢獻者

乙太網路交換器健全狀況監視器( CSHM )負責確保叢集與儲存網路交換器的作業健全狀況、並收集交換器記錄以供偵錯之用。本程序將引導您完成設定收集、要求詳細的 * 支援 * 記錄、以及啟用 AutoSupport 所收集 * 定期 * 資料的每小時收集。

  • 注意: * 如果您啟用 FIPS 模式、則必須完成下列步驟:

註
  1. 根據廠商指示、在交換器上重新產生 ssh 金鑰。

  2. 使用在 ONTAP 端重新產生 ssh 金鑰 debug system regenerate-systemshell-key-pair

  3. 使用重新執行記錄收集設定例行程序 system switch ethernet log setup-password

開始之前

  • 使用者必須能夠存取交換器 show 命令。如果這些權限不可用、請建立新使用者、並將必要的權限授予使用者。

  • 必須為交換器啟用交換器健全狀況監控。請務必確認 Is Monitored: 欄位在的輸出中設為 * 真 * system switch ethernet show 命令。

  • 對於 NVIDIA 交換器、必須允許記錄收集的使用者執行記錄收集命令、而不顯示密碼提示。若要允許這種使用方式、請執行命令: echo '<username> ALL = NOPASSWD: /usr/cumulus/bin/cl-support, /usr/sbin/csmgrctl' | sudo EDITOR='tee -a' visudo -f /etc/sudoers.d/cumulus

步驟

ONTAP 9.14.1 及更早版本
  1. 若要設定記錄收集、請針對每個交換器執行下列命令。系統會提示您輸入用於記錄收集的交換器名稱、使用者名稱和密碼。

    system switch ethernet log setup-password
    cluster1::*> system switch ethernet log setup-password
    Enter the switch name: <return>
    The switch name entered is not recognized.
    Choose from the following list:
    cs1
    cs2
    
    cluster1::*> system switch ethernet log setup-password
    
    Enter the switch name: cs1
    Would you like to specify a user other than admin for log collection? {y|n}: n
    
    Enter the password: <enter switch password>
    Enter the password again: <enter switch password>
    
    cluster1::*> system switch ethernet log setup-password
    
    Enter the switch name: cs2
    
    Would you like to specify a user other than admin for log collection? {y|n}: n
    
    Enter the password: <enter switch password>
    Enter the password again: <enter switch password>
  2. 若要要求支援記錄收集並啟用定期收集、請執行下列命令。這會同時啟動記錄收集的兩種類型:詳細 Support 記錄和每小時收集 Periodic 的資料。

    system switch ethernet log modify -device <switch-name> -log-request true
    cluster1::*> system switch ethernet log modify -device cs1 -log-request true
    
    Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y
    
    Enabling cluster switch log collection.
    
    cluster1::*> system switch ethernet log modify -device cs2 -log-request true
    
    Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y
    
    Enabling cluster switch log collection.

    等待 10 分鐘、然後檢查記錄收集是否完成:

    system switch ethernet log show
ONTAP 9.15.1 及更新版本
  1. 若要設定記錄收集、請針對每個交換器執行下列命令。系統會提示您輸入用於記錄收集的交換器名稱、使用者名稱和密碼。

    system switch ethernet log setup-password
    cluster1::*> system switch ethernet log setup-password
    Enter the switch name: <return>
    The switch name entered is not recognized.
    Choose from the following list:
    cs1
    cs2
    
    cluster1::*> system switch ethernet log setup-password
    
    Enter the switch name: cs1
    Would you like to specify a user other than admin for log collection? {y|n}: n
    
    Enter the password: <enter switch password>
    Enter the password again: <enter switch password>
    
    cluster1::*> system switch ethernet log setup-password
    
    Enter the switch name: cs2
    
    Would you like to specify a user other than admin for log collection? {y|n}: n
    
    Enter the password: <enter switch password>
    Enter the password again: <enter switch password>
  2. 啟用定期記錄收集:

    system switch ethernet log modify -device <switch-name> -periodic-enabled true
    cluster1::*> system switch ethernet log modify -device cs1 -periodic-enabled true
    
    Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y
    
    cs1: Periodic log collection has been scheduled to run every hour.
    
    cluster1::*> system switch ethernet log modify -device cs2 -periodic-enabled true
    
    Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y
    
    cs2: Periodic log collection has been scheduled to run every hour.
    
    cluster1::*> system switch ethernet log show
                                              Periodic    Periodic    Support
    Switch                                    Log Enabled Log State   Log State
    
    cs1                                       true        scheduled   never-run
    cs2                                       true        scheduled   never-run
    2 entries were displayed.
  3. 要求支援記錄收集:

    system switch ethernet log collect-support-log -device <switch-name>
    cluster1::*> system switch ethernet log collect-support-log -device cs1
    
    cs1: Waiting for the next Ethernet switch polling cycle to begin support collection.
    
    cluster1::*> system switch ethernet log collect-support-log -device cs2
    
    cs2: Waiting for the next Ethernet switch polling cycle to begin support collection.
    
    cluster1::*> *system switch ethernet log show
                                              Periodic    Periodic    Support
    Switch                                    Log Enabled Log State   Log State
    
    cs1                                       false       halted      initiated
    cs2                                       true        scheduled   initiated
    2 entries were displayed.
  4. 若要檢視記錄收集的所有詳細資料、包括啟用、狀態訊息、定期收集的先前時間戳記和檔名、要求狀態、狀態訊息、以及支援集合的先前時間戳記和檔名、請使用下列項目:

    system switch ethernet log show -instance
    cluster1::*> system switch ethernet log show -instance
    
                        Switch Name: cs1
               Periodic Log Enabled: true
                Periodic Log Status: Periodic log collection has been scheduled to run every hour.
        Last Periodic Log Timestamp: 3/11/2024 11:02:59
              Periodic Log Filename: cluster1:/mroot/etc/log/shm-cluster-info.tgz
              Support Log Requested: false
                 Support Log Status: Successfully gathered support logs - see filename for their location.
         Last Support Log Timestamp: 3/11/2024 11:14:20
               Support Log Filename: cluster1:/mroot/etc/log/shm-cluster-log.tgz
    
                        Switch Name: cs2
               Periodic Log Enabled: false
                Periodic Log Status: Periodic collection has been halted.
        Last Periodic Log Timestamp: 3/11/2024 11:05:18
              Periodic Log Filename: cluster1:/mroot/etc/log/shm-cluster-info.tgz
              Support Log Requested: false
                 Support Log Status: Successfully gathered support logs - see filename for their location.
         Last Support Log Timestamp: 3/11/2024 11:18:54
               Support Log Filename: cluster1:/mroot/etc/log/shm-cluster-log.tgz
    2 entries were displayed.
警告 如果記錄收集功能報告任何錯誤狀態(在的輸出中可見 system switch ethernet log show)、請參閱 "疑難排解記錄收集" 以取得進一步詳細資料。
接下來呢?

"設定 SNMPv3 (選用)"