net-snmp was ist los mit der OID?
352
aCoder
Ich habe eine beantragt PEN(Private Enterprise Number)
und habe es bekommen. Der PEN ist 50743 . Ich habe eine sehr einfache, MIB
die so aussieht:
SAMPLE-SNMP-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Integer32, enterprises FROM SNMPv2-SMI ; sampleSnmp MODULE-IDENTITY LAST-UPDATED "201709120200Z" ORGANIZATION "Company Name" CONTACT-INFO "myMail@comName.com" DESCRIPTION "A test MIB" REVISION "201709220200Z" DESCRIPTION "initial Draft" ::= { enterprises 50743 } sampleSnmpScalar OBJECT IDENTIFIER ::= { sampleSnmp 1 } sampleVar OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-write STATUS current DESCRIPTION "A simple test object" ::= { sampleSnmpScalar 1} END
Nach der Kompilierung (sampleVar.c sampleVar.h) und der Konfiguration bekomme ich Folgendes snmpwalk
:
root@ashish:~# snmpwalk -v 2c -c ncs 192.168.5.13 SAMPLE-SNMP-MIB::sampleSnmp SAMPLE-SNMP-MIB::sampleSnmpScalar.0 = INTEGER: 1 SAMPLE-SNMP-MIB::sampleSnmp.2.1.2.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = STRING: "/bin/echo" SAMPLE-SNMP-MIB::sampleSnmp.2.1.3.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = "" SAMPLE-SNMP-MIB::sampleSnmp.2.1.4.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = "" SAMPLE-SNMP-MIB::sampleSnmp.2.1.5.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = INTEGER: 5 SAMPLE-SNMP-MIB::sampleSnmp.2.1.6.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = INTEGER: 1 SAMPLE-SNMP-MIB::sampleSnmp.2.1.7.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = INTEGER: 1 SAMPLE-SNMP-MIB::sampleSnmp.2.1.20.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = INTEGER: 4 SAMPLE-SNMP-MIB::sampleSnmp.2.1.21.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = INTEGER: 1 SAMPLE-SNMP-MIB::sampleSnmp.3.1.1.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = "" SAMPLE-SNMP-MIB::sampleSnmp.3.1.2.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = "" SAMPLE-SNMP-MIB::sampleSnmp.3.1.3.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = INTEGER: 1 SAMPLE-SNMP-MIB::sampleSnmp.3.1.4.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51 = INTEGER: 0 SAMPLE-SNMP-MIB::sampleSnmp.4.1.2.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51.1 = ""
Was ist los mit der OID? Ich meine, um zu verwenden snmpget
, muss ich abfragen wie:
snmpget ... sampleSnmp.2.1.5.18.46.49.46.51.46.54.46.49.46.52.46.49.46.53.48.55.52.51
UPDATE: snmptranslate
funktioniert einwandfrei:
root@ashish:~# snmptranslate -IR -On SAMPLE-SNMP-MIB::sampleSnmp SAMPLE-SNMP-MIB::sampleSnmpScalar SAMPLE-SNMP-MIB::sampleVar .1.3.6.1.4.1.50743 .1.3.6.1.4.1.50743.1 .1.3.6.1.4.1.50743.1.1
Anregungen dazu? Jede Hilfe wäre sehr dankbar. Danke dir
0 Antworten auf die Frage
Verwandte Probleme
-
4
Gutes freies Ubuntu Server-VMWare-Image benötigt
-
8
Laptop Standby unter Linux / Ubuntu
-
1
Wie kann ich von Ubuntu aus über das Netzwerk auf Windows Vista-Drucker zugreifen?
-
3
Kann ich Microsoft Office 2007 unter Ubuntu ausführen?
-
6
Virtualbox, VMware, KVM oder andere für Ubuntu-Virtualisierung?
-
4
Windows 7 "Aero Snap" -Funktion für Ubuntu GNOME
-
5
iPod-Verwaltungssoftware für Linux
-
1
Rückkehr von Dual-Boot zu Windows
-
2
Firefox zum Drucken von PDF-Schriftarten
-
5
Wie bekomme ich die maximale Auflösung unter Ubuntu in Microsoft Virtual PC?