[WLANware] pmacct

Stefan Braun sbraun at freesurf.ch
Thu Aug 13 13:10:29 CEST 2009


Hello Jan, hello list

Am Donnerstag, den 13.08.2009, 11:37 +0200 schrieb Jan Groenewald:
> On Thu, Aug 13, 2009 at 10:57:37AM +0200, Stefan Braun wrote:
>
> > In the german thread
> > <http://thread.gmane.org/gmane.org.freifunk.wlanware/4823> Marco Tedaldi
> > reported counter overflows, the entries with higher amount than 4GByte
> > start from zero again.
> > In the answer I assumed a 32Bit counter in the Linux kernel. There was
> > no other opinion in this thread, so it must be true. ;-)
> 
> Thanks, I can't recall now that this was always a 4GB problem. I thought
> some were less. I will watch more closely, it sounds like the most
> plausible answer.

The 32bit byte counter on Linux interfaces is perhaps not the data
source for pmacct. Sorry for this first assumption...




It seems that pmacct uses internal 32Bit counters too...
http://wiki.pmacct.net/OfficialFAQs says:

Q15: 32 bit counters are not large enough to me, in fact i see them
rolling over and returning inconsistent results. What to do ?
A: pmacct >= 0.9.2 optionally supports 64 bits counters via a
'--enable-64bit' switch
   while configuring the package for compilation. It will affect all counters: bytes,
   packets and flows. Use such switch only when required as 32 bits counters allow to
   save some memory. Usually, overflowing counters are recognizable by unexpected
   fluctuations in the counters value - caused, as said, by one or multiple rollovers.


Will this 64bit counters solve the problem? Are the package maintainers
on this list, will they provide a new compiled binary in this package?


> > I can reproduce it on my Linux box (Ubuntu 8.04) by transfering data
> via
> > Netcat from the loopback interface to the loopback interface:
> > In first shell (regard the "RX bytes" and "TX bytes" values):
> > $ watch ifconfig lo
> > In second shell:
> > $ nc -l -p 9999 >/dev/null
> > In third shell:
> > $ nc -v -v localhost 9999 </dev/zero
> 
> On Ubuntu jaunty 2.6 kernel 64bit desktop:
> 
> 0 jan at muizenberg:~$sudo nc -l -p 9999 >/dev/null
> usage: nc [-46DdhklnrStUuvzC] [-i interval] [-P proxy_username] [-p
> source_port]
> 	  [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol]
> 	  [-x proxy_address[:port]] [hostname] [port[s]]
> 1 jan at muizenberg:~$1 jan at muizenberg:~$nc -v -v localhost 9999
> </dev/zero
> nc: connect to localhost port 9999 (tcp) failed: Connection refused
> nc: connect to localhost port 9999 (tcp) failed: Connection refused

Ah, ok. I see that we're using two different versions of Netcat. My
version needs "-l -p $port" for listening on a TCP port, your version
needs only the "-l $port" for this task. Such changes can break
scripts... :-(
In newer Ubuntu versions there are two packages:
-"netcat-traditional" (based on the old version from Hobbit)
-"netcat-openbsd" (This package contains the OpenBSD rewrite of netcat,
including support for IPv6, proxies, and Unix sockets.)

That was offtopic. But nice to know. :-)


Greetings,
Stefan Braun.




More information about the WLANware mailing list