download statistics

Ainsley Pereira blfs-support at pebble.org.uk
Tue Oct 5 09:05:34 PDT 2004


On Tue, Oct 05, 2004 at 04:39:08PM +0200, Martin Kavec wrote:
> Martin Kavec wrote:
> 
> > my ISP allows me to download only (XX) GB/month. Could you please suggest
> > me a tool to monitor a network adapter which I could simply reset at a
> > particular time and start accumulating again? Thanks.
> 
> Thanks for suggestions. However, I have doubts that both ifconfig and
> iptables can keep the info over reboots/shutdowns (can not try it right
> now). I could imagine to set up things this way, but I'm really aiming at
> something very straightforward, something my wife could understand too. I
> tried to search freshmeat, but did really get anything useful. Perhaps I
> used incorrect keywords. Don't want to look lazy but could you, please
> suggest me some?

You're right, they won't. Personally, I knocked up some scripts that
check every hour the counters from iptables and some php to show various
rules and their output. The machine in question almost never gets
rebooted, though, and I only need an approximate figure to alert me if
I'm getting near the 10Gb/month limit (above which I have to pay extra -
it's not a hard limit), so the fraction of an hour I might lose
occasionally to a kernel upgrade isn't significant.

I'm sure I saw since something that looked like it would do similar (but
would probably be tidier:) ), but I don't remember the name. Keywords
like 'ip accounting' might help. Depending on your exact needs, maybe
one of the 'mrtg' reporting tools could help.

Or, if you're really desperate and don't mind diving into code to make
it do what you want, I could release my code (but it's not really very
tidy at the moment).

~A.



More information about the blfs-support mailing list