博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
通过SNMP获取接口速率 32位与64位的区别
阅读量:6950 次
发布时间:2019-06-27

本文共 1981 字,大约阅读时间需要 6 分钟。

  • 首先,接口的速率是指单位时间内数据总量,那么实际在监控时也是通过数据总量这个累计值来计算得出速率,这个累计值MIB中是有自己的名称的。从设计出发点上来讲,咱们通过这个值主要是为了获得速率等信息,但是这个值是个累计值,这就会导致这个值可以无限的增加,大家知道计算机处理数据时是有位长限制的,那么怎么办呢?将这个值清0重新进行计算。这样就有了个最大值,当达到这个值时,就会重新计算,这个值即2^32或2^64。
  • 在MIB中,ifOutOctets和ifInOctets来分别表示接口流出数据量和接口流入数据量,单位是字节。其数据类型为counter32。其能表示最大值为2^32Byte=4GB。
  • ifHCOutOctets和ifHCInOctets也是分别表示接口流出数据量和接口流入数据量其数据类型为counter64,最大值为16EB这个值的概念是如果千兆口满跑4000多年才能达到。
  • 但是如果是counter32位的呢,千兆口满跑32秒即可达到此值。那么这就派生出问题了,如果接口的速率非常高那么用32位的来获取的值很有可能就不准确了。所以大家尽量使用64位的来取值,但前提是系统支持。这个可以通过MIB browser来扫描判断。
  1. IF-MIB:ifInOctets

  2. OID 1.3.6.1.2.1.2.2.1.10

  3. Type Counter32

  4. desc The total number of octets received on the interface , including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system , and at other times as indicated by the value of ifCounterDiscontinuityTime.

  5. IF-MIB:ifOutOctets

  6. OID 1.3.6.1.2.1.2.2.1.16

  7. Type Counter32 4.The total number of octets transmitted out of the interface , including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system , and at other times as indicated by the value of ifCounterDiscontinuityTime.

  8. IF-MIB:ifHCInOctets 2.OID 1.3.6.1.2.1.31.1.1.1.6

  9. Type Counter64

  10. The total number of octets received on the interface , including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system , and at other times as indicated by the value of ifCounterDiscontinuityTime.

  11. IF-MIB:ifHCOutOctets

  12. OID 1.3.6.1.2.1.31.1.1.1.10

  13. Type Counter64

  14. The total number of octets transmitted out of the interface , including framing characters. This object is a 64-bit version of ifOutOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system , and at other times as indicated by the value of ifCounterDiscontinuityTime.

转载于:https://my.oschina.net/taomac/blog/796132

你可能感兴趣的文章
单目标决策---决策的分类
查看>>
Spring使用过程中遇到的一些问题
查看>>
通过javaBean反射转换成mybatis映射文件
查看>>
IIS_PHP5.3.x zend guard loader 的配置方法
查看>>
基于分布式锁的分布式定时任务实现
查看>>
数据库事务隔离级别-- 脏读、幻读、不可重复读(清晰解释)
查看>>
hadoop 开发环境设置以及可运行jar包生成
查看>>
MySQL 备份恢复
查看>>
intellij idea修改背景色以及快捷键大全
查看>>
Can't connect to X11 window server using 'localhos
查看>>
传统CPU架构不再是高性能计算唯一选择
查看>>
redis 介绍与安装
查看>>
letdown
查看>>
Action以外的类中来获得Spring所管理的Service对象
查看>>
Linux系统下手把手完成无人值守安装服务
查看>>
pyfa的汉化
查看>>
使用@Transactional(SUPPORTS)和不加@Transactional 有什么区别?
查看>>
apache-cxf测试webservice添加header信息
查看>>
JS判断一个页面是否已经打开
查看>>
TPS和QPS的区别
查看>>