Bug 491336 - mrtg fails to graph 64 bit counters
mrtg fails to graph 64 bit counters
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mrtg (Show other bugs)
5.3
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Vitezslav Crhonek
BaseOS QE
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2013-03-12 08:17:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):
mrtg-2.14.5-2

How reproducible:

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

/usr/local/bin/mrtg-script-eth0:
#!/bin/sh

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/'
hostname


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:

/usr/local/bin/mrtg-script-eth0:
#!/bin/sh

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/'
hostname

.. 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.