Packetized MMU Stats

This chapter contains the following sections:

About Packetized MMU Stats

Beginning with Cisco NX-OS release 9.2(2), the Packetized MMU Stats (PSTATS) is now supported. PSTATS uses the ASIC capability to read stats using direct memory access (DMA) instead of reading port-by-port or queue-by-queue. It uses the streaming telemetry framework to push data to a receiver.

Guidelines and Limitations

The PSTATS feature has the following guidelines and limitations:

  • For information about supported platforms, see the Nexus Switch Platform Matrix.

  • Because of a hardware limitation, either Out-of-Band or PSTATS can be enabled at one time.

  • You must change the Broadcom configuration variable to use this feature, which also requires a reload.

Using Packetized MMU Stats

Either the Out-of-Band or the PSTATS feature can be enabled at one time. By default, the Out-of-Band feature will be enabled.

Following are the commands to use for the PSTATS feature:

  • To disable the default Out-of-Band feature and enable PSTATS (to begin fetching data using the PSTAT DMA):

    hardware profile statistics pstat [peak]

    You must reload to allow the enabling of the PSTATS to take affect:

    switch# reload

    The following displays all the commands entered by you that require a reload, and what is displayed with relation to PSTATS:

    switch(config)# show system config reload-pending
     
    Following config commands require copy r s + reload : 
    ======================================================
    0       hardware profile statistics pstat
    ======================================================
    
    

    Note

    If you want to disable PSTATS and re-enable the default Out-of-Band feature, enter:

    no hardware profile statistics pstat [peak]

    You must reload to allow the enabling of the default Out-of-Band feature to take affect:

    switch# reload

  • To get the PSTATS statistics:

    show hardware internal buffer info pstats [interface <if-name-range>][service-pool][detail]

    The telemetry framework uses the command to read the data from the hardware, registers all ports one by one, and pushes the data to the collector.

    For example:

    telemetry  destination-group 100    
        ip address 171.68.248.76 port 50001 protocol gRPC encoding GPB  
        sensor-group 100    data-source NX-API    
        path "show hardware internal buffer info pkt-stats pstats" depth unbounded  
        subscription 100    dst-grp 100    snsr-grp 100 sample-interval 5000
    
    
  • To get debugging information:

    • At the DME level:

      switch# show system internal dme running-config all dn sys/pltfm | grep pstat
      
            "pstatCfg": "PSTAT_ENABLE_PEAK",
      
      
    • At the pltfm_config level:

      switch# show system internal pltfm_config info all | grep -A 10 "STAT"
      Buffer stat collect type and mode OOBSTA/PSTAT
      Buf stat collect type OOBSTAT/PSTAT:1 [OOBSTAT]
      Buf stat collect mode Instantaneous/Peak: 0 [Instantaneous]
      
       
    • At the BCM level:

      switch # bcm-shell module 1 "config show" | grep -i buffer
      buffer_stats_collect_mode=0
      buffer_stats_collect_type=1
      switch#
      
       
  • Verify the telemetry configuration using the show run telemetry command, as shown in this example:

    switch# show run telemetry
    
    !Command: show running-config telemetry
    !Time: Tue Mar  6 18:36:38 2018
    
    version 9.2(2)
    feature telemetry
    
    telemetry
      destination-group 100
        ip address 171.68.248.76 port 50001 protocol gRPC encoding GPB
      sensor-group 100
        data-source NX-API
        path "show hardware internal buffer info pkt-stats" depth unbounded
      subscription 100
        dst-grp 100
        snsr-grp 100 sample-interval 5000
    

Following is example file output when running telemetry on an ADS server:

D0308 16:38:23.229714038    2519 env_linux.c:77]             Warning: insecure environment read function 'getenv' used
E0308 16:38:23.230022365    2519 tcp_server_posix.c:148]     check for SO_REUSEPORT: {"created":"@1520555903.230006737","description":"SO_REUSEPORT unavailable on compiling system","file":"src/core/lib/iomgr/socket_utils_common_posix.c","file_line":175}
Server listening on 0.0.0.0:50001
Received GBP RPC at: Thu Mar  8 16:38:25 2018
Data size is: 722
header {
  node_id_str: C14-HAV-2029
  encoding_path: show hardware internal buffer info pkt-stats pstats
  collection_id: 30
  data_gpbkv {
    timestamp: 0
    name:
    fields {
      timestamp: 0
      name: keys
      value (invalid):
        fields {
          timestamp: 0
          name: show hardware internal buffer info pkt-stats pstats
          value: show hardware internal buffer info pkt-stats pstats
        }
    }
    fields {
      timestamp: 0
      name: content
      value (invalid):
        fields {
          timestamp: 0
          name:
          value:
        subfields {
          name: TABLE_module
            fields {
              timestamp: 0
              name:
              value:
            subfields {
              name: ROW_module
                fields {
                  timestamp: 0
                  name:
                  value:
                subfields {
                  name: module_number
                  timestamp: 0
                  value (uint64): 1
                  }
                subfields {
                  name: TABLE_instance
                    fields {
                      timestamp: 0
                      name:
                      value:
                    subfields {
                      name: ROW_instance
                        fields {
                          timestamp: 0
                          name:
                          value:
                        subfields {
                          name: instance
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: supports_8q
                          timestamp: 0
                          value (uint64): 1
                          }
                        subfields {
                          name: total_instant_usage_1
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_4
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_1
                          timestamp: 0
                          value (uint64): 63764
                          }
                        subfields {
                          name: rem_instant_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_4
                          timestamp: 0
                          value (uint64): 6960
                          }
                        subfields {
                          name: max_cell_usage_1
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_4
                          timestamp: 0
                          value (uint64): 212
                          }
                        subfields {
                          name: switch_cell_count_1
                          timestamp: 0
                          value (uint64): 63764
                          }
                        subfields {
                          name: switch_cell_count_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: switch_cell_count_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: switch_cell_count_4
                          timestamp: 0
                          value (uint64): 6960
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
    }
}
--------------------------------------------------------------------------------

Recevied GBP RPC at: Thu Mar  8 16:38:29 2018
Data size is: 722
header {
  node_id_str: C14-HAV-2029
  encoding_path: show hardware internal buffer info pkt-stats
  collection_id: 31
  data_gpbkv {
    timestamp: 0
    name:
    fields {
      timestamp: 0
      name: keys
      value (invalid):
        fields {
          timestamp: 0
          name: show hardware internal buffer info pkt-stats
          value: show hardware internal buffer info pkt-stats
        }
    }
    fields {
      timestamp: 0
      name: content
      value (invalid):
        fields {
          timestamp: 0
          name:
          value:
        subfields {
          name: TABLE_module
            fields {
              timestamp: 0
              name:
              value:
            subfields {
              name: ROW_module
                fields {
                  timestamp: 0
                  name:
                  value:
                subfields {
                  name: module_number
                  timestamp: 0
                  value (uint64): 1
                  }
                subfields {
                  name: TABLE_instance
                    fields {
                      timestamp: 0
                      name:
                      value:
                    subfields {
                      name: ROW_instance
                        fields {
                          timestamp: 0
                          name:
                          value:
                        subfields {
                          name: instance
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: supports_8q
                          timestamp: 0
                          value (uint64): 1
                          }
                        subfields {
                          name: total_instant_usage_1
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_4
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_1
                          timestamp: 0
                          value (uint64): 63764
                          }
                        subfields {
                          name: rem_instant_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_4
                          timestamp: 0
                          value (uint64): 6960
                          }
                        subfields {
                          name: max_cell_usage_1
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_4
                          timestamp: 0
                          value (uint64): 212
                          }
                        subfields {
                          name: switch_cell_count_1
                          timestamp: 0
                          value (uint64): 63764
                          }
                        subfields {
                          name: switch_cell_count_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: switch_cell_count_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: switch_cell_count_4
                          timestamp: 0
                          value (uint64): 6960
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
    }
}
--------------------------------------------------------------------------------



Recevied GBP RPC at: Thu Mar  8 16:38:35 2018
Data size is: 722
header {
  node_id_str: C14-HAV-2029
  encoding_path: show hardware internal buffer info pkt-stats
  collection_id: 32
  data_gpbkv {
    timestamp: 0
    name:
    fields {
      timestamp: 0
      name: keys
      value (invalid):
        fields {
          timestamp: 0
          name: show hardware internal buffer info pkt-stats
          value: show hardware internal buffer info pkt-stats
        }
    }
    fields {
      timestamp: 0
      name: content
      value (invalid):
        fields {
          timestamp: 0
          name:
          value:
        subfields {
          name: TABLE_module
            fields {
              timestamp: 0
              name:
              value:
            subfields {
              name: ROW_module
                fields {
                  timestamp: 0
                  name:
                  value:
                subfields {
                  name: module_number
                  timestamp: 0
                  value (uint64): 1
                  }
                subfields {
                  name: TABLE_instance
                    fields {
                      timestamp: 0
                      name:
                      value:
                    subfields {
                      name: ROW_instance
                        fields {
                          timestamp: 0
                          name:
                          value:
                        subfields {
                          name: instance
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: supports_8q
                          timestamp: 0
                          value (uint64): 1
                          }
                        subfields {
                          name: total_instant_usage_1
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: total_instant_usage_4
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_1
                          timestamp: 0
                          value (uint64): 63764
                          }
                        subfields {
                          name: rem_instant_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: rem_instant_usage_4
                          timestamp: 0
                          value (uint64): 6960
                          }
                        subfields {
                          name: max_cell_usage_1
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: max_cell_usage_4
                          timestamp: 0
                          value (uint64): 212
                          }
                        subfields {
                          name: switch_cell_count_1
                          timestamp: 0
                          value (uint64): 63764
                          }
                        subfields {
                          name: switch_cell_count_2
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: switch_cell_count_3
                          timestamp: 0
                          value (uint64): 0
                          }
                        subfields {
                          name: switch_cell_count_4
                          timestamp: 0
                          value (uint64): 6960
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
    }
}