Bug 158630 - High Capacity (HC) 64-bit counters aren't available
Summary: High Capacity (HC) 64-bit counters aren't available
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: net-snmp
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jan Safranek
QA Contact:
URL:
Whiteboard:
: 193088 (view as bug list)
Depends On:
Blocks: 198694
TreeView+ depends on / blocked
 
Reported: 2005-05-24 14:04 UTC by Matthias Saou
Modified: 2008-08-27 00:04 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-13 13:31:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Matthias Saou 2005-05-24 14:04:09 UTC
Polling ifInOctets and ifOutOctets values every 5 minutes through snmp on a
RHEL4 server's network interfaces gives wrong values once the traffic exceeds
114Mbps, since the 32-bit counters wrap.

The solution is to use the ifHCInOctets and ifHCOutOctets "High Capacity" (HC)
64-bit counters from the ifXTable tree, but it's not available with RHEL4's
net-snmp, nor does it seem available on any other RH or Fedora Core distribution.

After some searching, I'm still not sure this is something the Linux kernel
supports (64-bit network interface counters), which would be problematic with
Gigabit Ethernet getting more and more popular.

# snmpwalk -v 2c -c community rhel4server.addr ifHCInOctets
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets = No Such Object available on
this agent

Comment 1 Kaj J. Niemi 2005-06-04 19:25:47 UTC
RHEL4 ships with net-snmp version 5.1.2.

ifXTable was implemented version 5.2 and available only if you pass configure
--enable-mfd-rewrites - something that isn't being set in any spec file by
default. The feature does seem to work properly at least for the interface
counters as far as I can tell (when comparing values to the opposing end switch
from vendor C). It would be nice if this would either be backported or RHEL4U2
contained a more recent version of net-snmp. :-)

On another note, RHEL4 x86_64 net-snmp 5.1.2 seems to return seemingly random or
0 for the 32 bit ifInOctets/ifOutOctets counters but valid values for
ifInUcastPkts/ifOutUcastPkts. I'll wait for U1 to see if it contains a fix
before filing a bug.



Comment 2 Matthias Saou 2005-06-21 15:55:37 UTC
Regarding the wrong values for the interface counters on x86_64, I can confirm
this, and also that U1 does not contain any update to net-snmp.

For my part, I'll try to upgrade a server to 5.2 w/ --enable-mfd-rewrites to see
if I can get something useful out of it at last.

Comment 3 Kaj J. Niemi 2005-06-21 20:15:27 UTC
Matthias, going pretty much off-topic from RHEL4 but... net-snmp 5.2.1 from
rawhide recompiled on RHEL4 x86_64 lets me have working counters especially with
--enable-mfd-rewrites enabled. I have not seen any adverse side effects and the
network management suite I use is pretty aggressive at probing/querying for
everything available.



Comment 4 Matthias Saou 2005-06-22 11:18:27 UTC
Not that much off-topic since my initial request was to have HC counters
available. At least now I know this isn't possible with 5.1.x and given the
update policy of RHEL, this almost certainly means that they'll never make it
into RHEL4.

Anyway, I've also got HC counters working great with a custom package of 5.2.1,
the only problem was that it broke the PHP module (undefined symbol:
usmAES192PrivProtocol) that I use for graphing through cacti. I'm off to
rebuilding the module against 5.2.1 now.

Comment 5 Radek Vokál 2005-11-22 14:21:47 UTC
Here's my testing srpm with mfd-rewrites enabled (and also few other fixies).
Can you please check if it solves the problem? 

http://people.redhat.com/rvokal/net-snmp/net-snmp-5.1.2-11.EL4.6.nodist.src.rpm



Comment 6 Matthias Saou 2005-11-22 14:56:08 UTC
As Kaj said, that configure options is only available in 5.2.x and not 5.1.x.
I can't find any trace of it in 5.1.2's configure script or in any of the RHEL
specific patches, so I doubt the addition in the spec will have changed
anything.... or else I'm missing something.

Comment 7 Radek Vokál 2005-11-22 15:06:51 UTC
Ah, crap, you're right. I've confused 5.1.2 with 5.2.1. You're right, this is
only avaliable in versions 5.2.x .. will try to backport it to 5.1.2

Comment 8 saveline 2005-11-24 14:01:15 UTC
Hi,
I think my problem is very similar. I've got 2 64bits box which one runs snmpd
from net-snmp version 5.0.9 and the other box from net-snmp version 5.1.2
When i try to query one this two box by using snmpwalk from a 32 bits box (with
net-snmp 5.0.9) I got this kind of answer :
IF-MIB::ifInOctets.1 = Counter32: 54392
IF-MIB::ifInOctets.2 = Counter32: 54392 (this is never updated).
(Interface 1 is lo and 2 is eth0).

But when I try to query one this two box with a 64 bits (box), I got this answer
IF-MIB::ifInOctets.1 = Counter32: 54392
IF-MIB::ifInOctets.2 = Counter32: 18356722278 (this is updated after a query),
it looks like better. So should I upgrade net-snmp on both machines (64 bits
snmp servers and 32 bits snmp client)?

Thanks.




Comment 11 Hansjoerg Maurer 2006-06-21 08:43:41 UTC
I recompiled the FC4 SRPM 5.2.1-12 with the
--enable-mfd-rewrites				
configure Option and it fixes the problem
with the original RHEL4 snmp Package I get which is nonsense
[root@intra plugins]# /usr/bin/snmpwalk  -v 1   rmvb01 ifOutOctets
RFC1213-MIB::ifOutOctets.1 = Counter32: 3816549
RFC1213-MIB::ifOutOctets.2 = Counter32: 3816549

with the new FC4  snmp Package I get the true values
[root@intra plugins]# /usr/bin/snmpwalk  -v 1   rmvb01 ifOutOctets
RFC1213-MIB::ifOutOctets.1 = Counter32: 4851721
RFC1213-MIB::ifOutOctets.3 = Counter32: 2241947296

It would be nice, if someone from RH could identify the problem and
provide a fix.

If I can do further testing, let me know

 


Comment 12 Radek Vokál 2006-06-21 08:48:53 UTC
(In reply to comment #11)
> I recompiled the FC4 SRPM 5.2.1-12 with the

That's what we were talking about in Comment #6 - 5.2.1 is not 5.1.2

Comment 13 Hansjoerg Maurer 2006-06-21 15:24:39 UTC
You are right, the information was already available 

In comment #7 you wrote, that you will try to backport
to 5.1.2.
Do you have success in your efforts?


There seem to be two problems, which have both been described
and which both make it impossible to get snmp interface statistice on
x86_64 systems

Summary:

1)  ifOut/InOctets are not displayed correcty on x86_64
(in the above example you see, that with the RHEL4U3 version of 
net-snmp  ifOutOctets of both interfaces show the same values)
The update to version 5.2.1 of net-snmp solves the problem


2)  ifHCOut/InOctets are not shown at all (in my case)
even with 5.2.1 compiled with --enable-mfd-rewrites
(see below, only some parts of the ifXTable are show)

Therfore I am unable to gain interface statistics on a heavy network loaded
system.


/usr/bin/snmpwalk   -v 1  -c XXXX YYYY ifXTable
IF-MIB::ifName.1 = STRING: lo
IF-MIB::ifName.2 = STRING: bond0
IF-MIB::ifName.3 = STRING: eth0
IF-MIB::ifName.4 = STRING: eth1
IF-MIB::ifInMulticastPkts.1 = Counter32: 0
IF-MIB::ifInMulticastPkts.2 = Counter32: 0
IF-MIB::ifInMulticastPkts.3 = Counter32: 0
IF-MIB::ifInMulticastPkts.4 = Counter32: 0
IF-MIB::ifInBroadcastPkts.1 = Counter32: 0
IF-MIB::ifInBroadcastPkts.2 = Counter32: 0
IF-MIB::ifInBroadcastPkts.3 = Counter32: 0
IF-MIB::ifInBroadcastPkts.4 = Counter32: 0
IF-MIB::ifOutMulticastPkts.1 = Counter32: 0
IF-MIB::ifOutMulticastPkts.2 = Counter32: 0
IF-MIB::ifOutMulticastPkts.3 = Counter32: 0
IF-MIB::ifOutMulticastPkts.4 = Counter32: 0
IF-MIB::ifOutBroadcastPkts.1 = Counter32: 0
IF-MIB::ifOutBroadcastPkts.2 = Counter32: 0
IF-MIB::ifOutBroadcastPkts.3 = Counter32: 0
IF-MIB::ifOutBroadcastPkts.4 = Counter32: 0
IF-MIB::ifLinkUpDownTrapEnable.1 = INTEGER: 0
IF-MIB::ifLinkUpDownTrapEnable.2 = INTEGER: 0
IF-MIB::ifLinkUpDownTrapEnable.3 = INTEGER: 0
IF-MIB::ifLinkUpDownTrapEnable.4 = INTEGER: 0
IF-MIB::ifHighSpeed.1 = Gauge32: 0
IF-MIB::ifHighSpeed.2 = Gauge32: 0
IF-MIB::ifHighSpeed.3 = Gauge32: 0
IF-MIB::ifHighSpeed.4 = Gauge32: 0
IF-MIB::ifPromiscuousMode.1 = INTEGER: 0
IF-MIB::ifPromiscuousMode.2 = INTEGER: 0
IF-MIB::ifPromiscuousMode.3 = INTEGER: 0
IF-MIB::ifPromiscuousMode.4 = INTEGER: 0
IF-MIB::ifConnectorPresent.1 = INTEGER: 0
IF-MIB::ifConnectorPresent.2 = INTEGER: 0
IF-MIB::ifConnectorPresent.3 = INTEGER: 0
IF-MIB::ifConnectorPresent.4 = INTEGER: 0
IF-MIB::ifAlias.1 = STRING:
IF-MIB::ifAlias.2 = STRING:
IF-MIB::ifAlias.3 = STRING:
IF-MIB::ifAlias.4 = STRING:
IF-MIB::ifCounterDiscontinuityTime.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifCounterDiscontinuityTime.2 = Timeticks: (0) 0:00:00.00
IF-MIB::ifCounterDiscontinuityTime.3 = Timeticks: (0) 0:00:00.00
IF-MIB::ifCounterDiscontinuityTime.4 = Timeticks: (0) 0:00:00.0





Comment 14 Hansjoerg Maurer 2006-06-21 15:31:29 UTC
2) of the sumary could be solved be using
-v2c ...
With -v2c the HC Counters are available with 5.2.1


Comment 15 David Ash 2006-07-20 05:30:17 UTC
*** Bug 193088 has been marked as a duplicate of this bug. ***

Comment 17 RHEL Program Management 2006-08-18 17:39:45 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 23 RHEL Program Management 2007-06-09 13:27:19 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 24 Jan Safranek 2007-06-13 13:02:40 UTC
64 bit counters cannot be ported from net-snmp-5.2.1 to net-snmp.5.1.2, because
whole IF-MIB was rewritten in net5-snmp-5.2.1 and uses many new features of this
release, e.g. MFD. Porting it back would lead to different API of net-snmp
libraries, breaking application compatibility policy of Red Hat Enterprise Linux
(see http://www.redhat.com/f/pdf/rhel4/AppCompat.pdf).

It would be possible to implement the 64 bit counters (i.e. ifXEntry OID) from
scratch, but it would need lot of effort and I do not see much chance to do it
without significant pressure from support.

Comment 26 RHEL Program Management 2007-06-13 13:31:17 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request. 

Comment 27 Matthias Saou 2007-06-14 08:58:34 UTC
Too bad it's taken so long to be declined...
Now that I'm making all new installs with RHEL5, which has a recent enough
net-snmp, it's not such a problem for me anymore.

BTW, removing the blocks "Palm sync on USB crashes kernel" :-/

Comment 28 Jonathan Steffan 2008-08-27 00:04:12 UTC
I finally got 64 bit counters working:

http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/SRPMS/net-snmp-5.2.1.2-fc4.1.src.rpm

Just update the %configure and add --enable-mfd-rewrites and make sure to use v2c and there is a *major* improvement.


Note You need to log in before you can comment on or make changes to this bug.