exscape
New Around Here
Hi!
Sorry about the two threads, but I figured one thread per issue is at least better than having two separate questions in one.
I've set up my router to store traffic history:
Traffic history location: Custom location
Save frequency: Every 1 hour (for testing)
Save history location: /jffs/stats/ (exists and is writable)
I used the 'create data files' options the first time around, and have per-IP logging enabled.
I've previously tried storing stats on /mnt/sda1/stats/ (USB stick) but tried JFFS when that didn't work.
What happens is that while running, it all works - the stats look good etc. But when I shut down/reboot, all stats are reset.
The stats directory contains two files, tomato_cstats_[id].gz and tomato_rstats_[id].gz.
It does appear to save stats to the files - the mtime is updated and the files grow, etc... Yet on reboot the stats disappears and the files start over (are smaller than before the reboot):
# Pre-reboot
admin@RT-AC66U:/jffs/stats# uptime
09:36:37 up 1:06, load average: 0.00, 0.00, 0.00
admin@RT-AC66U:/jffs/stats# ls -l
-rw-rw-rw- 1 admin root 512 Mar 13 09:30 tomato_cstats_50465dd1b7b8.gz
-rw-rw-rw- 1 admin root 80 Mar 13 09:30 tomato_rstats_50465dd1b7b8.gz
# After reboot, a minute later
admin@RT-AC66U:/jffs/stats# uptime
00:00:48 up 0 min, load average: 0.41, 0.13, 0.04
admin@RT-AC66U:/jffs/stats# ls -l
-rw-rw-rw- 1 admin root 20 Jan 1 00:00 tomato_cstats_50465dd1b7b8.gz
-rw-rw-rw- 1 admin root 51 Jan 1 00:00 tomato_rstats_50465dd1b7b8.gz
admin@RT-AC66U:/jffs/stats# date
Sat Jan 1 00:00:55 GMT 2011
... it seems the clock is also not saved (no RTC?), which I guess is not a huge problem if NTP works properly. About a minute af actual time later, the clock is correct again, but the files are of course not restored.
Any advice? If this keeps up I might as well store in RAM and not cause wear to the disks!
Sorry about the two threads, but I figured one thread per issue is at least better than having two separate questions in one.
I've set up my router to store traffic history:
Traffic history location: Custom location
Save frequency: Every 1 hour (for testing)
Save history location: /jffs/stats/ (exists and is writable)
I used the 'create data files' options the first time around, and have per-IP logging enabled.
I've previously tried storing stats on /mnt/sda1/stats/ (USB stick) but tried JFFS when that didn't work.
What happens is that while running, it all works - the stats look good etc. But when I shut down/reboot, all stats are reset.
The stats directory contains two files, tomato_cstats_[id].gz and tomato_rstats_[id].gz.
It does appear to save stats to the files - the mtime is updated and the files grow, etc... Yet on reboot the stats disappears and the files start over (are smaller than before the reboot):
# Pre-reboot
admin@RT-AC66U:/jffs/stats# uptime
09:36:37 up 1:06, load average: 0.00, 0.00, 0.00
admin@RT-AC66U:/jffs/stats# ls -l
-rw-rw-rw- 1 admin root 512 Mar 13 09:30 tomato_cstats_50465dd1b7b8.gz
-rw-rw-rw- 1 admin root 80 Mar 13 09:30 tomato_rstats_50465dd1b7b8.gz
# After reboot, a minute later
admin@RT-AC66U:/jffs/stats# uptime
00:00:48 up 0 min, load average: 0.41, 0.13, 0.04
admin@RT-AC66U:/jffs/stats# ls -l
-rw-rw-rw- 1 admin root 20 Jan 1 00:00 tomato_cstats_50465dd1b7b8.gz
-rw-rw-rw- 1 admin root 51 Jan 1 00:00 tomato_rstats_50465dd1b7b8.gz
admin@RT-AC66U:/jffs/stats# date
Sat Jan 1 00:00:55 GMT 2011
... it seems the clock is also not saved (no RTC?), which I guess is not a huge problem if NTP works properly. About a minute af actual time later, the clock is correct again, but the files are of course not restored.
Any advice? If this keeps up I might as well store in RAM and not cause wear to the disks!