Chinaunix首页 | 论坛 | 博客
  • 博客访问: 239899
  • 博文数量: 32
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 414
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-22 11:22
个人简介

.....

文章分类

全部博文(32)

文章存档

2016年(1)

2015年(12)

2014年(19)

我的朋友

分类: 系统运维

2015-04-01 08:58:08

snmp 中进行流量统计的MIB变量ifInOctets and ifOutOctets 溢出问题

    在MRTG中进行流量统计是通过采集ifInOctets and ifOutOctets ,等过一段时间再采集这两个值,然后进行相减就得出这一

段时间的平均流量,如果这个数出现溢出就会出现问题。     

snmp 中进行流量统计的MIB变量ifInOctets and ifOutOctets 溢出问题

    在MRTG中进行流量统计是通过采集ifInOctets and ifOutOctets ,等过一段时间再采集这两个值,然后进行相减就得出这一段时间的平均流量,如果这个数出现溢出就会出现问题。
     在使用MRTG进行网络接口的流量统计时,发现一个溢出问题。由于ifInOctets and ifOutOctets 的类型是counter是一个32位的无符号数,当流量超100M时,每5分钟采集一次流量就会出现溢出的问题。
 为了解决这个问题,需要使用SNMPV2C版本的MIB变量才好,由于MRTG本身可以支持使用SNMPV2C变量,可以这样设置:
 SNMPv2c

 If you have a fast router you might want to try to poll the ifHC* counters. This feature gets activated by switching to SNMPv2c. Unfortunately not all devices support SNMPv2c yet. If it works, this will prevent your counters from wraping within the 5 minute polling interval, since we now use 64 bit instead of the normal 32 bit.
Example:

 Target[myrouter]: 2:public@router1:::::2 

阅读(3762) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~