I've always like ipac for this sort of thing. It just uses
standard ipchains.

on debian apt-get install ipac

then play with /etc/ipac.conf
basicaly you add rules like
# Name of rule|direction|interface|protocol|source|destination
out eth0 | out | eth0 | all | | 

and you can be more or less specific ie traffic from your DMZ vs the
internet etc

then you just use ipacsum to get back the results

eg below gives this months stats so far
johnf@odie:/etc/mail$ ipacsum -s 20010301 -e 20010316
IP accounting summary
Host: odie / Time created: 2001/03/16 13:19:27 EST
Data from 2001/03/01 00:00:00 EST to 2001/03/16 00:00:00 EST
  eth0 in                                         :           2812M
  eth0 out                                        :           2444M
  home lan in                                     :            162M
  home lan out                                    :           2236M
  all email in                                    :             10M
  all email out                                   :             93M

On Fri, Mar 16, 2001 at 12:57:42PM +1100, Dean Hamstead wrote:
> This is the story, net here at PCL is SLOOOOW.
> So to help determine net usage i want to get an output
> of recieved data per hour.
> 
> Obviously i just use cron to time the increments.
> 
> But i need something that will read recieved data from
> the ethernet devices.
> 
> I could probably even do this with ifconfig "devicename"
> but i would need to reset the count.
> 
> Is there a nice CLI tool that can help me? Or someone
> got some fancy perl to parse cat /dev/???? out puts?
> 
> 
> Dean
> 
> 
> -- 
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://slug.org.au/lists/listinfo/slug

-- 
John Ferlito
Senior Engineer - Bulletproof Networks
ph: +61 (0) 410 519 382
http://www.bulletproof.net.au/

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to