<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Mike Mitchell wrote:
<blockquote
cite="mid:F17752FC8F21B8428FF70A2DA2B2E246081B14F9A2@MERCMBX11.na.sas.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">As
the author of SNMP_util.pm I strongly disagree that the problem
lies with the SNMP_util module.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">The
SNMP_util.pm module does not do any SNMP queries on its own,
rather it calls Simon Leinen’s SNMP_Session module to do all socket
I/O.
In private email I suggested Brandon Miller use 16-bit SNMP request IDs
(--use-16bit
on cfgmaker) and to enable ‘avoid_negative_request_ids’, but he did
not respond.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">Mike
Mitchell<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><o:p> </o:p></span></p>
<div>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">From:</span></b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:mrtg-bounces@lists.oetiker.ch">mrtg-bounces@lists.oetiker.ch</a>
[<a class="moz-txt-link-freetext" href="mailto:mrtg-bounces@lists.oetiker.ch">mailto:mrtg-bounces@lists.oetiker.ch</a>] <b>On Behalf Of </b>Brandon
Miller<br>
<b>Sent:</b> Friday, January 22, 2010 10:32 AM<br>
<b>To:</b> Steve Shipway<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:mrtg@lists.oetiker.ch">mrtg@lists.oetiker.ch</a><br>
<b>Subject:</b> Re: [mrtg] SNMPWALK Problem for 1.3.6.1.2.1.1 on
cross-compiled
mrtg (openwrt mipsbe)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Steve Shipway wrote: <o:p></o:p></p>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
<pre>I'm attempting to cross-compile mrtg for openwrt on a mipsbe processor.<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
</blockquote>
<pre>...<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
<pre>SNMPv1_Session (remote host: "10.255.255.253" [10.255.255.253].161)<o:p></o:p></pre>
<pre>community: "public"<o:p></o:p></pre>
<pre>request ID: -552632565<o:p></o:p></pre>
<pre>PDU bufsize: 8000 bytes<o:p></o:p></pre>
<pre>timeout: 2s<o:p></o:p></pre>
<pre>retries: 5<o:p></o:p></pre>
<pre>backoff: 1)<o:p></o:p></pre>
<pre>at /usr/share/mrtg/bin/../lib/mrtg2/SNMP_util.pm line 631<o:p></o:p></pre>
<pre>SNMPWALK Problem for 1.3.6.1.2.1.1 on <a moz-do-not-send="true"
href="mailto:public@10.255.255.253:::::1:v4only">public@10.255.255.253:::::1:v4only</a><o:p></o:p></pre>
<pre>at ./cfgmaker line 950<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
</blockquote>
<pre>...<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
<pre>root@OpenWrt:/usr/share/mrtg/lib/mrtg2# snmpwalk -c public -v 1<o:p></o:p></pre>
<pre>10.255.255.253 1.3.6.1.2.1.1<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
</blockquote>
<pre>...<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
<pre>iso.3.6.1.2.1.1.1.0 = STRING: "router"<o:p></o:p></pre>
<pre>iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.14988.1<o:p></o:p></pre>
<pre>iso.3.6.1.2.1.1.3.0 = Timeticks: (46821500) 5 days, 10:03:35.00<o:p></o:p></pre>
<pre>iso.3.6.1.2.1.1.4.0 = STRING: "test-box"<o:p></o:p></pre>
<pre>iso.3.6.1.2.1.1.5.0 = STRING: "wrtName"<o:p></o:p></pre>
<pre>iso.3.6.1.2.1.1.6.0 = STRING: "here"<o:p></o:p></pre>
<pre>iso.3.6.1.2.1.1.7.0 = INTEGER: 78<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
</blockquote>
<pre><o:p> </o:p></pre>
<pre>Sounds as if the problem lies in the SNMP_util module, which is part of the MRTG installation. I have no familiarity with your OS but it may be that this module is making some assumptions about SNMP - maybe there are permissions issues on who can listen the UDP responses, for example.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Since snmpwalk works we know the issue is not the agent, but snmpwalk uses different code to SNMP_util.pm.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I'd suggest you direct your investigations to this module, maybe make a small Perl script to use it to make a single SNMP lookup and see if that works?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Steve<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> <o:p></o:p></pre>
<p class="MsoNormal" style="margin-bottom: 12pt;">Thanks for the
responses.
I took the easy way out and decided to use a different monitoring
tool.
Found that rrd was a pre-compiled package for my openwrt install. Gave
that a try and got it working.<br>
<br>
Unfortunately, this project is short-fused and I don't have much time
to
troubleshoot the mrtg install...even though I got this far :) I agree,
the problem was probably in SNMP_util.pm. I didn't get too far in
examining that or the packet dumps that I captured. I'm also wondering
if
running the perl code on a big endian machine vs a little endian
machine made a
difference?<br>
<br>
Thanks again<br>
Brandon<br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
</blockquote>
I stand corrected. I was debugging late at night. Looking over the
debugging that I managed to do, it seemed to be stuck in
SNMP_Session.pm and not in SNMP_util.pm. Also, while I was just in
there looking at it, I tried cfgmaker again with the fix Mike
suggested. I changed avoid_negative_request_ids as suggested, but
didn't seem to help. Thanks for the suggestion though. I have a
feeling that SNMP_Session or something that it uses is doing something
weird with integers that is different on a big-endian machine....<br>
<br>
Brandon<br>
<br>
</body>
</html>