Issue is solved.
It had nothing to do with pmacct.
The ERPro-8 has hardware acceleration and when it is turned on the
packets are invisible to pmacct. I suppose in a highspeed network,
it's an issue, but when your limit is a standard 100M Internet line,
it's no big deal. Just turn it off.
----- Message from Randy <[email protected]> ---------
Date: Mon, 19 Oct 2015 17:55:05 -0600
From: Randy <[email protected]>
Reply-To: [email protected]
Subject: [pmacct-discussion] pmacctd not getting good numbers.
To: [email protected]
I've been using snmp to record data usage on wireless users on our
system. However, we have no control over when the user has the radio
turned on or off, and other issues. I'd like to catch the
information at the main router and process in the office. A quick
setup using the FAQ to try this has resulted in a miserable failure.
Here are the details:
On the router (ubiquity ERPro-8), run "pmacctd -D -c
src_host,dst_host -P memory -i eth7"
Then every 5 minutes, we run "pmacct -l -e -s > /tmp/net.txt" and
then scp that file to a server for processing.
For the relevant customer IP we run a perl script:
# Get info from netfile for bandwidth
my $upband = 0;
my $upcnt = 0;
my $dnband = 0;
my $dncnt = 0;
open(FILE, $netfile);
while(<FILE>) {
chomp;
($srcip,$dstip,$packets,$bytes) = split(/\s+/, $_);
if ( $srcip eq $address ) {
$upband = $upband + $bytes;
$upcnt = $upcnt + $packets;
} elsif ( $dstip eq $address ) {
$dnband = $dnband + $bytes;
$dncnt = $dncnt + $packets;
}
}
close FILE;
$upband = $upband + ($upcnt * 26);
$dnband = $dnband + ($dncnt * 26);
This info is then fed into an rrd file.
The old way queried the SNMP data of each radio, reading each
interface, then did some gymnastics to determine if/why the data
counter rolled over and fed the data into the rrd file.
The problem is that the SNMP version reads close to the true data
usage and the pmacctd version is Waaayyyy off.
The SNMP version of one customer shows 24.8 GB data used in 24 hrs
(sporadically) and the pmacctd version says 27.6 MB used
consistently. I know the pmacctd version is wrong, but I've looked
at the raw data pmacctd is collecting and that's what it says.
Any ideas?
We do not want anything as complicated as a netflow server. just
simple data accounting.
_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists
----- End message from Randy <[email protected]> -----
_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists