RE: Strange ucd-snmp actions
Thanks, Kenneth !!!
The patch you supplied, have realy helped !!!
From: Kenneth Johansson [mailto:firstname.lastname@example.org]
Sent: Sat, January 31, 2004 22:29
To: Igal Baevsky
Cc: email@example.com; firstname.lastname@example.org
Subject: Re: Strange ucd-snmp actions
Turns out that compiling for 64 bit was more trouble than changing the
--- net-snmp-5.0.9.org/agent/mibgroup/mibII/interfaces.c 2004-01-31
+++ net-snmp-5.0.9/agent/mibgroup/mibII/interfaces.c 2004-01-31
@@ -1492,12 +1492,12 @@
struct ifreq ifrq;
struct ifnet **ifnetaddr_ptr;
- unsigned long rec_pkt, rec_oct, rec_err, rec_drop;
- unsigned long snd_pkt, snd_oct, snd_err, snd_drop, coll;
+ unsigned long long rec_pkt, rec_oct, rec_err, rec_drop;
+ unsigned long long snd_pkt, snd_oct, snd_err, snd_drop, coll;
int i, fd;
const char *scan_line_2_2 =
- "%lu %lu %lu %lu %*lu %*lu %*lu %*lu %lu %lu %lu %lu %*lu %lu";
+ "%llu %llu %llu %llu %*llu %*llu %*llu %*llu %llu %llu %llu %llu
const char *scan_line_2_0 =
"%lu %lu %*lu %*lu %*lu %lu %lu %*lu %*lu %lu";
const char *scan_line_to_use;
On Thu, 2004-01-29 at 02:02, Kenneth Johansson wrote:
> On Jan 5, 2004, at 10:22, Igal Baevsky wrote:
> > To all the people wondering about MRTG funkiness - it's not an MRTG
> > problem !
> > I'm using Ultra 10 with Debian installed as a router.
> > I've found out that the MIB counter on eth0 stops growing when getting
> > to the specific value (IF-MIB::ifInOctets.2 = Counter32: 4294967295).
> > Thats why you keep seeing zeros on your graphs - no delta between the
> > previous value and the current. I'm seeking for a solution for this
> > problem.
> > Igal.
> The reason for this is that smnpd uses scanf to pars /proc/net/dev but
> the values in that file is 64bit for a 64bit kernel and we get problems
> with 32bit binaries.
> I'm currently trying to recompile snmpd into a 64 bit binary but I need
> to recompile all the libraries that it uses to 64 bit versions also and
> openssl was not happy.
> Also to make things even funnier the snmp value is actually a 32 bit
> counter and I'm not sure what will happen exactly even if I get it to
> compile into 64 bit.
> One other solution would be to change scanf to behave better when feed
> to large values.
> I have seen this problem in other applications that read /proc/net/dev
> like procmeter.
> > Philippe Sainte-Marie wrote:
> >> Hi.
> >> I'm using testing on a Ultra5 which is now my gateway at home.
> >> I'm trying to graph my output/input bw with mrtg but i have like
> >> a bug with mrtg.
> >> It does work fine, until a day where it simply stuck and doesn't
> >> graph
> >> anything in input or anything in output.
> >> I've tried all kind of settings without success.
> >> On my provider side, i'm using DHCP to connect to the internet.
> >> Would that have any influence over the snmp request for data
> >> input/output ?
> >> Any help would be great!
> > --
> > To UNSUBSCRIBE, email to email@example.com
> > with a subject of "unsubscribe". Trouble? Contact
> > firstname.lastname@example.org
NOTICE: This communication contains information which may be proprietary,
privileged or confidential. If you are not the intended recipient (or
authorized to receive for the intended recipient), or believe that you have
received this communication in error, please do not print, copy, retransmit,
disseminate, disclose or otherwise use the information. Also, please
indicate to the sender that you have received this communication in error
and delete the copy you received. Thank you.