Net-snmp agent扩展
来源:互联网 发布:广电网络客服电话绵阳 编辑:程序博客网 时间:2024/06/04 18:51
1 Net snmp安装
(略)
注意:configure时如果指定--enable-mini-agent,则下面命令无法返回正确结果
snmptable -v2c -c public 192.168.1.3 1.3.6.1.2.1.4.20
即无法获取ipTable信息
共有3个配置文件:snmpd.conf、snmp.conf、snmptrap.conf snmpd运行时读取snmpd.conf、snmp.conf snmptrap运行时读取snmptrap.conf snmp.conf:与MIB库配置相关,如加载哪些MIB库,加载MIB库的路径等 snmpd.conf:配置代理和管理端通信时的参数,如访问agent时ip地址的限制,读写权限的限制、访问OID的限制等 snmptrap.conf:agent端trap配置(目前还没有研究,待加) snmpd和snmptrap会默认在以下路径找配置文件: /usr/local/net-snmp/etc/snmp2 配置文件
4.1 扩展自己的MIB库
MIB模块一般都由变量和表组成。因此Net-snmp把SMI中的对象分为两大类:scalar和table。Scalar就包含我们常用的整型,字符串,时间等等数据类型。table就是scalar的一种集合,有一个和多个列组成,类似于数据库中的表。它必须具有索引项,用来按一定顺序检索表项。
在扩展的MIB库中,我们定义了两个scalar变量(SecondCounter、WeekTime)和一个table变量(ExampleTable),
命令使用:
为scalar变量生产代码:myMIB.c myMIB.h
$./mib2c -c mib2c.scalar.conf myMIB
为table变量生产代码:ExampleTable.c ExampleTable.h
$./mib2c -c mib2c.iterate.conf ExampleTable
- Net-snmp agent扩展
- Net-snmp 使用c 扩展 sub-agent
- 自定义SNMP Agent扩展
- Snmp Agent扩展
- windows下使用net-snmp实现agent扩展(一)
- windows下使用net-snmp实现agent扩展(二)
- windows下使用net-snmp实现agent扩展(三)
- windows下使用net-snmp实现agent扩展(四)
- Linux下基于net-snmp的Agent扩展开发
- windows下使用net-snmp实现agent扩展(一)
- windows下使用net-snmp实现agent扩展(二)
- windows下使用net-snmp实现agent扩展(三)
- windows下使用net-snmp实现agent扩展(四)
- net-snmp agent开发
- net-snmp agent开发(用net-snmp扩展MIB库)
- Extending the UCD-SNMP(net-snmp) agent
- linux net-snmp agent manager windows snmp
- 在net-snmp agent中扩展自己的mib 的三种方式
- window.open()与window.opener()
- 如何查看linux内存
- C++ namespace
- 留下是因为找到了自己的位置
- [转]HTTP请求(GET与POST区别)和响应
- Net-snmp agent扩展
- CE6上的虚拟内存布局
- linux支持的最大物理内存
- 第5届索尔维会议
- 孩子感冒看病,一天花掉一万多
- C# 连接access并存至datatable中
- 【转】HTTP POST GET 本质区别详解
- Draw
- HSV 和 RGB 互换 函数 c++