Power Failure - Lost Bandwidth Usage History

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
propelaheadau
Posts: 32
Joined: Wed Jun 10, 2009 6:24 am

Power Failure - Lost Bandwidth Usage History

Post by propelaheadau »

Hi there,

I am unsure if this question has been asked before; I have looked in the forum and could not find reference.

We had a power failure on the 02/07/09 and since the Total Bandwidth Usages have been returned to zero, this has also affected (I guess this would be obvious) the Quotas for the month (The hogs in the house are off the hook now lol).

Question is this normal behaviour and if so is there a way of having this information written so it is not volatile in case of "brown out".

Kind regards

Peter
Attachments
Bandwidth Usage Screen Grab
Bandwidth Usage Screen Grab
Bandwidth Usage.jpg (92.48 KiB) Viewed 6897 times

Gargoyle87
Posts: 48
Joined: Mon May 04, 2009 5:49 pm

Re: Power Failure - Lost Bandwidth Usage History

Post by Gargoyle87 »

Hello! :)

Power failure happens regularly in my country (we have a severe energy problem), so at the moment I bought the wrt54gl to my home I found a solution for this problem. I used a 12 volt rechargeable battery connected to the device directly, and connected to the main power supply through an adapter. So the device will work for hours without the main power supply (the wrt54gl power consumption is only 6 watt!).

Writing the quotas data so frequently into the flash memory will wear out the flash chip. I read in this forum that Gargoyle saves the data in the flash memory once in a day.

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

Re: Power Failure - Lost Bandwidth Usage History

Post by Eric »

propelaheadau: Are you sure you lost your quota information? The latest firmware backs it up to flash every 4 hours. I think the clearing of the bandwidth data is related to the problem with bandwidth monitor that's driving me crazy. The data gets backed up but it is getting corrupted so you see a bunch of zeros.

Gargoyle87: That's a neat trick with the battery! Maybe you could create a wiki page explaining exactly what equipment you used for this setup, ideally with pictures?

propelaheadau
Posts: 32
Joined: Wed Jun 10, 2009 6:24 am

Re: Power Failure - Lost Bandwidth Usage History

Post by propelaheadau »

Hey Eric,

I am very sure, we have some pretty heavy users here at home and there quotas where basically reset....please see attached jpeg!!

E.G.

192.168.0.212 was near to %100 (Heavy User)
192.168.0.221 was near to %80 (Heavy User)

Again mate thanks for your responce and hard work.

Kind regards

Peter
Attachments
Bandwidth Quota's Image
Bandwidth Quota's Image
Bandwidth Quota's.jpg (104.28 KiB) Viewed 6835 times

propelaheadau
Posts: 32
Joined: Wed Jun 10, 2009 6:24 am

Re: Power Failure - Lost Bandwidth Usage History

Post by propelaheadau »

Hi Eric,

Just flashed latest bleeding edge and will test....created back up prior to flash, uploaded loaded back up.....seamless.

Thanks Eric such great firmware...

Regards

Peter

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

Re: Power Failure - Lost Bandwidth Usage History

Post by Eric »

I think your quotas were restored properly -- it's just that it had probably been almost a full 4 hours, and you therefore lost a lot of information. If things were not restored properly, it seems likely you would see all zeros, not some users using up to 25%.

There's no good way to avoid a problem like this. There's no way to know when the power will go, so there's no way to save the data right before the router goes down. The only solution is to save the data more frequently. The more frequently the data is written the greater the problem of the flash chip wearing out. Granted 4 hours is still VERY conservative, but they get worse quickly. The statistics I've seen say you get 50,000-100,000 writes, which seems like a lot.. but it's a limit you don't have with normal hard drives. At 4 hour intervals and 100K writes, you get 45 years. At one hour you get 11 years. At one minute... you get 2 months. If you assume 50K writes, divide those numbers in half. That also assumes the manufacturers statistics are in the ballpark and aren't wishful thinking on the part of the marketing department... and I'm a suspicious bastard. That's why I'd rather err on the side of caution.

propelaheadau
Posts: 32
Joined: Wed Jun 10, 2009 6:24 am

Re: Power Failure - Lost Bandwidth Usage History

Post by propelaheadau »

Hi Eric,

Just to confirm the quota's for each user where returned to zeros, the count you see in the image are based on the usage subsequent to the power outage (heavy users).

I am 99.99% sure all data was lost....I know this is on the radar for future builds but if there could be an implementation of some sort of emailing of logs this would really help out.

Kind regards

Peter

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

Re: Power Failure - Lost Bandwidth Usage History

Post by Eric »

Huh... that's definitely a bug -- you should have lost at most 4 hours of data. It may have been solved with the latest firmware, though since a lot has changed with the new quota system.

Also, I think (cross your fingers) I fixed the ugly bandwidth bug. New firmware uploaded.

Post Reply