Metro Node:如何从 Metro Node 收集日志

Summary: 本文概述了如何从 Metro Node 收集日志的步骤,还介绍了解决性能问题可能需要哪些日志/数据。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

有关如何完成以下任务的步骤:

  1. 调试 Metro Node 问题需要哪些日志?
  2. 如何在 Metro Node 群集上捕获 collect-diagnostics?
  3. 如何在管理服务器上验证现有 collect-diagnostics 包。
  4. 如何取消和清理 Metro Node 中正在进行的收集诊断?

一个。调试 Metro Node 问题需要哪些日志?

  1. 从 Metro Node 收集日志所需的命令称为“collect-diagnostics”,可以从 Metro Node 设置中的任何节点 (*1) 运行。在 Metro Node 群集的一个控制器上运行此命令时,应具有来自群集所有节点的所有控制器的所有数据。请勿同时在多个节点上运行此命令。

    *1 注:如果是 Metro 配置,则仅在一个群集上从一个控制器运行“collect-diagnostics”命令,并等待其完全完成,然后再从另一个控制器或对等群集收集 CD(如果需要)。
  2. collect-diagnostics”命令会生成包含配置和日志文件的压缩 tar.gz 日志文件。collect-diagnostics 文件放在运行该命令的节点上的 /diag/collect-diagnostics-out/ 目录中。命令完成后,使用 WINSCP 或等效的 SCP 实用程序将该文件从节点上拷贝出来,然后可以将其提供给支持人员进行分析。下面的 B 部分中提供了有关使用此命令的更多信息。

    提醒:
    • 如果在不使用任何选项的情况下运行 'collect-diagnostics' 命令,则会生成两个文件,即基本文件和扩展文件。在扩容的系统上,这可能需要相当长的时间。
    • Metro Node 支持通常只需要基本文件,但在某些情况下,由于性能问题,他们也可能要求提供扩展文件。
    • 运行 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
  3. 性能问题非常复杂,需要收集大量特定信息。因此,我们提供了一份需要客户填写的性能问卷,以加快此过程。您可以在本知识库文章末尾的附件部分找到该问卷。

  4. 在某些类型的性能问题中,捕获名为“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 文件以及一个或多个 collect-diagnostics 文件上传到 SR 或支持人员在 SR 和电子邮件中提供给您的 ftp 链接。

  5. 除了收集诊断信息外,捕获以下信息可能会有帮助;

    • 打开 putty 会话的日志记录,
    • 然后运行以下命令,
    • 然后收集 Putty 日志并将其下载到您的系统,
    • 然后将 PuTTY 日志、收集诊断和请求的任何其他数据附加到 SR。

    从 VPlexcli 提示符运行以下命令。

    1. cluster status
    2. ll clusters/**/storage-views/* --full
    3. ll ~ports
    4. show-use-hierarchy /clusters/**/virtual-volumes/*
    5. ll ~system-volumes
    6. ls -t /clusters/*/directors/*::serial-number (此命令列出每个节点的所有 DST)
    7. ls -t /clusters/**/director-*/::hostname (显示的主机名是 IP 地址,这是预期行为)

B.如何在 Metro Node 群集上捕获 collect-diagnostics?

提醒:包含过去 30 天数据的基本文件足以调查和解决大多数问题。除非支持人员另有指示,否则应该使用以下选项。
要捕获此数据,请运行带有“--noextended”和“--last-logs 30d”标志的 collect-diagnostics 命令。
  1. 在控制器节点 Linux 提示符下建立 SSH 会话(例如 service@director-1-1-a),然后登录 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:/>
  2. 要启动 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 程序包。

  1. 当 collect-diagnostics 命令完成并返回到 vplexcli 提示符时,使用 winscp [或等效的 SCP 实用程序] 连接到您从中运行该命令的控制器,并浏览到文件夹 /diag/collect-diagnostics-out/

  2. 识别一个或多个具有正确时间戳的日志文件,并将其下载到本地工作站。

D. 如何取消正在进行的收集诊断

提醒:这是一项无中断活动。由于没有直接命令可取消收集过程,因此您必须重新启动管理控制台。但是,在中止正在运行的 collect-diagnostics 之前,请联系支持人员解释为何要取消运行 collect-diagnostics,以确保它正常,因为可能会丢失数据。在取消作后重新运行 collect-diagnostics 时,无法再次收集此丢失的数据。
  1. 如果您仍在先前启动 collect-diagnostics 的 PuTTY 会话中,则应该会看到 collect-diagnositcs 的输出,显示它仍在运行。

    输出示例:

    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 ..
  2. 打开重复的 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:~>
  3. 在控制器上,使用以下命令重新启动管理控制台,以取消正在运行的 collect-diagnostics。

    输出示例:

    service@director-1-1-b:~> sudo systemctl restart VPlexManagementConsole.service
  4. 当您重新启动管理控制台时,回顾在其中运行 collect-diagnostics 的第一个 PuTTY 会话,您应该会看到 collect-diagnostics 报告以下内容,作为最后记录的输出:

    "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. <<<
  5. 看到 collect-diagnostics 停止后,执行上述步骤 3,返回第二个 PuTTY 会话并“cd”到 /diag 目录,然后运行“ll ”,您应该会看到一些额外的目录。

    • collect-diagnostics-tmp
    • collect-diagnostics-jobs
    • collect-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>
  6. 如果查看其中每个目录,您会看到文件,其中包含您启动现已取消的 collect-diagnostics 的日期和时间。这些文件占用 /diag 分区中的空间,应将其删除。

  7. 要从 /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>
  8. 如果存在“collect-diagnostics-tmp-ext”目录,请将其删除并运行“rm -r collect-diagnostics-tmp-ext

    提醒:扩展文件通常用于调查节点崩溃。如果正在对节点崩溃进行调查,并且支持人员未捕获所有必要的日志,请在清理 collect-diagnostics-tmp-ext 目录之前与支持人员联系,因为这样做可能会删除必要的核心文件。

 

Affected Products

metro node mn-114, metro node mn-215
Article Properties
Article Number: 000197436
Article Type: How To
Last Modified: 01 Jul 2025
Version:  8
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.