imedge/snmp

SNMP 协议实现

v0.3.0 2024-09-20 08:16 UTC

This package is auto-updated.

Last update: 2024-09-20 08:17:20 UTC


README

SNMP 协议实现,使用原生 PHP 进行异步使用。API 可能会更改,SNMPv3 认证已就绪,加密将很快实现

Coding Standards Unit Tests Static Analysis PHPStan Level 9 Minimum PHP Version: 8.1 License: MIT Version

用法

请参阅 examples 目录中的使用示例

  • get_multiple_oids.php 从多个 IP 地址并行获取 OID 列表
  • trap-recieve.php 是一个简单的 Trap 接收器
  • trap-send.php 每秒发送 60 个测试 traps 以测试接收器

调整

对于高流量配置,可能需要增加网络堆栈缓冲区大小

$ sudo sysctl -w net.core.rmem_max=26214400
net.core.rmem_max = 26214400
$ sudo sysctl -w net.core.rmem_default=26214400
net.core.rmem_default = 26214400