Metro Node:如何從 Metro Node 收集記錄
Summary: 本文概述了如何從 Metro Node 收集記錄的步驟,也涵蓋發生效能問題可能需要哪些記錄/資料。
Instructions
有關如何完成以下任務的步驟:
- 偵錯 Metro Node 問題需要哪些記錄?
- 如何在 Metro Node 叢集上擷取收集診斷?
- 如何在管理伺服器上驗證現有的 collect-diagnostics 套裝。
- 如何取消和清理 Metro Node 中正在進行的收集診斷?
一個。偵錯 Metro Node 問題需要哪些記錄?
-
從 Metro Node 收集記錄所需的命令稱為「collect-diagnostics」,可從 Metro Node 設定中的任何節點 (*1) 執行。在 Metro 節點叢集的一個導向器上執行此命令時,應具有來自叢集所有節點的所有導向器的所有資料。請勿同時在多個節點上執行此命令。
*1 注:僅從一個導向器執行「collect-diagnostics」命令,如果是 Metro 組態,則僅從一個叢集執行,並等待其完整完成,再視需要從另一個導向器或對等叢集收集 CD。 -
「collect-diagnostics」命令會產生含有組態和記錄檔的已壓縮 tar.gz 記錄檔。collect-diagnostics 檔案會放置在執行該檔案的節點上的 /diag/collect-diagnostics-out/ 目錄中。命令完成後,請使用 WINSCP 或同等的 SCP 公用程式,將檔案從節點中複製出來,然後便可提供該檔案以支援分析。在以下的 B 節中還有關於使用此命令的更多詳細資訊。
注意:- 如果在沒有選項的情況下執行「collect-diagnostics」命令,則會產生兩個檔案:一個基本檔案和一個延伸檔案。在擴充系統上,這可能需要相當長的時間。
- Metro Node 支援通常只需要 Base 檔案,但在部分情況下,他們可能也會要求提供擴充檔案的效能問題。
- 執行 collect-diagnostics 時可能會要求使用的標準選項包括:
- 」
--noextended": 此選項會省略延伸診斷的集合。 - 」
--last-logs": 此選項擷取記錄 x 小時數或天數。
- 」
- 如需命令的詳細資料,您可以輸入「collect-diagnostics -h」
以下是這兩個檔名的範例,日期和時間(顯示為 YYYY-MM-DD-HH.MM.SS)來自收集這些檔名的日期和時間:
- 基礎檔案:
<Serial number>-c1-diag-YYYY-MM-DD-HH.MM.SS.tar.gz - 擴充檔案:
<Serial number>-c1-diag-ext-YYYY-MM-DD-HH.MM.SS.tar.gz
-
效能問題十分複雜,需要收集大量特定資訊。因此,我們會要求客戶填寫效能問卷,以加快此流程。您可以在結尾的附件區段中找到本知識文章隨附的問卷。
-
在某些類型的性能問題中,捕獲名為“fe_perf_stats”的其他日誌會很有説明。記錄會持續產生,但不會由 collect-diagnostics 擷取。若要擷取此記錄,請在每個叢集的節點上 cd (變更目錄) 至 /var/log/VPlex/cli,然後執行命令「tar cvzf fe-perf-stats.tar.gz fe_perf_stats*」,將檔案資料壓縮為 tar 檔案。使用 WINSCP 或同等的 SCP 公用程式連線至節點,然後瀏覽至 /var/log/VPlex/cli。將「fe-perf-stats.tar.gz」檔案複製到您的系統如果支援部門要求,將 tar 檔案連同一或多個收集診斷檔案上傳至 SR,或透過 SR 與電子郵件中提供的支援 ftp 連結。
-
除了收集診斷外,擷取以下資訊可能會有幫助;
- 打開膩子會話的記錄,
- 然後運行以下命令,
- 然後收集 Putty 日誌並將其下載到您的系統,
- 然後,將 PuTTY 記錄、收集診斷和任何其他要求的資料附加至 SR。
以下命令會從 VPlexcli 提示字元執行。
cluster statusll clusters/**/storage-views/* --fullll ~portsshow-use-hierarchy /clusters/**/virtual-volumes/*ll ~system-volumesls -t /clusters/*/directors/*::serial-number(此命令列出每個節點的所有 DST)ls -t /clusters/**/director-*/::hostname(顯示的主機名稱為 IP 位址,這是預期動作)
B.如何在 Metro Node 叢集上擷取收集診斷?
若要擷取此資料,請使用下列旗標執行 collect-diagnostics 命令:「--noextended」和「--last-logs 30d」。
-
在導向器節點 Linux 提示字元 (例如 service@director-1-1-a) 建立 SSH 工作階段,然後登入 vplexcli。
範例輸出:
login as: service Keyboard-interactive authentication prompts from server: | Password: End of keyboard-interactive prompts from server Last login: <date and timestamp data> from x.x.x.x service@director-1-1-a:~> service@director-1-1-a:~> vplexcli Trying ::1... Connected to localhost. Escape character is '^]'. VPlexcli:/>
-
若要啟動 collect-diagnostics,請從 vplexcli 提示字元使用指示的選項執行「collect-diagnostics」命令,如以下範例所示。
範例輸出:
VPlexcli:/> collect-diagnostics --noextended --last-logs 30d ('WARNING:The collect-diagnostics command was issued with option --noextended. ',) The following file(s) will NOT be collected: core files fast trace dump files slow trace dump files udcom trace dump files udcom legacy trace files user-defined performance sink files the management console's heap ('WARNING:Only the logs that are generated in the last 30 days are collected.') 2024-02-09 19:55:12 UTC: ****Initializing collect-diagnostics... 2024-02-09 19:55:13 UTC: No cluster-witness server found. 2024-02-09 19:55:13 UTC: Free space = 88G 2024-02-09 19:55:13 UTC: Total space needed = 1907M ================================================================================ Starting collect-diagnostics, this operation might take a while... ================================================================================ Executing cluster collection ..
C. 如何在導向器/節點上驗證現有的收集診斷套件。
-
當 collect-diagnostics 命令完成並返回 vplexcli 提示時,請連線至使用 winscp [或同等 SCP 公用程式] 執行命令的導向器,然後瀏覽至資料夾 /diag/collect-diagnostics-out/
-
識別一個或多個具有正確時間戳的日誌檔,並將其下載到本地工作站。
D. 如何取消正在進行的收集診斷
-
如果您仍在啟動 collect-diagnostics 的 PuTTY 工作階段中,您應該會看到 collect-diagnostics 輸出串流,顯示它仍在執行中。
範例輸出:
VPlexcli:/> collect-diagnostics --noextended --last-logs 30d ('WARNING:The collect-diagnostics command was issued with option --noextended. ',) The following file(s) will NOT be collected: core files fast trace dump files slow trace dump files udcom trace dump files udcom legacy trace files user-defined performance sink files the management console's heap ('WARNING:Only the logs that are generated in the last 30 days are collected.') 2022-02-09 19:55:12 UTC: ****Initializing collect-diagnostics... 2022-02-09 19:55:13 UTC: No cluster-witness server found. 2022-02-09 19:55:13 UTC: Free space = 88G 2022-02-09 19:55:13 UTC: Total space needed = 1907M ================================================================================ Starting collect-diagnostics, this operation might take a while... ================================================================================ Executing cluster collection .. -
開啟重複的 PuTTY 工作階段,然後使用服務帳戶登入您啟動 collect-diagnostics 的導向器。
範例輸出:
login as: service Using keyboard-interactive authentication. Password: Last login: <date and time stamp data> from x.x.x.x service@director-1-1-b:~>
-
進入導向器後,使用下列命令重新開機管理主控台,取消執行中的收集診斷。
範例輸出:
service@director-1-1-b:~> sudo systemctl restart VPlexManagementConsole.service
-
回顧第一個執行收集診斷的 PuTTY 工作階段,當您重新啟動管理主控台時,您應該會看到收集診斷報告以下內容作為最後記錄的輸出:
"Connection closed by foreign host."
範例輸出 (檢查輸出的最後一行):
VPlexcli:/> collect-diagnostics --noextended --last-logs 30d ('WARNING:The collect-diagnostics command was issued with option --noextended. ',) The following file(s) will NOT be collected: core files fast trace dump files slow trace dump files udcom trace dump files udcom legacy trace files user-defined performance sink files the management console's heap ('WARNING:Only the logs that are generated in the last 30 days are collected.') 2022-02-09 20:02:03 UTC: ****Initializing collect-diagnostics... 2022-02-09 20:02:04 UTC: No cluster-witness server found. 2022-02-09 20:02:04 UTC: Free space = 88G 2022-02-09 20:02:04 UTC: Total space needed = 1907M ================================================================================ Starting collect-diagnostics, this operation might take a while... ================================================================================ Executing cluster collection .. ERROR Executing SMS log collection .. Connection closed by foreign host. <<< -
一旦發現收集診斷停止,上面的步驟 3,返回第二個 PuTTY 會話並「cd」到 /diag 目錄,然後執行「will 」,您應該會看到一些額外的目錄,
collect-diagnostics-tmpcollect-diagnostics-jobscollect-diagnostics-tmp-ext*
*如果未略過延伸檔案
範例輸出:
service@director-1-1-b:/diag> ll total 32 drwxr-xr-x 2 service groupSvc 4096 Feb 9 20:03 collect-diagnostics-tmp-ext drwxr-xr-x 2 service groupSvc 4096 Feb 9 20:03 collect-diagnostics-jobs drwxr-xr-x 2 service groupSvc 4096 Feb 9 20:04 collect-diagnostics-out drwxr-xr-x 3 service groupSvc 4096 Feb 9 20:02 collect-diagnostics-tmp drwx------ 2 root root 16384 Jan 27 16:54 lost+found drwx--x--x 3 service groupSvc 4096 Dec 17 03:08 share service@director-1-1-b:/diag>
-
如果您查看這些目錄內部,您會看到具有您現在取消的收集診斷的日期和時間的檔案。這些檔案會佔用 /diag 磁碟分割中的空間,應將其移除。
-
若要從 /diag 目錄中移除/刪除檔案,請輸入「rm -r collect-diagnostics-jobs」和「rm -r collect-diagnostics-tmp」,然後再次輸入「ll」以確定目錄已刪除或移除。
範例輸出:
service@director-1-1-b:/diag> rm -r collect-diagnostics-jobs service@director-1-1-b:/diag> rm -r collect-diagnostics-tmp service@director-1-1-b:/diag> ll total 24 drwxr-xr-x 2 service groupSvc 4096 Feb 9 20:04 collect-diagnostics-out drwx------ 2 root root 16384 Jan 27 16:54 lost+found drwx--x--x 3 service groupSvc 4096 Dec 17 03:08 share service@director-1-1-b:/diag>
-
如果不存在「collect-diagnostics-tmp-ext」目錄,請將其移除,執行「rm -r collect-diagnostics-tmp-ext」
注意:延伸檔案通常用於調查節點當機的情形。如果正在調查節點當機的慶行,且支援部門尚未擷取所有必要的記錄,請先洽詢支援部門,再清理 collect-diagnostics-tmp-ext 目錄,因為這樣做可能會刪除必要的核心檔案。