Bug 154455

Summary: 64bit network counters peg instead of wrapping
Product: Red Hat Enterprise Linux 4 Reporter: Guy Streeter <streeter>
Component: net-snmpAssignee: Radek Vokál <rvokal>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: nobody, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2005-395 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 12:38:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 156320, 156322    
Attachments:
Description Flags
patch to make the network counters wrap none

Description Guy Streeter 2005-04-11 21:28:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
On systems running a 64bit kernel, the values in /proc/net/dev can get too large to fit in a 32bit object. Since they are counters they should wrap, but instead they stick the the maximum value.
This is because sscanf returns the maximum value when the scanned value doesn't fit in the size specified by the format conversion.

A solution is to use unsigned long longs for scanning, and cast them to unsigned longs afterward. This process will cause them values to wrap as expected.


Version-Release number of selected component (if applicable):
net-snmp-5.1.2-11

How reproducible:
Always

Steps to Reproduce:
1. Look at ifOutOctets on a 64bit system that has been up long enough for the value to wrap.
2.
3.
  

Actual Results:  The value sticks at 4294967295

Expected Results:  The value should wrap

Additional info:

I will attach a patch I have tested.

Comment 1 Guy Streeter 2005-04-11 21:29:59 UTC
Created attachment 112996 [details]
patch to make the network counters wrap

Comment 2 Radek Vokál 2005-04-20 08:09:49 UTC
Thanks, checked into next net-snmp update

Comment 5 dff 2005-06-22 13:54:04 UTC
PM ACK for U2; 3 ACKS so move to CanFix.

Comment 6 Red Hat Bugzilla 2005-09-28 14:26:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-373.html


Comment 7 Red Hat Bugzilla 2005-10-05 12:38:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-395.html