[WLANware] pmacct
Jan Groenewald
jan at aims.ac.za
Thu Aug 13 11:37:09 CEST 2009
Hi
On Thu, Aug 13, 2009 at 10:57:37AM +0200, Stefan Braun wrote:
> Hello Jan, hello list
>
> Am Donnerstag, den 13.08.2009, 07:06 +0200 schrieb Jan Groenewald:
> > Sometimes pmacct acts strangely. I cannot repeat or isolate
> > this, but it happens once or twice a month.
> >
> > I have a single entry which will suddenly drop. I notice
> > because I Know the top 5 entries. One dropped yesterday from 4G to
> > 800M or so. It is not always 4G, it does not seem to be some kind
> > wrapping. I have looked in curr.pmacct, the numbers have in fact changed
> > so it is not just a display problem.
>
> Do you have any entry higher than 4GByte?
Yes
> 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.
> 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
On a wrt54gl router with freifunk, 2.4 kernel:
root at jan-south:~# watch ifconfig lo
-ash: watch: not found
root at jan-south:~# ipkg install watch
root at jan-south:~# ipkg install watch
ipkg_get_install: ERROR: Cannot find package watch in /usr/lib/ipkg/lists
ipkg_get_install: Check the spelling and maybe run `ipkg update'.
(same after ipkg update)
Anyway, if I install netcat on the router...
Unpacking netcat...Done.
Configuring netcat...Done.
root at jan-south:~# nc-hobbit -l -p 9999 >/dev/null
[new shell]
root at jan-south:~# while true; do ifconfig lo; sleep 1; clear; done
[Install freifunk-openwrt-compat for /sbin/ifconfig]
+ exec ip addr show label lo
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
root at jan-south:~# ipkg install freifunk-openwrt-compat
Unpacking freifunk-openwrt-compat...Done.
Configuring freifunk-openwrt-compat...Done.
root at jan-south:~# while true; do ifconfig lo; sleep 1; clear; done
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24498 errors:0 dropped:0 overruns:0 frame:0
TX packets:24498 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7299449 (6.9 MiB) TX bytes:7299449 (6.9 MiB)
[new shell]
root at jan-south:~# nc-hobbit -v -v localhost 9999 </dev/zero
localhost [127.0.0.1] 9999 (?) open
[watching shell]
RX bytes:197727465 (188.5 MiB) TX bytes:197727465 (188.5 MiB)
RX bytes:211514089 (201.7 MiB) TX bytes:211514089 (201.7 MiB)
... time flies
RX bytes:484590588 (462.1 MiB) TX bytes:484590588 (462.1 MiB)
... it's gonna take a few minutes
RX bytes:627028780 (597.9 MiB) TX bytes:627028780 (597.9 MiB)
RX bytes:754984204 (720.0 MiB) TX bytes:754984204 (720.0 MiB)
... tap tap tap
RX bytes:2291611849 (2.1 GiB) TX bytes:2291611849 (2.1 GiB)
RX bytes:3087926709 (2.8 GiB) TX bytes:3087926709 (2.8 GiB)
RX bytes:4223942829 (3.9 GiB) TX bytes:4223942829 (3.9 GiB)
RX bytes:4281305441 (3.9 GiB) TX bytes:4281305441 (3.9 GiB)
... \o/
RX bytes:9984725 (9.5 MiB) TX bytes:9984725 (9.5 MiB)
RX bytes:24338397 (23.2 MiB) TX bytes:24338397 (23.2 MiB)
RX bytes:33968133 (32.3 MiB) TX bytes:33968133 (32.3 MiB)
RX bytes:43695853 (41.6 MiB) TX bytes:43695853 (41.6 MiB)
^c
Hmmm, I would've thought pmacct uses the backup file rather than
checking this and could sum more than this. But I don't know much
about that or how it all fits together.
regards,
Jan
--
.~.
/V\ Jan Groenewald
/( )\ www.aims.ac.za
^^-^^
More information about the WLANware
mailing list