snmpwalk的报错

在给squid配置了snmp后,用snmpwalk采集数据,总览一下:
snmpwalk -v2c -c test 10.160.253.77 iso.3.6.1.2.1.10.166.4.1.2.3
iso.3.6.1.2.1.10.166.4.1.2.3.1.3.77.77.77.77.0.45.4 = Gauge32: 1
iso.3.6.1.2.1.10.166.4.1.2.3.1.3.77.77.77.77.0.0.33686018 = Gauge32: 1
Error: OID not increasing: iso.3.6.1.2.1.10.166.4.1.2.3.1.3.77.77.77.77.0.45.4
 >= iso.3.6.1.2.1.10.166.4.1.2.3.1.3.77.77.77.77.0.0.33686018
原理snmp默认在抓取oid的时候,是按顺序递增下去请求的,于是就出错退出了。
解决方法很简单,加上-Cc参数即可,help说明如下:
  -C APPOPTS Set various application specificbehaviours:
 p:  print the number of variablesfound
 i:  include given OID in the searchrange
 I:  don't include the given OID,even if no results are returned
  c:  do not check returned OIDsare increasing
 t:  Display wall-clock time tocomplete the request

你可能感兴趣的:(include,application,c,网络)