Closed RMerl closed 12 years ago
All the required code should already be there in rstats (which comes straight from Tomato), I just need to look more closely at what Asus is doing with its settings. For instance Asus clears rstats_path when rstats is restarted, in rc/services.c:restart_rstats().
All necessary code for both disk and nvram storage is already there. Nvram being at a premium, I will probably only document/expose the disk-based method.
Functionality implemented (commit 937085467db5e21f938b4ab3e057706cbd54b60f).
The Backup option won't be exposed (because Asus treats rstats_bak differently from Tomato - this could cause issues when people flash back to an original Asus firmware). Also, the option to save to nvram isn't exposed, to avoid the issue where someone might fill up his nvram, causing him to lose all his settings.
The option to select the Start of Month day still needs to be done at the WebUI level.
Commit 1fe7a77cbf88eb4ad0cdd1eaa525d044f31ccc1e now added the option to set the starting day, and added a new Monthly traffic page, completing the implementation of this feature.
Currently, the Traffic Monitor doesn't save its data, so it gets reset at boot time. A few possibilities to investigate:
1) Store the data in nvram, either through cron or at shutdown time (see how DD-WRT handles it) 2) Since nvram is at a premium, store that same data but in the jffs partition if it's enabled