跳转到主内容

如何收集 SECD 跟踪

Views:
128
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

适用于

  • ONTAP 9

说明

  • 在排除身份验证相关问题时,可能需要增加安全后台程序(SECD)的详细程度。
  • 以下概述了与 diag level 命令相关联的选项及其建议用法。
    • diag level 命令只能在 NetApp 支持的指导下使用
    • 默认情况下,SECD 仅记录错误和失败的 rpc 命令
      • 故障排除完成后,清除跟踪。
      • 这将确保不会因保持活动跟踪运行而在系统上产生额外开销。
      • 要清除,请对所有节点执行以下操作:::*> diag secd trace clear -node <node> -vserverids yes

追加信息

  • SECD 是一个 diag 命令,因此这些示例未记录在任何面向公众的信息中。
    • 以下是运行 trace 的命令示例
    • 阅读此文档以查看所有不同的选项:

test1::*> diag secd trace set -node test1-01 -vserverids main -trace-all yes

SECD 跟踪设置基础知识:

  • secd 使用仅限于 diag 级别
  • set diag 必须在运行命令之前调用。
    • 命令示例:

test1::*> diag secd trace ?
clear                       *Clear Trace Options
set                         *Set Trace Options
show                        *Show Trace

  • 使用 show 选项确认当前跟踪设置。
    • 如果跟踪设置与参数匹配,请使用 clear 选项删除所有当前设置。    

test1::*> diag secd trace show -node test1-01
Trace Spec
---------------------------------------

Trace spec has not been set.

  • 以下是可用于设置跟踪的参数。 
    • 注意:每次运行set命令时都需要节点: 

 test1::*> diag secd trace set ?
   [-node] <nodename>                   *Node
  [[-trace-all] {yes|no}]               *Trace All RPCs
  [ -vserverids <vserver>, ... ]        *Id List
  [ -ipaddrs <text>, ... ]              *Address List
  [ -domain-names <text>, ... ]         *Domain List
  [ -dc-names <text>, ... ]             *DC List
  [ -rpc-names <rpc_name>, ... ]        *RPC List
  [ -module-names <module_name>, ... ]  *Module List
  [ -trace-connectivity {yes|no} ]      *Trace Connection Errors

  • 以下示例在节点 test1-01, 上设置跟踪,包括名为 'main' 的 Storage Virtual Machine (SVM)。 

test1::*> diag secd trace set -node test1-01 -vserverids main -trace-all yes
Trace spec is set successfully for trace-all Vservers.

  • 检查跟踪参数:

test1::*> diag secd trace show -node test1-01
Trace Spec
---------------------------------------
TraceAll:                     Tracing all RPCs
Vserver IDs:                  main

  • 注意
    • 与"set"相关联的命令是累积命令,与"clear"相关联的命令是减法命令。
    • 因此,在上述示例的基础上,通过运行以下命令将捕获限制为特定域:

test1::diag secd trace set -node test1-01 -domain-names test
Trace spec is set successfully for domains.

test1::diag secd trace show -node test1-01
Trace Spec
---------------------------------------
TraceAll:                     Tracing all RPCs
Domain names:                 test
Vserver IDs:                  main

  • 注意
    • 将域添加到包含 SVM ID 的现有跟踪参数,以及添加要过滤的 IP 地址,如下所示:
    • 将跟踪限制为一组特定的 IP 地址:

test1:: secd trace set -node test1-01 -ipaddrs 10.10.10.10,10.10.10.11,10.10.10.12,10.10.10.13
Trace spec is set successfully for ipaddrs.

  • 跟踪过滤器现在包括 SVM ID、域和特定 IP 地址列表: 

test1::diag secd*> trace show  -node test1-01                                                                         
Trace Spec   
---------------------------------------
TraceAll:                     Tracing all RPCs
IP Addrs:                     10.10.10.10 10.10.10.11 10.10.10.12 10.10.10.13 
Domain names:                 test
Vserver IDs:                  main

  • 如上所述,clear 选项是减法选项。
    • 如下面的帮助上下文中所述,与每个参数关联的输入为 'YES' 或 'NO'。

  test1::diag secd*> trace clear ?
   [-node] <nodename>               *Node
  [[-trace-all] {yes|no}]           *Clear Trace All
  [ -vserverids {yes|no} ]          *Clear VserverIds
  [ -ipaddrs {yes|no} ]             *Clear Ipaddrs
  [ -domain-names {yes|no} ]        *Clear Domains
  [ -dc-names {yes|no} ]            *Clear DC
  [ -rpc-names {yes|no} ]           *Clear RPC
  [ -module-names {yes|no} ]        *Clear Module
  [ -trace-connectivity {yes|no} ]  *Clear Trace Connection Errors

  • 因此,假设以下命令清除整个条目是错误的假设(如下面的show输出所示),请确保清除所有条目。
  • 注意: 不正确地清除参数可能会导致未来的日志收集工作出现问题: 

test1::diag secd trace clear  -node test1-01 -trace-all yes

test1::diag secd trace show  -node test1-01
Trace Spec
---------------------------------------
IP Addrs:                     10.10.10.10 10.10.10.11 10.10.10.12 10.10.10.13
Domain names:                 test
Vserver IDs:                  main

  • 以下语法将完全删除跟踪条目:

test1::diag secd trace clear -node test1-01 -ipaddrs yes -domain-names yes -vserverids yes

test1::diag secd trace show  -node test1-01
Trace Spec
---------------------------------------
Trace spec has not been set.

程序-实际跟踪收集:
  • 使用上述信息,可以成功设置跟踪参数。
  • 如果您不确定要打开的具体模块,最好使用 trace-all yes 设置来确保捕获尽可能多的数据。
  • 请执行以下步骤:
  1. 在重现问题之前,请运行 show 命令验证参数并将其包含在案例数据中。
    注意:
    1) 确保仅在重现期间启用跟踪。重现完成后,请立即禁用跟踪。
    2) 必须记录重现中涉及的所有相关信息。
        时间/日期、用户名和信息、IP 地址及其所有者(客户端、LIF、DC)、文件名、卷
        和共享信息等信息将极大地有助于日志分析。
     
  2. 有关跟踪收集序列,请参阅以下示例:

 test1::> set d
Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y

test1::*> diag secd trace show -node test1-01
 Trace Spec
---------------------------------------
Trace spec has not been set.

test1::*> diag secd trace set -node test1-01 -vserverids main -trace-all yes
Trace spec set successfully for trace-all, Vservers.

test1::*> diag secd trace show -node test1-01
Trace Spec
---------------------------------------
TraceAll:                     Tracing all RPCs
Vserver IDs:                  main

 

  1. 彻底清除跟踪的所有方面。
    运行show命令以确认未设置跟踪。
    test1::*> diag secd trace set -node test1-01 -vserverids main -trace-all no
    Trace spec set successfully for Vservers.
    Trace spec cleared successfully for trace-all.

    test1::*> diag secd trace show -node test1-01
    Trace Spec
    ---------------------------------------
    Vserver IDs:                  main

    test1::*> diag secd trace clear -node test1-01 -vserverids yes

    test1::*> diag secd trace show -node test1-01
    Trace Spec
    ---------------------------------------
    Trace spec has not been set.

     
  2. 生成Type All AutoSupport 从两个节点(这将上传 SECD 跟踪数据):
    ::> autosupport invoke * -type all
    注意: 用户还可以上传 secd 日志(/etc/log/mlog)。

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.