Bug 491336 - mrtg fails to graph 64 bit counters
mrtg fails to graph 64 bit counters
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mrtg (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Vitezslav Crhonek
Depends On:
  Show dependency treegraph
Reported: 2009-03-20 10:06 EDT by Jani Ollikainen
Modified: 2013-03-12 08:17 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-12 08:17:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jani Ollikainen 2009-03-20 10:06:12 EDT
Description of problem:
MRTG determines 0 bytes of traffic when the counter is over 32bit value.
When the traffic counter is under 32bit value it will graph it correctly.

The key is here that the values must be over 32bit range, if they are
not, it will work. So when reproducing it, check that your interface
counters are big enough or debug with own script.

Version-Release number of selected component (if applicable):

How reproducible:

Options[eth0]: growright
Target[eth0]: `/usr/local/bin/mrtg-script-eth0`
MaxBytes[eth0]: 2621440
Title[eth0]: Traffic Analysis
PageTop[eth0]: <H1>Traffic stats</H1>


cat /proc/net/dev | grep eth0 | sed s/eth0://g | tr -s " " | awk '{print $1;}'
cat /proc/net/dev | grep eth0 | sed s/eth0://g | tr -s " " | awk '{print $9;}'
uptime|sed -e 's/.*up \(.*\),.*[0-9]* user.*/\1/'

Steps to Reproduce:
1. Configure
2. Wait
3. Watch the result
Actual results:
0 bytes of traffic if the counter value is over 32bit

Expected results:
Normal traffic graph

Additional info:

Workaround to this problem is to modulo the values to under 32bit:


echo $[`cat /proc/net/dev | grep eth0 | sed s/eth0://g | tr -s " " | awk '{print $1;}'` % 2147483648 ]
echo $[`cat /proc/net/dev | grep eth0 | sed s/eth0://g | tr -s " " | awk '{print $9;}'` % 2147483648 ]
uptime|sed -e 's/.*up \(.*\),.*[0-9]* user.*/\1/'

.. But it would be nice that this wouldn't be needed, took some time
to debug this and confirm it.
Comment 1 Vitezslav Crhonek 2013-03-12 08:17:20 EDT
RHEL-5 is entering Production 2 Phase (see [1]), only critical and important security issues are going to be adressed => closing this bug WONTFIX.

[1] https://access.redhat.com/support/policy/updates/errata/

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