New Bandwidth Monitor in 1.0.5

The latest news about Gargoyle

Moderator: Moderators

Eric
Site Admin
Posts: 1441
Joined: Sat Jun 14, 2008 1:14 pm

New Bandwidth Monitor in 1.0.5

Post by Eric »

The most recent version of Gargoyle contains a completely new implementation of the bandwidth monitor. The front-end is almost exactly identical to before (for now), but the new back-end is significantly more flexible and should allow more straightforward implementation of per-ip monitoring without setting of static IPs, which is a feature I've wanted for some time (coming soon!)

The only drawback to the new bandwidth monitor is that it hasn't been tested by anyone but me... until now. So, if you see anything problematic with the bandwidth monitor in version 1.0.5, I'm especially interested in hearing about it and getting it fixed as soon as possible.

Finally... I'm interested in your ideas/thoughts with respect to the bandwidth monitor. The problem is that while I now have a tool to implement monitoring of each individual ip, this can eat up memory really, really fast. Each time point is stored in 8 bytes. Suppose you store the upload and download bandwidth every day for a year. If you have one full subnet (255 ips), you will end up with 2*255*365*8bytes = 1.4 MB. If you have a router with only 16 MB of RAM, it usually requires almost all of it just to keep the system running. Using up another 1.4 MB will crash the system. While most of the time there won't be 255 ips... it's easy to see how things can get out of hand very quickly. Every time a new one connects, a bunch of memory gets allocated.

My current thought is to use the new functionality to tally up everything on a per month basis and just display totals for each month in the last year. 2*255*12*8 is only 48Kb. Also, I may do the same for a fairly short time span (say past 15 minutes, at 1m intervals), so you can see see the breakdown of recent usage too.

I'm very interested in your thoughts about what time spans/intervals are most useful, and make use of the limited memory the most effectively. What measurements do you care about most, and which are not as important? Please comment below to share your ideas!

BikeMike
Posts: 108
Joined: Sat Jun 13, 2009 8:02 am
Location: Adelaide, South Australia

Re: New Bandwidth Monitor in 1.0.5

Post by BikeMike »

Is this change the reason for the dropdown boxes on bandwidth usage disappearing? I used them quite often to monitor live usage on individual IPs. For me anything beyond the 15 minutes is pointless, not really interested in historical data. It would be nice to have a few more colours (say 5) on the graph, and have Gargoyle remember your settings for this so the bandwidth usage page is always set up how you want it.

xpfalcon
Posts: 7
Joined: Tue Aug 11, 2009 1:49 am
Location: Australia

Re: New Bandwidth Monitor in 1.0.5

Post by xpfalcon »

I am wondering if period of monitoring could be up to each user and if a calculator/guide could give you approx. memory used up for each of the options, so you could see if you're going to get regular data its going to use up more memory faster.

Personally, I'd like to see weekly monitoring, with some sort of option to dump the usage data (txt or csv).

Eric
Site Admin
Posts: 1441
Joined: Sat Jun 14, 2008 1:14 pm

Re: New Bandwidth Monitor in 1.0.5

Post by Eric »

BikeMike: The disappearance of the dropdown boxes is a bug, now fixed in 1.0.6 (just uploaded). The problem you report elsewhere in the forums with quotas for multiple static ips (that you found persisted from 1.0.4 to 1.0.5) should now be fixed as well in 1.0.6

pbix
Developer
Posts: 1366
Joined: Fri Aug 21, 2009 5:09 pm

Re: New Bandwidth Monitor in 1.0.5

Post by pbix »

I upgraded tonight to v1.0.6. I'm not sure why but my WRT54G-TM hung up several times during the initial booting and gave be a scare. But now it seems to be back in the saddle.

Some comments.

1) How about an automative backup and restore of user data when doing an upgrade? Reconfiguring is a major headache and one of the chief complaints I heard over at DD-WRT. This would be a cool feature that would one-up DD-WRT. Could be handled by and HTML script I would think.

2) Is there a way to work the reset button to restore all settings to the default?

3) Your tabular list of usage is rather formidable. I would suggest a graph of days instead. DD-WRT has this and it makes for a nice compact display. Hovering the mouse over each day gives the exact statistics of the day.

4) I like your idea of showing daily data for the last thirty days and then monthly data. Maybe two graphs. One for days and one for months.

5) Saving more statistics should be done using a seperate server. So then the user would need to name an FTP site or something that Gargolye would log the data to.
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Eric
Site Admin
Posts: 1441
Joined: Sat Jun 14, 2008 1:14 pm

Re: New Bandwidth Monitor in 1.0.5

Post by Eric »

(1) & (2) have been requested before, and so now I'm leaning towards implementing them in the near future (one request=I'll consider it, two=I should probably implement). (1) is a bit tricky since you need to allocate some memory to store the settings in while the flash gets over-written. My concern with (2) is that it will work on only some routers. The interface for the reset button is hardware dependent, so there are going to be routers on which it doesn't work. Probably means I should implement it for the more mainstream ones though...

(3)It's already there! Select the time frame of 1year on top and you'll get graph output. The tabular output is in addition to the graph output. Also, you can select "Monthly" to show usage by month, making the listing a little bit more manageable if you have a large amount of data saved.

(4) I haven't deciced on how best to store statistics for individual ips yet... that's why I'm asking people for their preferences. I just attained the capacity to monitor them a lot more easily using my new bandwidth iptables module. But I'm glad you like my preliminary ideas...

(5) It would be great to have backup functionality. It would allow users to store a LOT more data. I'm not sure if it would be best to do this using flat files sent to an ftp server, or maybe allow logging to a mysql database. However, I think this is a lower priority than figuring out which statistics are really important and displaying those automatically on the router.

pbix
Developer
Posts: 1366
Joined: Fri Aug 21, 2009 5:09 pm

Re: New Bandwidth Monitor in 1.0.5

Post by pbix »

Regarding 1). You have a backup/restore function already. Does this work across revisions of the firmware? If so it seem to me that there is no need to be tricky about this. Just perform the backup using a web script and save it on the user's PC, then upload the new image (which wipes all user settings) wait for the reboot and restore the users backed up settings onto the router.

Regarding 2). Hmmm, I like the idea of not using hardware dependant features. This is a real feature of Gargoyle. Here's a technique I used on an embedded device I designed. When the device boots it listens for 3 seconds on a known IP address for a TFTP upload. So to extrapolate to your case after your boot is complete you force the network settings on the LAN port to 192.168.1.1 and wait three seconds for a TFTP upload before going on and loading user settings. If you get one just update the flash image and wipe all the user settings. The trick is to identify when the 3 second window begins for the user. You could do this by flashing the LAN connector LED's for example. Is there an LED which is pretty available across harware platforms?
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

foreverstorm
Posts: 20
Joined: Mon Aug 24, 2009 2:17 pm

Re: New Bandwidth Monitor in 1.0.5

Post by foreverstorm »

Hello,

Terrific job with the firmware I must say. I am running 1.0.4 on an Asus WL-500g V2 Premium in Australia for my flat, there are 6 of us. I want to upgrade to 1.0.6 but it will be a while before I can because our landlord keeps the equipment locked away in a cupboard most of the time. But I was wondering if the problem I am experiencing hasn't been fixed...

Every time I update save a setting, it seems to have a good chance of screwing up the quota tables and graphs, and perhaps other things as well that aren't immediately obvious like prioritization. A resave of settings and reboot seem to solve things but it is a bit of a worry since I want to measure month long quotas and have to be sure I make no second guesses on the settings.

Also about the quota system, it would be nice to have an on peak / off peak split as we get different amounts to use depending on the peak time. It would be also really nice to have P2P/BT blocking for unknown clients, but still allow browsing, since people bring their friends over who like to torrent our connection and leave.

As for what data should be displayed, to me the only important thing is total usage per static ip, on a daily, weekly and monthly basis - but not inter monthly basis (caps are charged per month after all, and at the end of the month or every two months I can go download the data). Having said that since this particular router has so much free memory, could a simple solution be just to have a high memory usage mode?

Thanks :)

BikeMike
Posts: 108
Joined: Sat Jun 13, 2009 8:02 am
Location: Adelaide, South Australia

Re: New Bandwidth Monitor in 1.0.5

Post by BikeMike »

Just upgraded to 1.0.8 on my WRT54GL. Initially I reloaded my earlier saved config (from 1.0.3) but after having problems getting the WAN connection up, and router "lock-ups" I decided to reconfigure everything from scratch. This seemed to fix most things, but I have no bandwidh usage showing on the graphs (they are scrolling across but zero bandwidth being shown). Also QOS distribution graphs do not appear at all, just a blank space. Usage is counting against quotas ok, still to test what happens when one quota is used up.
Regards,
Mike

foreverstorm
Posts: 20
Joined: Mon Aug 24, 2009 2:17 pm

Re: New Bandwidth Monitor in 1.0.5

Post by foreverstorm »

Hey,
I just wanted to update that 1.0.7 doesn't reset the quotas whenever I change a setting anymore, the only problem with it is that the QOS distribution pie chart doesn't work which isn't such a worry.
Cheers

Post Reply