I have no option to upgrade as i am already near max .
Yesterday my house hold used 6GIG down/1 GIG up. What could lead to non-tech users to upload 1GIG? I can understand that watch streaming video can lead to high bandwidth usage on download side. But why the big upload usage?
I will try the other solution. I dont mind having the PC on. Infact i may only need to run it for a day or so to pin down bandwidth use by PC.
I have no option to upgrade as i am already near max .
Yesterday my house hold used 6GIG down/1 GIG up. What could lead to non-tech users to upload 1GIG? I can understand that watch streaming video can lead to high bandwidth usage on download side. But why the big upload usage?
I will try the other solution. I dont mind having the PC on. Infact i may only need to run it for a day or so to pin down bandwidth use by PC.
Their traffic usage would have to be torrenting or something, or perhaps uploading many videos to Youtube. For example, my wife just browses and doesn't download much, so her usage last month was 21gb down 600mb up, but her brother (who lives with us for now - long story), used 44gb down and 32gb up! They both watch the same amount of streaming video, but only her brother torrents regularly. Hell, 6gb/1gb is nothing for my house; the three of us did 18gb/6gb on Boxing Day!
Also, I forgot to mention, but I don't believe the MySQL part is necessary in the link I gave you. I recall not doing it before, when I used that solution. I don't think the program stores any data without MySQL, but I could be wrong. For your purposes though, it should be enough. _________________ Buffalo WZR-HP-G300NH on 23919
Also, I forgot to mention, but I don't believe the MySQL part is necessary in the link I gave you. I recall not doing it before, when I used that solution. I don't think the program stores any data without MySQL, but I could be wrong. For your purposes though, it should be enough.
Phew! since that MySQL stuff was making me sweat just reading it. So once i install this how would i store and view usage?
btw i am in oakville, ON (notice u were a canuck too) on Cogeco Ultimate 30 with 125GB limit ($75). Overage is capped at $50 so essentially i am paying $125 for unlimited. Still to high me thinks but such is life.
Phew! since that MySQL stuff was making me sweat just reading it. So once i install this how would i store and view usage?
I don't remember; it's been over a year since I used RFlow. See what you can get today, and if you can't get results, I'll boot into Windows tonight and check it out.
Akaz1976 wrote:
btw i am in oakville, ON (notice u were a canuck too) on Cogeco Ultimate 30 with 125GB limit ($75). Overage is capped at $50 so essentially i am paying $125 for unlimited. Still to high me thinks but such is life.
$125 for unlimited is pretty good. Where I used to work, it was ~$1500 for unlimited, but that was a 10mbit up/down tier 1 fiber drop with a service level guarantee. That was necessary because we hosted our own web servers plus FTP for customers to send in their huge files for us.
Right now I have Shaw Extreme, which is 15mb down/1mb up (can go up to 30mb down), and 100gb/month for $60-ish; however, I've never been charged any overage in 7 years of being their customer, and we consistently go way over the mark (194gb last month, 149gb November, 192gb October, etc...), so I only pray that they don't catch on, or I'll be having a word with my brother-in-law.
*edit*
Just booted into Windows (needed Windows to flash new firmware into my AVR-based oscilloscope ). Basically, you need to follow part 1 of http://www.dd-wrt.com/wiki/index.php/Using_RFlow_Collector_and_MySQL_To_Gather_Traffic_Information and only the first paragraph of part 2. After that click the Network button in the bottom left of the RFlow Collector, and make sure that the local subnet and "filter wich IPs schould not count?" shows your router address under "simply IP". Hit save. In the main window, uncheck where it says "only Online User" and "only Online WLan Clients", otherwise it will only show PC's that are powered on.
Good luck tracking down the culprit! _________________ Buffalo WZR-HP-G300NH on 23919
Any chance a nice soul could do a YouTube video on getting this script up (installed) and running? A lot of Canadian souls will need something to reference now that UBB (Usage Based Billing) with 25GB caps is pretty much set in stone.
Most DSL folks use Tomato/MLPPP, but DD-WRT with this script and its built-in MLPPP might be the answer to low cap woes.
( I posted this originally on the wrtbwmon site, but thought it might be better to post it here too)
I have this working perfectly with my DD-WRT v24-sp2, I been looking for a script like this for ages, now hopefully I want be the one getting in trouble all the time for going over bandwidth
If you dont have 'ftpput' as I didnt have it on mine, I just used wget and cron jobs, I have a media center PC that is always running MythTv 24/7 so this was an acceptable solution for me, Although I would like to figure out how-to upload to my database through HTTP POST if at all possible, or maybe through telnet.
Ok so if anyone is reading this trying to get your usage.db backed up without ftpput this is what I did. Your going to need a Linux PC that is always running. First you need to edit the 'wrtbwmon' file that you downloaded from here, to include a line to backup the database file on to the routers webserver so you can download it.
So log onto the PC you will be storing your usage database file on, and get the file above
open up the file then scroll down to line 129 to where it says "#Free some memory". Just infront of this line start a new line then enter
Code:
cp ${2} /tmp/www/usage2.htm
After every update this will move your database to a easily accessible location to everyone on the network. Make sure you copy it with the extention ".htm" The DD-WRT router didnt allow me to download any other file type from it, save the file to you home directory for now.
Next we have to set up a way to transfer the files. For this I used my MythTv PC thats running Ubuntu, on this PC I already have a webserver setup for MythWeb so I'll use that, but you can just as easy install your own.
What your going to need is the webserver root folder this is usually '/var/www/'. In this folder I created a folder named 'wrtbwmon' this is where you can store your modified 'wrtbwmon' script and your database file.
Create a testfile in this folder
Code:
echo 'this is a test' > test.txt
Now you should be able to access this file by typing in something like
"http://192.168.1.123/wrtbwmon/test.txt" from any computer on your network.
(192.168.1.123 the IP of the 24/7 PC makes sure your change this to your backup PC's IP)
After you have confirmed your webserver is running you should now copy over you modified wrtbwmon script from above
(be sure to change 192.168.1.1 to your own routers IP, and /var/www/ to your PC's webserver root folder)
I've set this up to run every 8 minutes(*/ but you can change this to what ever you want, you can test the command by just typing everything after the
Now all thats left to do is tell the router where to retrieve the files, so open up the dd-wrt web GUI and goto the Administration tab. Half way down you will see a 'Cron' section this is where you will execute your commands, Cron will need to be enabled to see the command box.
Now just paste in the following commands, be sure to change the IP to the IP your will use.
Then Save and Apply Setting, if you have already been running wrtbwmon for awhile and would like to backup your current usage.db
Just ssh into the router or use the web GUI "Administration >> Commands" and run the following command:
Code:
cd /tmp && cp /tmp/usage.db /tmp/www/usage.db
Then on your backup Pc just run the Cron job:
Code:
cd /var/www/wrtbwmon && wget http://192.168.1.1/user/usage2.htm && mv usage2.htm usage.db
you can verify by cating the file:
Code:
cat /var/www/wrtbwmon/usage.db
Hope this helped someone, I might even post this on the actuall DD-Wrt forum[/code]
I need to log network utilization over a period of a few months to track DL & UL bandwidth needed so I can gauge the size of the pipe needed for a given location.
Will this script log snapshots of the bandwidth DL * UL on say 1 min intervals?
I need to be able to export the data and run reports using Excel to find the High/Low/Ave.
Posted: Thu Aug 11, 2011 0:37 Post subject: Re: Good stuff
Would you tell , how did you setup the scrip in router?
greyback wrote:
Hi xorglub,
this is what I've been searching for, for quite a while now. I share my bandwidth with 3 housemates, and someone is being naughty. I've struggled to set up a per-MAC log system using RFlow and Ntop on a server, but the data doesn't match that of the ISP or the simple dd-wrt bandwidth graph, and analysing every packet is overkill really.
I've just set up your script now, with luck this is all I need. It would be great to incorporate this into the dd-wrt webUI.
I would also be curious to see if a 30 minutely backup of the usage file to the jffs would be a terrible thing or not. And a quick restore file is there on bootup script later, we've basic reboot-proofedness
Posted: Sun Dec 13, 2015 13:47 Post subject: Possible output to stdout?
Great script, XorGlub.
How could I do to get the results of wrtbwmon on screen/stdout?
I have multiple DD-WRT devices on my network, and would like to script a general bandwith usage, so I am thinking about issuing some SSH command and parsing the results myself.