Skip Menu |

This queue is for tickets about the Net-SNMP-Interfaces CPAN distribution.

Report information
The Basics
Id: 28114
Status: resolved
Priority: 0/
Queue: Net-SNMP-Interfaces

People
Owner: Nobody in particular
Requestors: Bruce.Tanner [...] Cerritos.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: No 64-bit counters
Date: Wed, 11 Jul 2007 15:01:33 -0700
To: "bug-Net-SNMP-Interfaces [...] rt.cpan.org" <bug-Net-SNMP-Interfaces [...] rt.cpan.org>
From: "Tanner, Bruce" <Bruce.Tanner [...] Cerritos.edu>
Problem: The ifHC* methods return null. Diagnosis: Net::SNMP::Interfaces creates a Net::SNMP session with the default version (snmpv1), which does not support 64-bit counters. Solution: Add a Version argument to Net::SNMP::Interfaces->new to pass to Net::SNMP->session. ... $self->{_hostname} = $args{Hostname} || 'localhost'; $self->{_community} = $args{Community} || 'public'; $self->{_port} = $args{Port} || 161; $self->{_version} = $args{Version} || 2; $self->{_raise} = $args{RaiseError} || 0; my ($session, $error) = Net::SNMP->session( -hostname => $self->{_hostname}, -community => $self->{_community}, -port => $self->{_port}, -version => $self->{_version} ); ... -Bruce -- Bruce Tanner (562) 860-2451 x 2164 Bruce.Tanner@Cerritos.edu Cerritos College Norwalk, CA
CC: Bruce.Tanner [...] Cerritos.edu
Subject: Re: [rt.cpan.org #28114] No 64-bit counters
Date: Fri, 13 Jul 2007 12:39:34 +0100
To: bug-Net-SNMP-Interfaces [...] rt.cpan.org
From: Jonathan Stowe <jns [...] gellyfish.com>
Hi, On Wed, 2007-07-11 at 18:02 -0400, Tanner, Bruce via RT wrote: Show quoted text
> Wed Jul 11 18:01:59 2007: Request 28114 was acted upon. > Transaction: Ticket created by Bruce.Tanner@Cerritos.edu > Queue: Net-SNMP-Interfaces > Subject: No 64-bit counters > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: Bruce.Tanner@Cerritos.edu > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28114 > > > > Problem: > The ifHC* methods return null. > > Diagnosis: > Net::SNMP::Interfaces creates a Net::SNMP session with the default version (snmpv1), > which does not support 64-bit counters. >
Thanks for this, having had a quick look at the code this should be trivial to implement (I originally thought that I would have to regenerate the OID to method mapping and appear to have lost the program I used to do that originally.) I've just got to restore my SVN repository as the machine it was on broke recently and should get round to making a fixed released in the next short while if work doesn't get in the way :-) Thanks again. /J\
On Wed Jul 11 18:01:59 2007, Bruce.Tanner@Cerritos.edu wrote: Show quoted text
> Problem: > The ifHC* methods return null. > > Diagnosis: > Net::SNMP::Interfaces creates a Net::SNMP session with the > default version (snmpv1), > which does not support 64-bit counters. > > Solution: > Add a Version argument to Net::SNMP::Interfaces->new to pass > to Net::SNMP->session. > > ... > $self->{_hostname} = $args{Hostname} || 'localhost'; > $self->{_community} = $args{Community} || 'public'; > $self->{_port} = $args{Port} || 161; > $self->{_version} = $args{Version} || 2; > > $self->{_raise} = $args{RaiseError} || 0; > > > my ($session, $error) = Net::SNMP->session( > -hostname => $self-
> >{_hostname},
> -community => $self-
> >{_community},
> -port => $self-
> >{_port},
> -version => $self-
> >{_version}
> ); > > ... > > > -Bruce > -- > Bruce Tanner (562) 860-2451 x 2164 Bruce.Tanner@Cerritos.edu > Cerritos College Norwalk, CA
I have added support for setting the version, but defaulted to v1 as I am not sure of what work should be done for v2 (or v3) support at this time. https://github.com/jonathanstowe/Net-SNMP-Interfaces/commit/624f6ef0406efa232d3d526a1b08f33ba3c0b63d