Hi ONL’s,
I’m running snmpwalk to watch all available onlp OID’s numbers and getting the below list:
ro...@10.7.191.120:/tmp# snmpwalk -v1 -c public 10.7.191.120 .1.3.6.1.4.1.42623
iso.3.6.1.4.1.42623.1.1.1.1.1.0 = STRING: "IDG4400"
iso.3.6.1.4.1.42623.1.1.1.1.2.0 = STRING: "MIDG4400-CS2REW"
iso.3.6.1.4.1.42623.1.1.1.1.3.0 = STRING: "MT0000X00000"
iso.3.6.1.4.1.42623.1.1.1.1.4.0 = STRING: "24:ba:07:a3:a4:14"
iso.3.6.1.4.1.42623.1.1.1.1.5 = INTEGER: 64
iso.3.6.1.4.1.42623.1.1.1.1.6.0 = STRING: "Mellanox"
iso.3.6.1.4.1.42623.1.1.1.1.7.0 = STRING: "04/02/2017 13:36:43"
iso.3.6.1.4.1.42623.1.1.1.1.9.0 = STRING: "x86_64-mlnx_idg4400-r0"
iso.3.6.1.4.1.42623.1.1.1.1.10 = INTEGER: 0
iso.3.6.1.4.1.42623.1.1.1.1.15.0 = STRING: "2016.11-5.1.0008-115200"
…
iso.3.6.1.4.1.42623.1.2.1.1.3.1 = INTEGER: 1
iso.3.6.1.4.1.42623.1.2.1.1.3.2 = INTEGER: 1
iso.3.6.1.4.1.42623.1.2.1.1.3.3 = INTEGER: 1
…
iso.3.6.1.4.1.42623.1.3.1.1 = Gauge32: 104
iso.3.6.1.4.1.42623.1.3.1.2 = Gauge32: 9896
For some reason OID’s .3.6.1.4.1.42623.1.1.1.1.5 and 3.6.1.4.1.42623.1.1.1.1.10 (OCP-ONL-PLATFORM-MIB) are INTEGER typed and are not suffixed with zero as STRING typed OID’s.
I’m using MIB browser as snmp manager and loading the mib files from OpenNetworkLinux-master\docs\mibs. The above OID’s are displayed with .0 suffix:
.3.6.1.4.1.42623.1.1.1.1.5.0
3.6.1.4.1.42623.1.1.1.1.10.0
When trying to perform GET request I’m getting an error of ‘no such name’ (which is expected since snmpwalk shows these OID’s without the suffix of .0).
Same issue with OID’s .3.6.1.4.1.42623.1.3.1.1 and .3.6.1.4.1.42623.1.3.1.2 (OCP-ONL-RESOURCE-MIB) which are not displayed with .0 suffix on snmpwalk and are displayed with .0 suffix on MIB browser.
In addition OID’s 3.6.1.4.1.42623.1.1.1.1.11 – 14 are not implemented and also raises ‘no such name error’ when trying to query these values.
Did you encounter such issue?
Is it a bug on onlp-snmp/net-snmp code/MIB files?
Please assist and advise.
Thanks in advance!
Hadas
Additional comments inline.Open Network Linux OS ONL-2.0.0, 2017-07-07.16:46-8a49914localhost login: rootPassword:Last login: Thu Aug 30 22:45:00 UTC 2001 on ttyS1Linux localhost 3.16.39-OpenNetworkLinux #1 SMP Fri Jul 7 16:53:08 UTC 2017 x86_64root@localhost:~# onl-snmpwalkOCP-ONL-PLATFORM-MIB::ProductName.0 = STRING: 5712-54X-O-AC-FOCP-ONL-PLATFORM-MIB::PartNumber.0 = STRING: FP1ZZ5654001AOCP-ONL-PLATFORM-MIB::SerialNumber.0 = STRING: SN-MAC-70:72:CF:DF:EE:6COCP-ONL-PLATFORM-MIB::MAC.0 = STRING: 70:72:cf:df:ee:6cOCP-ONL-PLATFORM-MIB::MACRange = INTEGER: 74OCP-ONL-PLATFORM-MIB::Manufacturer.0 = STRING: AcctonOCP-ONL-PLATFORM-MIB::Vendor.0 = STRING: EdgecoreOCP-ONL-PLATFORM-MIB::PlatformName.0 = STRING: x86_64-accton_as5712_54x-r0OCP-ONL-PLATFORM-MIB::DeviceVersion = INTEGER: 0OCP-ONL-PLATFORM-MIB::LabelRevision.0 = STRING: R01HOCP-ONL-PLATFORM-MIB::CountryCode.0 = STRING: TWOCP-ONL-PLATFORM-MIB::DiagVersion.0 = STRING: 2.0.1.0OCP-ONL-PLATFORM-MIB::OnieVersion.0 = STRING: 2014.08.00.05OCP-ONL-SENSOR-MIB::onlTempSensorsIndex.1 = INTEGER: 1OCP-ONL-SENSOR-MIB::onlTempSensorsIndex.2 = INTEGER: 2OCP-ONL-SENSOR-MIB::onlTempSensorsIndex.3 = INTEGER: 3...
Hi ONL’s,
I’m running snmpwalk to watch all available onlp OID’s numbers and getting the below list:
ro...@10.7.191.120:/tmp# snmpwalk -v1 -c public 10.7.191.120 .1.3.6.1.4.1.42623
iso.3.6.1.4.1.42623.1.1.1.1.1.0 = STRING: "IDG4400"
iso.3.6.1.4.1.42623.1.1.1.1.2.0 = STRING: "MIDG4400-CS2REW"
iso.3.6.1.4.1.42623.1.1.1.1.3.0 = STRING: "MT0000X00000"
iso.3.6.1.4.1.42623.1.1.1.1.4.0 = STRING: "24:ba:07:a3:a4:14"
iso.3.6.1.4.1.42623.1.1.1.1.5 = INTEGER: 64
iso.3.6.1.4.1.42623.1.1.1.1.6.0 = STRING: "Mellanox"
iso.3.6.1.4.1.42623.1.1.1.1.7.0 = STRING: "04/02/2017 13:36:43"
iso.3.6.1.4.1.42623.1.1.1.1.9.0 = STRING: "x86_64-mlnx_idg4400-r0"
iso.3.6.1.4.1.42623.1.1.1.1.10 = INTEGER: 0
iso.3.6.1.4.1.42623.1.1.1.1.15.0 = STRING: "2016.11-5.1.0008-115200"
…
iso.3.6.1.4.1.42623.1.2.1.1.3.1 = INTEGER: 1
iso.3.6.1.4.1.42623.1.2.1.1.3.2 = INTEGER: 1
iso.3.6.1.4.1.42623.1.2.1.1.3.3 = INTEGER: 1
…
iso.3.6.1.4.1.42623.1.3.1.1 = Gauge32: 104
iso.3.6.1.4.1.42623.1.3.1.2 = Gauge32: 9896
For some reason OID’s .3.6.1.4.1.42623.1.1.1.1.5 and 3.6.1.4.1.42623.1.1.1.1.10 (OCP-ONL-PLATFORM-MIB) are INTEGER typed and are not suffixed with zero as STRING typed OID’s.
I’m using MIB browser as snmp manager and loading the mib files from OpenNetworkLinux-master\docs\mibs. The above OID’s are displayed with .0 suffix:
.3.6.1.4.1.42623.1.1.1.1.5.0
3.6.1.4.1.42623.1.1.1.1.10.0
When trying to perform GET request I’m getting an error of ‘no such name’ (which is expected since snmpwalk shows these OID’s without the suffix of .0).
Same issue with OID’s .3.6.1.4.1.42623.1.3.1.1 and .3.6.1.4.1.42623.1.3.1.2 (OCP-ONL-RESOURCE-MIB) which are not displayed with .0 suffix on snmpwalk and are displayed with .0 suffix on MIB browser.
In addition OID’s 3.6.1.4.1.42623.1.1.1.1.11 – 14 are not implemented and also raises ‘no such name error’ when trying to query these values.
Did you encounter such issue?
Is it a bug on onlp-snmp/net-snmp code/MIB files?
Please assist and advise.
Thanks in advance!
Hadas
--
You received this message because you are subscribed to the Google Groups "opennetworklinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Jeff,
First, thanks for the quick and detailed answer!
Regarding to OID’s .1.5 and .1.10 (MacRange, DeviceVersion) , I didn’t ask why they are INTEGER typed and not STRING, just why OID’s does not have the suffix of .0 as STRING types have.
Same question regarding OID’s .3.6.1.4.1.42623.1.3.1.1 and .3.6.1.4.1.42623.1.3.1.2 (CpuAllPercentUtilization, CpuAllPercentIdle).
iso.3.6.1.4.1.42623.1.1.1.1.2.0 = STRING: "MIDG4400-CS2REW"
iso.3.6.1.4.1.42623.1.1.1.1.3.0 = STRING: "MT0000X00000"
iso.3.6.1.4.1.42623.1.1.1.1.4.0 = STRING: "24:ba:07:a3:a4:14"
iso.3.6.1.4.1.42623.1.1.1.1.5 = INTEGER: 64
these OID’s are represented in MIB file same as STRING types, and each standard MIB browser/SNMP manager extract their OID’s with the suffix of .0, what causes to ‘no such name error’ although it exists (with OID number without .0 suffix).
Regarding to LabelRevision, Country Code, Diag Version, and Service Tag fields, they are indeed not represented in EEPROM but as I can understand from code, this part of implementation is not a platform specific($ONL/packages/base/any/onlp-snmpd/builds/src/onlp_snmp/module/src/onlp_snmp_platform.c : onlp_snmp_platform_init) and should have some defaults to case it’s not represented. Isn’t it?
Note that when adding this to eeprom file, their values are been retrieved successfully.
Thanks,
Hadas
--
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklin...@googlegroups.com.
--
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.
Hi Jeff,
First, thanks for the reply!
I have added a fix to onlp-snmpd agent in our origin branch and tested it with MIB browser and snmpwalk.
Please review the fix below so we can push it to general origin OpenNetworkLinux in the future:
--- a/packages/base/any/onlp-snmpd/builds/src/onlp_snmp/module/src/onlp_snmp_platform.c
+++ b/packages/base/any/onlp-snmpd/builds/src/onlp_snmp/module/src/onlp_snmp_platform.c
@@ -66,10 +66,11 @@ platform_int_register(int index, char* desc, int value)
int* v = aim_zmalloc(sizeof(value));
*v = value;
- netsnmp_register_int_instance(desc,
- tree,
- OID_LENGTH(tree),
- v, NULL);
+ netsnmp_register_watched_scalar2(
+ netsnmp_create_handler_registration(
+ desc, NULL, tree, OID_LENGTH(tree), HANDLER_CAN_RWRITE),
+ netsnmp_create_watcher_info(
+ (void *)v, sizeof(int), ASN_INTEGER, WATCHER_FIXED_SIZE));
}
static void
@@ -83,9 +84,9 @@ resource_int_register(int index, const char* desc,
netsnmp_create_handler_registration(desc, handler,
tree, OID_LENGTH(tree),
HANDLER_CAN_RONLY);
- if (netsnmp_register_instance(reg) != MIB_REGISTERED_OK) {
- AIM_LOG_ERROR("registering handler for %s failed", desc);
- }
+ if (netsnmp_register_scalar(reg) != MIB_REGISTERED_OK) {
+ AIM_LOG_ERROR("registering handler for %s failed", desc);
+ }
}
Thanks,
Hadas
From: Jeffrey Townsend [mailto:jeffrey....@bigswitch.com]
Sent: Thursday, July 13, 2017 11:04 PM
To: Hadas Ester Dalal <had...@mellanox.com>
Cc: opennetworklinux <opennetw...@googlegroups.com>
Subject: Re: SNMP missing OID's and OID's wrong value
Hadas,
My apologies, I understand. You are correct -- after looking at the code it looks like those 4 scalars (MacRange, DeviceVersion, Cpu*Percent*) are getting registered as integer instances instead of integer scalars with the consequence that the single-instance subidentifier (.0) is missing.
--
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklin...@googlegroups.com.
Hi Jeff,
First, thanks for the reply!
Cc: opennetworklinux <opennetworklinux@googlegroups.com>
--
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.