What's new

Solved Change Log Location

  • 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!

minimos

Occasional Visitor
Hi,

I've recently installed the GNuton build on my XT8 along with Skynet and FlexQOS. Everything seems stable however I noticed something that is concerning me re the location of sysylog.log.

I did a backup of the JFSS directory once everything was configured but I have noticed it contains versions of syslog which I though were wrote to /tmp. However I have logs surviving a reboot indicated by the time resetting to default between acitvity yesterday and today, before an ntp sync is done. I believe this behavior started after I installed Skynet

My understanding was that /tmp was stored in memory hence why it was always lost on reboot, but the fact it is on the routers flash memory worries me as it will quickly wear out the flash memory.

Is there a command I can run to check / change its location?

I have updated the logging to only critical stuff at the moment to avoid unnecessary writes
 
This is normal. The syslog files are written in /tmp but are periodically copied to /jffs. This is done deliberately so that they persist over reboots.

There is no concern over "wearing out" the flash memory used by /jffs. This has been discussed ad nauseam.
 
@ColinTaylor Thank you.

I tried searching for similar threads but could not find anything. Can you summarise why we should not have a concern, Flash has limited write cycles so if it is updating every minute like mine does I can imagine it would have an impact. Merlin even states on his Wiki that logging to this directory is not a good idea.

I'd also like to disable it if I can as I am not concerned with keeping logs between reboots and if I was I would send it to a syslog server instead
 
That wiki entry is years out of date (from 2015). I don't know why it's still there as RMerlin himself has stated repeatably since then that this is no longer an issue. The reason is that unlike the old routers (like the RT-N66U) all the recent/current routers use a type a flash memory that is spec'd so that wear will never be an issue. The memory will outlive the usefulness of the router.

The syslog is not updating every minute. The live syslog is written to /tmp. Periodically these files are copied to /jffs. However, the contents of the /jffs filesystem is compressed and cached so even though it might look like there's constant writing to the flash memory there really isn't.

You could stop the logger (service stop_logger) but I suspect that will prevent Skynet from working as IIRC it scrapes the syslog for information.
 
Last edited:
That wiki entry is years out of date (from 2015). I don't know why it's still there as RMerlin himself has stated repeatably since then that this is no longer an issue. The reason is that unlike the old routers (like the RT-N66U) all the recent/current routers use a type a flash memory that is spec'd so that wear will never be an issue. The memory will outlive the usefulness of the router.

The syslog is not updating every minute. The live syslog is written to /tmp. Periodically these files are copied to /jffs. However, the contents of the /jffs filesystem is compressed and cached so even though it might look like there's constant writing to the flash memory there really isn't.

You could stop the logger (service stop_logger) but I suspect that will prevent Skynet from working as IIRC it scrapes the syslog for information.
Thank you for the detailed write up.

I fully understand why its not considered an issue on flash wear now. However, it would be great if the end user could stipulate whether this activity takes place or maybe allowing us to move the jffs location to USB, ideally both options would be best. I usually take the prudent view of trying to conserve things even though it might be overkill.

It is also different behavior to stock Asus WRT as that does not have the jfss partition enabled in firmware so can't create a copy of the log to survive reboot. As you say it will have been doing this and I only noticed as I was backing stuff up now I have the router set up how I want and it was in the zip file produced.

I've decided to limit the amount of logging in the WebUI to warning and above, and also switched it off completely in Skynet as it is redundant if you only log warnings. I can always enable to troubleshoot if needed
 
I'm not aware of any Asus routers running stock firmware don't have jffs enabled (although personally I've never used an XT8). Not only is it used to store persistent logs but Asus makes use of it for things like AiProtection, custom icons, extended nvram, notification centre, signature files, etc. Without a jffs partition the router won't work properly.
 
Thanks.

You could very well be correct. However I do know that before flashing to Merlin when I ssh into the router there was no jfss directory.

It could be my limited knowledge of Linux and perhaps it was hidden from the end user. If that is the case, what does the check flag for enabling jfss actually do in Merlin if its already enabled?
 
It could be my limited knowledge of Linux and perhaps it was hidden from the end user. If that is the case, what does the check flag for enabling jfss actually do in Merlin if its already enabled?
That option has been removed. It was a legacy setting that is no longer appropriate given the reasons above.
 
Interesting.

Its definitely got the flag in the WebUI on my router, but I did a dirty upgrade from stock so maybe that has something to so with it.

Its really useful getting your insights into this @ColinTaylor, I really appreciate the information as it helps me grow and understand the system
 
Its definitely got the flag in the WebUI on my router, but I did a dirty upgrade from stock so maybe that has something to so with it.
Are you sure there's an option to enable/disable the jffs partition? Maybe it's something specific to GNuton's fork. Or maybe you are confusing it with the custom scripts and configs option?

Untitled.png
 
Use the following commands to change the syslog to a usb driver or just to /tmp (if you don't care about it)

Code:
nvram set log_path=/tmp #or your usb driver
nvram commit
rm /jffs/syslog.log; mkdir /jffs/syslog.log #remove and prevent continued log writing in jffs
 
Are you sure there's an option to enable/disable the jffs partition? Maybe it's something specific to GNuton's fork. Or maybe you are confusing it with the custom scripts and configs option?

View attachment 40838
You are correct I am confusing that flag with emblematic, but I am pretty sure the directory was not visible on stock.

@Yota Thank you for the nvram setting I will give it a go. Will the setting survive factory rest or firmware upgrade?
 
You are correct I am confusing that flag with emblematic, but I am pretty sure the directory was not visible on stock.

@Yota Thank you for the nvram setting I will give it a go. Will the setting survive factory rest or firmware upgrade?
They will remain after an upgrade, but if you do a factory reset, everything will go back to default.

Or you can manually revert the changes without a factory reset:
Code:
rm -rf /jffs/syslog.log #delete write-protected folder
nvram set log_path=/jffs #re-set the write location to jffs
nvram commit
 
They will remain after an upgrade, but if you do a factory reset, everything will go back to default.

The way to manually revert the changes is to enter the following commands:
Code:
rm -rf /jffs/syslog.log #delete write-protected folder
nvram set log_path=/jffs #re-set the write location to jffs
nvram commit
Wonderful, everyday is a school day.

I'll give it a try.

Thank you so much
 
I have made the changes today @Yota and they worked a treat.

No more writes to the flash for logging.

I really appreciate the discussion from @ColinTaylor and solution from @Yota, hope others may find this thread and be of use to them
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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