[Nut-upsuser] Arch Linux and Tripp Lite web snmp card issues.
Jason R Begley
jayray at digitalgoat.com
Tue Feb 25 04:48:47 UTC 2014
On 2/24/2014 11:10 PM, Charles Lepple wrote:
> On Feb 24, 2014, at 10:29 PM, Jason R Begley wrote:
>
>> Thanks for the quick response Charles! I may not have gotten the correct output from the snmpwalk, let me know if the attachment is usable. Thanks!
> Sorry, it's basically all comments. Do you have the stdout from the subdriver script? Also, how is the MIB file installed?
The MIBS are installed in my net-snmp mib directory, I don't know if I
need to do anything else. I'm not getting any usefull output from the
subdriver script I had to snmp walk to get the data in the files I
previously attached.
snmp_build: unknown failuresnmpget: Error building ASN.1 representation
(Can't build OID for variable)
COUNT = 0 / 0
Creating /usr/share/snmp/mibs/tripplite-mib.txt-mib.h
Creating /usr/share/snmp/mibs/tripplite-mib.txt-mib.c
Done.
Do not forget to:
* bump DRIVER_VERSION in snmp-ups.c (add "0.01")
* copy "/usr/share/snmp/mibs/tripplite-mib.txt-mib.h" and
"/usr/share/snmp/mibs/tripplite-mib.txt-mib.c" to "../../drivers"
* add #include "/usr/share/snmp/mibs/tripplite-mib.txt-mib.h" to snmp-ups.c
* add &/usr/share/snmp/mibs/tripplite-mib.txt to snmp-ups.c:mib2nut[] list,
* add /usr/share/snmp/mibs/tripplite-mib.txt-mib.c to snmp_ups_SOURCES
in drivers/Makefile.am
* add /usr/share/snmp/mibs/tripplite-mib.txt-mib.h to
dist_noinst_HEADERS in drivers/Makefile.am
* "./autogen.sh && ./configure && make" from the top level directory
>
>> New data added, here is the gdb output:
>> Reading symbols from /usr/bin/snmp-ups...(no debugging symbols found)...done.
> ^ Hmm, I thought we defaulted to CFLAGS=-g, but apparently it's CFLAGS=-O. Can you rebuild with "-g"?
How would I get CFLAGS passed to the build? I tried doing an export
CFLAGS=-g prior to make, but that didn't give me symbols on debug again.
>
>> (gdb) run -a tripplite -DD
>> Starting program: /usr/bin/snmp-ups -a tripplite -DD
> Actually, using "-DDD" might provide enough extra context (there is an upsdebugx(3, ...) right before one of the snmp_parse_oid() calls). But debugging symbols would be good, too.
>
> [...]
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/storage/pkgs/aur/network-ups-tools-git/src/networkupstools_git/drivers/snmp-ups...(no
debugging symbols found)...done.
(gdb) run -a tripplite -DDD
Starting program:
/storage/pkgs/aur/network-ups-tools-git/src/networkupstools_git/drivers/snmp-ups
-a tripplite -DDD
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Network UPS Tools - Generic SNMP UPS driver 0.71 (2.7.1-signed-54-g348cd84)
0.000000 debug level is '3'
0.002205 SNMP UPS driver : entering upsdrv_initups()
0.002374 SNMP UPS driver : entering nut_snmp_init(snmp-ups)
0.025728 SNMP UPS driver : entering load_mib2nut(auto)
0.025765 trying the new match_sysoid() method
0.025785 Entering nut_snmp_get_str()
0.025804 nut_snmp_get(.1.3.6.1.2.1.1.2.0)
0.025823 nut_snmp_walk(.1.3.6.1.2.1.1.2.0)
0.028762 match_sysoid: device sysOID value = .1.3.6.1.4.1.850.1
0.028793 match_sysoid: checking MIB apcc
0.028816 match_sysoid: checking MIB mge
0.028840 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.705.1
0.028862 match_sysoid: checking MIB netvision
0.028886 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.4555.1.1.1
0.028907 match_sysoid: checking MIB pw
0.028930 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.534.1
0.028951 match_sysoid: checking MIB aphel_genesisII
0.028972 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.17373
0.028991 match_sysoid: checking MIB aphel_revelation
0.029013 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.534.6.6.6
0.029032 match_sysoid: checking MIB eaton_epdu
0.029054 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.534.6.6.7
0.029074 match_sysoid: checking MIB pulizzi_switched1
0.029096 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.20677.1
0.029118 match_sysoid: checking MIB pulizzi_switched2
0.029140 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.20677.2
0.029159 match_sysoid: checking MIB raritan
0.029181 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.13742
0.029203 match_sysoid: checking MIB baytech
0.029223 match_sysoid: checking MIB cpqpower
0.029244 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.232.165.3
0.029263 match_sysoid: checking MIB bestpower
0.029284 match_sysoid: checking MIB cyberpower
0.029305 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.3808
0.029325 match_sysoid: checking MIB delta_ups
0.029347 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.2254.2.4
0.029367 match_sysoid: checking MIB xppc
0.029389 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.4.1.935
0.029408 match_sysoid: checking MIB ietf
0.029430 match_sysoid: comparing .1.3.6.1.4.1.850.1 with
.1.3.6.1.2.1.33
0.029450 No matching MIB found for sysOID '.1.3.6.1.4.1.850.1'!
Please report it to NUT developers, with an 'upsc' output for your device.
Going back to the classic MIB detection method.
0.029484 load_mib2nut: trying classic method with 'apcc' mib
0.029504 Entering nut_snmp_get_str()
0.029523 nut_snmp_get(.1.3.6.1.4.1.318.1.1.1.1.1.1.0)
0.029542 nut_snmp_walk(.1.3.6.1.4.1.318.1.1.1.1.1.1.0)
0.033051 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.318.1.1.1.1.1.1.0
0.033077 load_mib2nut: trying classic method with 'mge' mib
0.033084 Entering nut_snmp_get_str()
0.033089 nut_snmp_get(.1.3.6.1.4.1.705.1.1.1.0)
0.033094 nut_snmp_walk(.1.3.6.1.4.1.705.1.1.1.0)
0.035979 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.705.1.1.1.0
0.035995 load_mib2nut: trying classic method with 'netvision' mib
0.036002 Entering nut_snmp_get_str()
0.036007 nut_snmp_get(.1.3.6.1.4.1.4555.1.1.1.1.1.1.0)
0.036012 nut_snmp_walk(.1.3.6.1.4.1.4555.1.1.1.1.1.1.0)
0.038927 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.4555.1.1.1.1.1.1.0
0.038939 load_mib2nut: trying classic method with 'pw' mib
0.038944 Entering nut_snmp_get_str()
0.038949 nut_snmp_get(1.3.6.1.4.1.534.1.1.2.0)
0.038954 nut_snmp_walk(1.3.6.1.4.1.534.1.1.2.0)
0.042561 [tripplite] unhandled ASN 0x80 received from
1.3.6.1.4.1.534.1.1.2.0
0.042573 load_mib2nut: trying classic method with
'aphel_genesisII' mib
0.042578 Entering nut_snmp_get_str()
0.042583 nut_snmp_get(.1.3.6.1.4.1.17373.3.1.1.0)
0.042588 nut_snmp_walk(.1.3.6.1.4.1.17373.3.1.1.0)
0.045506 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.17373.3.1.1.0
0.045518 load_mib2nut: trying classic method with
'aphel_revelation' mib
0.045524 Entering nut_snmp_get_str()
0.045528 nut_snmp_get(.1.3.6.1.4.1.534.6.6.6.1.1.12.0)
0.045533 nut_snmp_walk(.1.3.6.1.4.1.534.6.6.6.1.1.12.0)
0.048459 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.534.6.6.6.1.1.12.0
0.048474 load_mib2nut: trying classic method with 'eaton_epdu' mib
0.048480 Entering nut_snmp_get_str()
0.048485 nut_snmp_get(.1.3.6.1.4.1.534.6.6.7.1.2.1.2.0)
0.048490 nut_snmp_walk(.1.3.6.1.4.1.534.6.6.7.1.2.1.2.0)
0.051856 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.534.6.6.7.1.2.1.2.0
0.051895 load_mib2nut: trying classic method with
'pulizzi_switched1' mib
0.051921 Entering nut_snmp_get_str()
0.051946 nut_snmp_get(.1.3.6.1.4.1.20677.1)
0.051972 nut_snmp_walk(.1.3.6.1.4.1.20677.1)
0.054861 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.20677.1
0.054876 load_mib2nut: trying classic method with
'pulizzi_switched2' mib
0.054895 Entering nut_snmp_get_str()
0.054900 nut_snmp_get(.1.3.6.1.4.1.20677.1)
0.054905 nut_snmp_walk(.1.3.6.1.4.1.20677.1)
0.057836 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.20677.1
0.057858 load_mib2nut: trying classic method with 'raritan' mib
0.057864 Entering nut_snmp_get_str()
0.057869 nut_snmp_get(.1.3.6.1.4.1.13742.1.1.12.0)
0.057874 nut_snmp_walk(.1.3.6.1.4.1.13742.1.1.12.0)
0.060771 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.13742.1.1.12.0
0.060785 load_mib2nut: trying classic method with 'baytech' mib
0.060791 Entering nut_snmp_get_str()
0.060796 nut_snmp_get(.1.3.6.1.4.1.4779.1.3.5.2.1.24.1)
0.060801 nut_snmp_walk(.1.3.6.1.4.1.4779.1.3.5.2.1.24.1)
0.063998 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.4779.1.3.5.2.1.24.1
0.064011 load_mib2nut: trying classic method with 'cpqpower' mib
0.064016 Entering nut_snmp_get_str()
0.064021 nut_snmp_get(.1.3.6.1.4.1.232.165.3.1.1.0)
0.064026 nut_snmp_walk(.1.3.6.1.4.1.232.165.3.1.1.0)
0.066957 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.232.165.3.1.1.0
0.066997 load_mib2nut: trying classic method with 'bestpower' mib
0.067023 Entering nut_snmp_get_str()
0.067045 nut_snmp_get(.1.3.6.1.4.1.2947.1.1.2.0)
0.067067 nut_snmp_walk(.1.3.6.1.4.1.2947.1.1.2.0)
0.069942 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.2947.1.1.2.0
0.069976 load_mib2nut: trying classic method with 'cyberpower' mib
0.069997 Entering nut_snmp_get_str()
0.070016 nut_snmp_get(.1.3.6.1.4.1.3808.1.1.1.1.1.1.0)
0.070037 nut_snmp_walk(.1.3.6.1.4.1.3808.1.1.1.1.1.1.0)
0.073799 [tripplite] unhandled ASN 0x80 received from
.1.3.6.1.4.1.3808.1.1.1.1.1.1.0
0.073855 load_mib2nut: trying classic method with 'delta_ups' mib
0.073878 Entering nut_snmp_get_str()
0.073899 nut_snmp_get((null))
0.073918 nut_snmp_walk((null))
Program received signal SIGSEGV, Segmentation fault.
0xb7da9470 in __strchr_sse2_bsf () from /usr/lib/libc.so.6
(gdb) bt
#0 0xb7da9470 in __strchr_sse2_bsf () from /usr/lib/libc.so.6
#1 0xb7f05758 in snmp_parse_oid () from /usr/lib/libnetsnmp.so.30
#2 0x0804afd8 in nut_snmp_walk ()
#3 0x0804b261 in nut_snmp_get ()
#4 0x0804bab6 in nut_snmp_get_str ()
#5 0x0804be7b in load_mib2nut ()
#6 0x0804bfd2 in upsdrv_initups ()
#7 0x08049fb4 in main ()
(gdb)
>> Program received signal SIGSEGV, Segmentation fault.
>> 0xb7da9470 in __strchr_sse2_bsf () from /usr/lib/libc.so.6
>> (gdb) bt
>> #0 0xb7da9470 in __strchr_sse2_bsf () from /usr/lib/libc.so.6
>> #1 0xb7f05758 in snmp_parse_oid () from /usr/lib/libnetsnmp.so.30
>> #2 0x0804afd8 in ?? ()
> Almost there - we just need to know what called snmp_parse_oid(), and why the arguments were bad.
>
More information about the Nut-upsuser
mailing list