What's new

[AC66R] Traffic Monitor data resetting when router reboots

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

CivHunter

Occasional Visitor
I have the AC66R running firmware Merlin 3.0.0.4.374.32. I have per IP traffic monitoring enabled and I am saving the data on a portable hard drive I have plugged into the routers USB port. The data appears to be saving onto the hard drive. However when I reboot the router the traffic monitoring data is no longer available in the routers WEB UI. Ideas?


Thank you,

P.S. This has happened on older firmware. It also happened last night when I enabled a guest WiFi and it appeared the router rebooted to enable it.
 
Double check the location. Also, see if your hard disk might possibly be getting mounted on a different mount point between reboots (switching between sda1 and sdb1, for example).
 
Digging deeper

I tried updating to Merlin's 3.0.0.4.374.33 and it has not changed anything. When I use the HDD enclosure the path is /mnt/PortableStorage/AC66RUseLog/ and it never changes. I tried using a USB memory stick vs the portable HDD enclosure. I could see it mount from sdb1 to sda1, as Merlin mentioned, as I tried the two different usb ports on the router. To get the USB memory stick to work after changing ports I had to use the "create or reset data files" option. The traffic monitor files will update each hour, after telling the router the new save history location. From what I can see the data storage files are indeed being overwritten when I reboot (I do not need to use the "create or reset data files" option after rebooting using the portable HDD enclosure to have the router continue to monitor data useage as the path never changes, but the counters all reset at zero and I lose all prior data.)

three files located in the AC66RUseLog file
tomato_cstats_74d02b400f98.gz file date 7/13/2013
tomato_cstats_74d02b400f98.gz.tmp file date 10/7/2013
tomato_rstats_74d02b400f98.gz file date 10/7/2013

After a one hour refresh the first file disappeared. So I rebooted the router and it showed back up, my useage data was reset.
 
Last edited:
If you connect through telnet/ssh and do:

Code:
ps w | grep stats

Does cstats or rstats show with "--new" as argument? If yes then it means that for some reason the "reset database" flag is currently stuck. You can manually clear it this way:

Code:
nvram set cstats_new=0
nvram set rstats_new=0
nvram commit
reboot

See if after that it stops recreating the database.
 
When I executed the code the return on cstats and rstats was a blank value. Nothing flagged as new.
 
Are those data files growing, or are they staying at either 0 bytes or around 20-30 bytes after a few hours?

The presence of that .tmp file leads me to suspect that the router might be having trouble creating the updated database and copying it on top of the old one. What filesystem are you using? Make sure that the directory and the files in it are fully writable.
 
Yes file sizes do grow over time. Original file sizes:

tomato_cstats_74d02b400f98.gz file size 793B file date 7/13/2013
tomato_cstats_74d02b400f98.gz.tmp file size 407B file date 10/8/2013
tomato_rstats_74d02b400f98.gz file size 111B file date 10/8/2013

Just curious why the 1st file dated July 13 always shows up and then disappears and why the 2nd file has the same name as the 1st but appended with .tmp and that .tmp label never goes away.
 
Yes file sizes do grow over time. Original file sizes:

tomato_cstats_74d02b400f98.gz file size 793B file date 7/13/2013
tomato_cstats_74d02b400f98.gz.tmp file size 407B file date 10/8/2013
tomato_rstats_74d02b400f98.gz file size 111B file date 10/8/2013

Just curious why the 1st file dated July 13 always shows up and then disappears and why the 2nd file has the same name as the 1st but appended with .tmp and that .tmp label never goes away.

I wonder if your filesystem isn't corrupted since you're having odd issues with files appearing and disappearing. Plug the disk to a PC and run a chkdsk on it.

Normally, the firmware writes the .tmp file, and renames it to replace the old file afterward.
 
Fixed

Merlin,

I ran the check disk in windows and it fixed something. After plugging the HDD back into the router and rebooting the file from July did not show up and no files with the .tmp extension. That one was weird. With WinSCP and browsing the HDD in windows, while plugged into the router, everything appeared normal. Guess that first file was some kind of a ghost in the file allocation table. (running NTFS on the HDD btw) Anyway, now when I reboot the router my traffic data is not overwritten or missing! Thank you!!
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top