1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Download Quota Monitoring help

Discussion in 'Tomato Firmware' started by AF35, Jul 24, 2008.

  1. AF35

    AF35 LI Guru Member

    Hi guys,
    I have got difficulties trying to understand WallWatcher. I searched the forum regarding to using WW but most of the threads only talk about installing troubleshooting so I eventually decided to open this thread and hope if anyone can help me.

    I have found this thread: http://www.linksysinfo.org/forums/sh...ad.php?t=52860
    which teaches me about how to view download quota by each internal IP address has done over a past period.

    When I type in the following command in telnet
    iptables -L traffic_in -vn
    to show my downloads by IP base, I get the following statistics.
    [​IMG]
    [​IMG]

    That was what I want. I tried to set WW to ultimately display the same thing for me, however WW returns me with the following analysis which i don't understand.
    On July 23rd, my upload is total: 2626.1MB
    and my download is total: 7776.21MB
    and i get the following graph from WW (logging both up and down)
    [​IMG]
    [​IMG]

    Can anyone please explain to me why is WW only logged 2 of my computers when I have 10 IPs tracked. Also, I cannot sum up the number given in the graph, what's 160000? my internet usage is only around 10G, isn't it suppose to be 10000 or something similar? sorry but I just don't know how to read that graph by WW and I need some help

    my script is as below:
    iptables -N traffic_in
    iptables -N traffic_out
    iptables -I FORWARD 1 -j traffic_in
    iptables -I FORWARD 2 -j traffic_out
    iptables -A traffic_in -d 10.0.0.10 - Computer 2
    iptables -A traffic_out -s 10.0.0.10
    iptables -A traffic_in -d 10.0.0.11
    iptables -A traffic_out -s 10.0.0.11
    ......
    iptables -A traffic_in -d 10.0.0.19
    iptables -A traffic_out -s 10.0.0.19
    iptables -A traffic_in -d 10.0.0.20
    iptables -A traffic_out -s 10.0.0.20 - My Computer

    my tomato loggin setting is below:
    [​IMG]
    [​IMG]

    WW setting is below:
    [​IMG]
    [​IMG]

    Sorry if this is a dumb question but I'm getting nowhere without any further help.

    Cheers
     
  2. AF35

    AF35 LI Guru Member

    can anyone tell me whether it's possible to count SNMP packets per IP via any script rules? or does WW bandwidth monitor support such function to differ the count by internal IP?

    EDIT: I've found out it is not possible and reason being WW only monitors all the broadcasted packets and packets that are related to that particular physical port.

    so, pretty much useless in my case.
     
  3. AF35

    AF35 LI Guru Member

    Ok this is my final post as I've found a way to do quota monitoring by IP and I'll stick to it until better version comes out.

    in order to achieve it I used the firewall rule I posted on top and then run a cron job to send me an e-mail everyday about the usage. and I added another cron job to reset the counter every 1st day of month.

    I can't seem to find a way to install ssmtp on tomato so I eventually swapped to DD-WRT. and that handles the e-mail very well.

    So this is what I end up having an email sent to me every morning.

    [​IMG]
    [​IMG]


    I'd like to hear any better solution if you want to share :)

    Cheers
     

Share This Page