1. Infrastructure-metrics queries

Infrastructure-metrics queries

Home Forums FABRIC General Questions and Discussion Infrastructure-metrics queries

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7846
    Bjoern Sagstad
    Participant

      Dear everyone,
      I am working with prometheus queries towards the infrastructure-metrics resource, and I have a quick question regarding the difference between HC(high capacity?) queries and Non HC queries.

      For example: ifHCInBroadcastPkts and ifInBroadcastPkts. Is the best practice to query for both using an or argument? Could we ever get different data back from them from the same port? Or is it more that some ports support one and some the other and to ensure we get data we would use the or argument?

      #7867
      Tom Lehman
      Participant

        I think the main consideration is that HC is based on 64 bit counters, and the non HC is based on 32 bit counters.  So for a high speed interface a 32 bit counter may roll over quite often.  Using a 64 bit counter is more convenient in terms of not having to monitor for counter roll overs.  The data in terms of packet counts should be equivalent.

        #7888
        Nishanth Shyamkumar
        Participant

          Hi,

          A follow up question on this,
          1) Does this mean that HC always holds the correct value of that counter ?
          2) What happens to non-HC counters when it exceeds 32 bits? Does it get set to 2^32 – 1, or does it overflow and we see the remainder (true value % (2^32)) in this field ?

          #7939
          Charles Carpenter
          Participant

            I am not sure how you define the “correct” value for the HC counter. It can cover exa- values (10^18) which would be 100s of years at 100M Packets per second.  I assume the HC counter is reset on device restart, so roll over should not be a worry. I don’t know what other events would cause the counter to be reset.

            In general interfaces that are:
            < 20Mbs use 32 bit counters
            > 20Mbs & < 650Mbs use 32 or 64 bit counters
            > 650Mbs use 64 bit counters
            see https://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/26007-faq-snmpcounter.html#toc-hId–1387592458
            and https://www.ietf.org/rfc/rfc2233.txt
            32 bit counters should reset to 0 on overflow.

            Counters are relative to the time frame you are analyzing. A benefit of using Prometheus to query the data are the built-in functions.
            Consider using the “rate” function. This function is aware of counter resets and will adjust the values as needed. see https://prometheus.io/docs/prometheus/latest/querying/functions/#rate

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.