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

Inbound bandwidth monitor?

Discussion in 'Tomato Firmware' started by nable, Jan 23, 2010.

  1. nable

    nable Addicted to LI Member

    I'm running on a 1MBps line with 5 other housemates, and sometimes one of them would hog all the bandwidth to themself.

    Tomato is able to display a realtime bandwidth usage, but is there any way for it to show the realtime bandwidth usage for individual IP/MACs?

    Heck, even if it can show the seperate usage of the QoS classes that would be good enough. The QoS graphs show the connection count and outbound bandwidth. Why not inbound?
     
  2. Toastman

    Toastman Super Moderator Staff Member Member

    I would love it if someone were to add an extra pie chart with incoming class data. This information would be the icing on the cake, it would make administration much easier. If incoming bandwidth can be counted for the traffic graphs, then I would imagine it can drill deeper into the connections in order to keep counts of the individual classes.
     
  3. karogyoker

    karogyoker Addicted to LI Member

    bumping for this feature request
     
  4. dougisfunny

    dougisfunny LI Guru Member

    The Bandwidth monitor is dynamically created based on the interfaces that are actual on the router, so the VPN mods have extra bandwidth data.

    If you made separate vlans for each port or something, I imagine it would do what you need.
     
  5. nable

    nable Addicted to LI Member

    That won't work because some of the ports are further switched into multiple PCs in different rooms. I'm just wondering if this can be trivially implemented or will require elaborate work. I mean, the QoS graphs are already measuring outbound bandwidth(kbps/kBps) in realtime, why not inbound?

    It would be useful as **** if i can easily identify which of the housemates is using up the bandwidth so i can ask him nicely in person to be more considerate.
     
  6. karogyoker

    karogyoker Addicted to LI Member

    Wat. You can identify by MAC address or IP.
     
  7. dougisfunny

    dougisfunny LI Guru Member

    No, you'd have to set some nvram variables to put each port on a separate vlan. If you look in the Tomato FAQs, you'll see some stuff on vlans.
     
  8. Planiwa

    Planiwa LI Guru Member

    I did per user traffic stats some time ago.
    System is still collecting the data, but no longer reporting, since there are no longer any seriously problematic users. Perhaps I'll post something when I get a little time.
     
  9. nable

    nable Addicted to LI Member

    Well, i read up on iptables and found out how i could create individual rules for each ip and later get the total amount of data (either in packets or bytes) that fulfill those rules, thus telling you how much data each ip has received or sent.

    I then wrote a perl script that would query the router via telnet for this information twice with a 1 second interval, calculate the download rate, and then output this:
    [​IMG]

    That's good enough for me, i guess. I'll share the messy perl code if anyone's interested
     
  10. trevorw

    trevorw LI Guru Member

    It would be great if you could post the script. Does it integrate with the GUI (vlan-based) or is it syslogd based?

    Cheers,
     
  11. nable

    nable Addicted to LI Member

    I'm a windows user and i'm not even sure i understand what syslogd is.

    All i did was something like this. And then i wrote a perl script to telnet into the router and get the information, parse it, do some calculations, and the spit out the numbers.

    bwmon.txt is the script, and fw.txt is an example of what you need to add into Administration>Scripts>Firewall for each IP you want to track(you need to save and restart for it to run, i think).
     

    Attached Files:

    • bwmon.txt
      File size:
      1.8 KB
      Views:
      28
    • fw.txt
      File size:
      270 bytes
      Views:
      24

Share This Page