Home › Forums › FABRIC General Questions and Discussion › Infrastructure-metrics queries
Tagged: infrastructure-metrics
- This topic has 3 replies, 4 voices, and was last updated 10 months, 3 weeks ago by Charles Carpenter. 
- 
		AuthorPosts
- 
		
			
				
November 26, 2024 at 5:28 pm #7846Dear 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: ifHCInBroadcastPktsandifInBroadcastPkts. Is the best practice to query for both using anorargument? 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 theorargument?November 28, 2024 at 3:05 pm #7867I 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. December 2, 2024 at 6:22 pm #7888Hi, 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 ?December 11, 2024 at 1:07 pm #7939I 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
- 
		AuthorPosts
- You must be logged in to reply to this topic.
