php snmp代码编写,PHP snmp2_walk 用法 手册 | 示例代码

本文探讨了在100mbps网络环境下,通过测试发现SNMPGet连续请求多个对象比SNMPWalk遍历同一树获取相同数据更快。作者详细介绍了测试过程,并指出对于6个OID的请求,SNMPGet在相同时间内能完成18次单独请求,这为寻求提高SNMP请求效率的读者提供了有价值的信息。
摘要由CSDN通过智能技术生成

After some testing, I have found that SNMPWalk is considerably slower than multiple SNMPGet.

I was aiming to retrieve 6 Objects from a MIB; the device being polled was attached via a 100mbps network link.

I decided to run SNMPGet within a loop to retrieve each Object from the specified OID's.

As these OID's were within the same tree, I then thought about using walk as this would consolidate the data into a single request. I then walked the tree to get the same result.

I subsequently testing the time it took to retrieve this information via microtime().

As a result, you can retrieve 1 walk containing 6 OID's within the same time as requesting 18 OIDs via get.

I hope this helps someone whom is looking to speed up their SNMP requests.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值