net-snmp

<UNKNOWN> value for host in snmptraps

感情迁移 提交于 2020-01-06 19:24:10
问题 while executing " snmptrap -v 1 -c public localhost TRAP-TEST-MIB::demotraps localhost 4 0 '' IF-MIB::ifIndex i 1" on my system,I am getting host ,ip & OID values as host = localhost.localdomain :ip = UDP: [127.0.0.1]:49109->[127.0.0.1] :OID =DISMAN-EVENT-MIB::sysUpTimeInstance 0:3:12:38.28 But when traps are coming from outside its showing host = :ip = UDP: [192.168.1.73]:52346->[192.168.1.23]:OID =DISMAN-EVENT-MIB::sysUpTimeInstance 7:1:05:54.27 . Now its clearly shown above that host value

SNMPd: Cannot open /proc/bus/pci

情到浓时终转凉″ 提交于 2020-01-04 20:47:12
问题 I cross-compiled NET-SNMP 5.7.1 from sources to a PowerPC using ELDK-3.1. When I try to load the snmpd daemon in my embedded board, I see the message: # snmpd -f -Lo pcilib: Cannot open /proc/bus/pci pcilib: Cannot find any working access method. Of course my PPC board has no PCI, and I wonder why is netsnmp looking for it. In more than one place I see this same message (sourceforge, mail-archive, google-groups), but ir has no answer at all. Another variant, with a little but unhelpful

SNMPd: Cannot open /proc/bus/pci

青春壹個敷衍的年華 提交于 2020-01-04 20:45:12
问题 I cross-compiled NET-SNMP 5.7.1 from sources to a PowerPC using ELDK-3.1. When I try to load the snmpd daemon in my embedded board, I see the message: # snmpd -f -Lo pcilib: Cannot open /proc/bus/pci pcilib: Cannot find any working access method. Of course my PPC board has no PCI, and I wonder why is netsnmp looking for it. In more than one place I see this same message (sourceforge, mail-archive, google-groups), but ir has no answer at all. Another variant, with a little but unhelpful

What is the correct encoding for SNMP type Unsigned32?

∥☆過路亽.° 提交于 2020-01-03 14:05:09
问题 I'm writing an SNMP agent and the MIB definition includes an OID of type Unsigned32. The Unix implementation of the agent uses Net-SNMP and sets the OID as type ASN_UNSIGNED, since it doesn't have an ASN_UNSIGNED32. When I look at the GET response with Wireshark, it decodes it as a "Gauge32" value. That makes sense at first sight, because according to RFC 1902 Unsigned32 and Gauge32 are the same. The Windows implementation is based on Windows' SnmpAPI.lib and sets the OID as ASN_UNSIGNED32

NET-SNMP: Getting more detail into Disman Traps

安稳与你 提交于 2020-01-01 19:13:09
问题 I'm working on traps using NET-SNMP and the DISMAN Event MIB With the following snmpd.conf configuration: createUser disman MD5 sercrt@1 rouser disman auth agentSecName disman #defaultMonitors yes disk / 90% disk /var 85% disk /opt 95% disk /opt/pkgs 90% disk /ufda 90% proc cron proc rtrcopy 1 1 proc socks1081 1 1 # monitor must have ".." in the line monitor -u disman -r 30 -o prNames.1 -o prErrMessage.1 "Cron not running" prErrorFlag.1 != 0 monitor -u disman -r 30 -o prNames.2 -o

net-snmp简介与命令工具集

纵饮孤独 提交于 2019-12-27 02:22:48
简介 net-snmp是支持SNMP的一套应用程序集和开发库,包含了代理端软件和管理端查询工具。 开发状态:成熟 操作系统:Linux、Solaris、HP-UX、Windows、FreeBSD、NetBSD、QNX... 开发语言:C、Perl 应用主题:网络监控 用户接口:X Window System(X11)、命令工具行、后台进程 重要组件: ①基于命令行CLI(Command Line Interface,命令行接口)的一套协议操作工具、配置文件工具、信息收集工具等。通过它们完成一些关于SNMP的管理工作; ②基于Tk/perl的图形化MIB浏览工具 ; ③可扩展的后台进程(代理)snmpd,用于响应请求事件。除了支持大量的内嵌MIB外,还可以通过动态加载模块、外部脚本和命令等进行扩展; ④接收SNMP通告消息的后台进程snmptrapd。能将接收到的通告消息以syslog日志展现,并存储为普通的纯文本格式。 ⑤C和Perl的API库,可以依赖它们编写自己的SNMP应用程序。 ⑥大量的标准MIB等。 命令工具集 net-snmp提供了一整套的工具集(应用程序),用于开发调试、管理和协议实现,主要有下面几种: 守护进程: snmpd net-snmp 开发的主代理程序,包括众多标准 MIB 的实现,还可以使用子代理进行扩展,是一个功能强大的SNMP代理。运行snmpd后

Network discovery using broadcast snmp requests

半城伤御伤魂 提交于 2019-12-25 07:04:42
问题 I want to discover the printers in my sub-net. Can I do that using net-snmp as mentioned in this following link- https://sourceforge.net/p/net-snmp/bugs/2336/ But it doesn't seem to work? Should I enable any flag for broadcast in snmp_api to do that. Also how will I go about handling the responses? Could you explain me in context of this simple application- http://www.net-snmp.org/wiki/index.php/TUT:Simple_Application I'm new to SNMP. Any help is much appreciated. PS: I use net-snmp 5.7.2.1

Net-SNMP: how to specify octet string in Hex bytes in SET command?

天大地大妈咪最大 提交于 2019-12-24 16:25:21
问题 I use net-snmp-5.5-1.x86.exe for Win32 I need set IP addreess to hex format, separated by whitespace using NET-SNMP set command. For example, an IP address 192.168.100.100 converted to Hex format is 0xC0A86464 192.168.100.100 > 0xC0A86464 The correctly set value should return the following value when check with snmpget: xxx-xxx-xxx-MIB::docsDevServerAddress.0 = Hex-STRING: C0 A8 64 64 I tried snmpset -v 1 -c private 192.168.100.5 docsDevServerAddress.0 x 0xC0 A8 64 64 But when I using this

SNMP MIB Table complex data object

不羁岁月 提交于 2019-12-24 12:37:11
问题 Can a table entry include a complex data object? For example can a table entry look like this? ExampleTableEntry ::= SEQUENCE { simpleDataObject1 INTEGER, complexDataObject2 ComplexType, SimpleDataObject3 TruthValue } ComplexType OBJECT-IDENTITY STATUS current DESCRIPTION " What ever " ::= { parent 1 } subObject1 OBJECT-TYPE SYNTAX DisplayString (SIZE (0..255)) MAX-ACCESS read-create STATUS current DESCRIPTION " Diameter peer's host name. Reference: RFC 3588 " ::= { ComplexType 1 } subObject2

How to set BITS data type in SNMPSET command?

ぃ、小莉子 提交于 2019-12-23 21:24:28
问题 the MIB OID object have data type 'Bits': object_OID Composed Type: Bits Base Type: BITS Access: read-write Kind: Scalar SMI Type: OBJECT-TYPE Value List: doc (0) emta (1) cpe (2) From MIB description, default is DEFVAL { '00'h }. I want set value 2 (cpe). I tried to set the value with command snmpset -v2c -c public 192.168.100.1 [object_OID] b 2 but got Error in packet. Reason: wrongValue (The set value is illegal or unsupported in some way) tried also snmpset -v2c -c public 192.168.100.1