资源诊断

Cumulus Linux 在内核和交换芯片之间同步路由。如果硬件中所需的资源池已满,则新的内核路由可能会导致现有路由从完全分配变为部分分配。为避免此问题,请监控硬件中的路由,使其保持在 ASIC 限制以下。

您可以检索有关主机条目、MAC 条目、第 2 层和第 3 层路由以及ECMP路由的信息,这些路由正在使用中。

要监控 Cumulus Linux 硬件中的路由,您可以使用 NVUE 命令或 Linux cl-resource-query 命令。

要显示全局和 ACL ASIC 资源,请运行 nv show platform asic resource 命令。

cumulus@switch:~$ nv show platform asic resource
Global 
========= 
    Resource Name             Count         Max        Percentage 
    ------------------                      -----      ---------
    IPv4-host-entries             4         32768      0% 
    IPv6-host-entries             4         8192       0% 
    IPv4-neighbors                4                    0% 
    IPv6-neighbors                4                    0% 
    IPv4-route-entries            22        65536      0% 
    IPv6-route-entries            21        45056      0% 
        IPv4-Routes               22                   0% 
    IPv6-Routes                   13                   0% 
    MAC-entries                   36        40960      0% 
    Total-Mcast-Routes             0        1000       0% 
    Ingress-ACL-entries            0                   0% 
    Egress-ACL-entries             0                   0% 
      Total-Routes                 43       110592     0% 
    ACL-Regions                    2        400        0% 
    ACL-18B-Rules-Key              2        3792       0% 
    ACL-36B-Rules-Key              0        1536       0% 
    ACL-54B-Rules-Key              0        1024       0% 
    ECMP-entries                   5                   0% 
    ECMP-nexthops                  8        7808       0% 
    Flow-Counters                  10       16196      0% 
       RIF-Basic-Counters          36       1000       3% 
    RIF-Enhanced-Counters          0        964        0% 
    Downstream-VNI-FID-count       0                   0% 
    Total-FID-count                3        6143       0% 
    Vport-FID-count                3                   0%
Acl 
====== 
    Resource Name                         18B Rule     36B Rule     54B Rule      Rule Count 
    ----------------------------          ----------   -----------  ----------     ------ 
    Egress-ACL-ipv4-filter-table           0           0               0            0 
    Egress-ACL-mac-filter-table            0           0               0            0 
    Ingress-ACL-mac-filter-table           0           0               0            0 
    Ingress-ACL-ipv4-filter-table          0           0               0            0 
    Ingress-ACL-ipv6-filter-table          0           0               0            0 
    Ingress-ACL-ipv4-mangle-table          1           0               0            1 
    Ingress-ACL-ipv6-mangle-table          0           0               0            0 
    Egress ACL-ipv4-mangle-table           1           0               0            1 
    Egress-ACL-ipv6-mangle-table           0           0               0            0 
    Ingress-PBR-ipv4-filter-table          0           0               0            0 
    Ingress-PBR-ipv6-filter-tabl           0           0               0            0  

要在表格格式中显示交换机上的全局 ASIC 资源,请运行 nv show platform asic resource global 命令。

cumulus@switch:~$ nv show platform asic resource global
Resource Name                     Count   Max      Percentage 
    ------------------            -----   ----      ---------- 
    IPv4-host-entries             4       32768     0%
    IPv6-host-entries             4       8192      0% 
    IPv4-neighbors                4                 0% 
    IPv6-neighbors                4                 0% 
    IPv4-route-entries            22      65536     0% 
    IPv6-route-entries            21      45056     0% 
    IPv4-Routes                   22                0% 
    IPv6-Routes                   13                0% 
    MAC-entries                   36      40960     0% 
    Total-Mcast-Routes            0       1000      0% 
    Ingress-ACL-entries           0                 0% 
    Egress-ACL-entries            0                 0% 
    Total-Routes                  43      110592    0% 
    ACL-Regions                   2       400       0% 
    ACL-18B-Rules-Key             2       3792      0% 
    ACL-36B-Rules-Key             0       1536      0% 
    ACL-54B-Rules-Key             0       1024      0% 
    ECMP-entries                  5                 0% 
    ECMP-nexthops                 8       7808      0% 
    Flow-Counters                 10      16196     0% 
    Ingress-ACL-entries           0                 0% 
    RIF-Basic-Counters            36      1000      3% 
    RIF-Enhanced-Counters         0       964       0% 
    Downstream-VNI-FID-count      0                 0% 
    Total-FID-count               3       6143      0% 
    Vport-FID-count               3                 0%
    Dynamic-Config-DNAT-entries   0       64        0.0% 
    Dynamic-Config -SNAT-entries  0       64        0.0% 
    Dynamic-DNAT-entries          0       1024      0.0% 
    Dynamic-SNAT-entries          0       1024      0.0% 

要仅在表格格式中显示 ACL ASIC 资源,请运行 nv show platform asic resource acl 命令。

cumulus@switch:~$ nv show platform asic resource acl
Resource Name                        18B Rule     36B Rule     54B Rule    Rule Count 
    ----------------------------     ----------   ----------   ----------  -------- 
    Egress-ACL-ipv4-filter-table       0          0             0          0 
    Egress-ACL-mac-filter-table        0          0             0          0 
    Ingress-ACL-mac-filter-table       0          0             0          0 
    Ingress-ACL-ipv4-filter-table      0          0             0          0 
    Ingress-ACL-ipv6-filter-table      0          0             0          0 
    Ingress-ACL-ipv4-mangle-table      1          0             0          1 
    Ingress-ACL-ipv6-mangle-table      0          0             0          0 
    Egress ACL-ipv4-mangle-table      1           0             0          1 
    Egress-ACL-ipv6-mangle-table      0           0             0          0 
    Ingress-PBR-ipv4-filter-table     0           0             0          0 
    Ingress-PBR-ipv6-filter-tabl      0           0             0          0 
    Egress-ACL-ipv6-filter-table      0           0             0          0 

以下示例显示了 NVIDIA Spectrum-2 交换机的 cl-resource-query 结果

cumulus@switch:~$ sudo cl-resource-query
IPv4 host entries:                      0,   0% of maximum value  41360
IPv6 host entries:                      0,   0% of maximum value  20680
IPv4 neighbors:                         0
IPv6 neighbors:                         0
IPv4 route entries:                     0,   0% of maximum value  82720
IPv6 route entries:                    22,   0% of maximum value  74446
IPv4 Routes:                            0
IPv6 Routes:                           12
Total Routes:                          22,   0% of maximum value 157166
Unicast Adjacency entries:              0,   0% of maximum value  33087
ECMP entries:                           0,   0% of maximum value   8571
MAC entries:                           38,   0% of maximum value  57903
Total Mcast Routes:                     0,   0% of maximum value   1000
Ingress ACL entries:                    0
Egress ACL entries:                     0
ACL Regions:                            4,   1% of maximum value    400
ACL 18B Rules Key:                      1,   0% of maximum value  57476
ACL 36B Rules Key:                      0,   0% of maximum value  57475
ACL 54B Rules Key:                      0,   0% of maximum value  34485
Ingress ACL mac filter table:           0    18B : 0 36B : 0 54B : 0 
Ingress ACL ipv4 filter table:          0    18B : 0 36B : 0 54B : 0 
Ingress ACL ipv6 filter table:          0    18B : 0 36B : 0 54B : 0 
Egress ACL mac filter table:            0    18B : 0 36B : 0 54B : 0 
Egress ACL ipv4 filter table:           0    18B : 0 36B : 0 54B : 0 
Egress ACL ipv6 filter table:           0    18B : 0 36B : 0 54B : 0 
Ingress ACL ipv4 mangle table:          0    18B : 0 36B : 0 54B : 0 
Ingress ACL ipv6 mangle table:          0    18B : 0 36B : 0 54B : 0 
Ingress PBR ipv4 filter table:          0    18B : 0 36B : 0 54B : 0 
Ingress PBR ipv6 filter table:          0    18B : 0 36B : 0 54B : 0 
Flow Counters:                          2,   0% of maximum value  39430
RIF Basic Counters:                     0,   0% of maximum value   7885
RIF Enhanced Counters:                 38,   1% of maximum value   2666
Dynamic SNAT entries:                   0,   0% of maximum value   1024
Dynamic DNAT entries:                   0,   0% of maximum value   1024
Dynamic Config SNAT entries:            0,   0% of maximum value     64
Dynamic Config DNAT entries:            0,   0% of maximum value     64

Ingress ACL 和 Egress ACL 条目显示单宽(双宽)计数。有关 ACL 条目的信息,请参阅估算 ACL 规则的数量