Skip Menu |

This queue is for tickets about the SNMP-Extension-PassPersist CPAN distribution.

Report information
The Basics
Id: 82362
Status: open
Priority: 0/
Queue: SNMP-Extension-PassPersist

People
Owner: Nobody in particular
Requestors: pete.bristow [...] z11.net
Cc:
AdminCc:

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



Subject: Supporting counter64
Date: Wed, 2 Jan 2013 11:00:14 +0000
To: bug-SNMP-Extension-PassPersist [...] rt.cpan.org
From: Pete Bristow <pete.bristow [...] z11.net>
Hi, Newer versions of Net-SNMP support reporting 64bit counters via the pass/pass_persist mechanism. As of 0.06 this isn't a supported type. Supporting said counters should be as easy as --- PassPersist.pm 2013-01-02 10:55:04.249101714 +0000 +++ PassPersist.pm.new 2013-01-02 10:54:54.633190278 +0000 @@ -60,6 +60,7 @@ # global variables ------------------------------------------------------------- my %snmp_ext_type = ( counter => "counter", + counter64 => "counter64", gauge => "gauge", integer => "integer", ipaddr => "ipaddress", Pete
Subject: Re: [rt.cpan.org #82362] Supporting counter64
Date: Wed, 2 Jan 2013 17:25:45 +0100
To: bug-SNMP-Extension-PassPersist [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Pete Bristow wrote via RT: Show quoted text
> Hi,
Hello, Show quoted text
> Newer versions of Net-SNMP support reporting 64bit counters via the > pass/pass_persist mechanism.
Are you sure about this? I see no such mention in either the documentation or the changelog. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #82362] Supporting counter64
Date: Wed, 2 Jan 2013 16:42:45 +0000
To: bug-SNMP-Extension-PassPersist [...] rt.cpan.org
From: Pete Bristow <pete.bristow [...] z11.net>
Hi, Yes I'm pretty sure support is there. netsnmp_internal_pass_parse(char * buf, char * buf2, size_t * var_len, struct variable *vp) in agent/mibgroup/ucd-snmp/pass_common.c of net-snmp 5.7.2 else if (!strncasecmp(buf, "counter64", 9)) { static struct counter64 c64; uint64_t v64 = strtoull(buf2, NULL, 10); c64.high = (unsigned long)(v64 >> 32); c64.low = (unsigned long)(v64 & 0xffffffff); *var_len = sizeof(c64); vp->type = ASN_COUNTER64; return ((unsigned char *) &c64); } Looks like support, and it certainly seems to work. Pete
Subject: Re: [rt.cpan.org #82362] Supporting counter64
Date: Wed, 2 Jan 2013 18:06:31 +0100
To: bug-SNMP-Extension-PassPersist [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Pete Bristow wrote via RT: Show quoted text
> Yes I'm pretty sure support is there. > > netsnmp_internal_pass_parse(char * buf, > char * buf2, > size_t * var_len, > struct variable *vp) > > in agent/mibgroup/ucd-snmp/pass_common.c of net-snmp 5.7.2 > > else if (!strncasecmp(buf, "counter64", 9)) { > static struct counter64 c64; > uint64_t v64 = strtoull(buf2, NULL, 10); > c64.high = (unsigned long)(v64 >> 32); > c64.low = (unsigned long)(v64 & 0xffffffff); > *var_len = sizeof(c64); > vp->type = ASN_COUNTER64; > return ((unsigned char *) &c64); > } > > Looks like support, and it certainly seems to work.
Ok then. Thanks, applied. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.