What's new

View log from admin lost after moving log to USB

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

rdy2

Regular Contributor
A couple of years ago I developed scripts to move the syslog to USB and to consolidate logs in weekly files. It is still working on an RT-AC68U under 384.3, and have no problem viewing the system log via the WEB admin GUI.

Now, I have a second router, an RT-AC86U (384.14_2) connected LAN to WAN with the old one, with just one notebook and one IOT. I am trying to learn ebtables/iptables and causing a lot of logging. Today I decided to manually move the log:
Code:
killall syslogd; syslogd -m 0 -l 7 -b 1 -s 256 -O /tmp/mnt/RT86V2/logs/syslog.log
The log moved fine, but lost the GUI does not show it anymore.
Puzzled by this, I checked NVRAM and found variable log_path set to /jffs. I changed it
Code:
nvram set log_path=/tmp/mnt/RT86V2/logs
nvram commit
but did not make a difference.
When this did break? And more important, is there a way around it?
 
Three things:

1. The web page looks to /tmp/syslog.log. Change that to a symlink to your new location and it will probably show up.
2. Look at the scribe and uiScribe threads, which will do what you want and tons more. Not a long learning curve due to @cmkelley's efforts.
3. The firmware saves a copy of the syslog to that location, but that isn't where the web page looks, so that is probably why it isn't working for you. Personally, I wouldn't interfere with nvram variables like that.
 
A couple of years ago I developed scripts to move the syslog to USB and to consolidate logs in weekly files. It is still working on an RT-AC68U under 384.3, and have no problem viewing the system log via the WEB admin GUI.

Now, I have a second router, an RT-AC86U (384.14_2) connected LAN to WAN with the old one, with just one notebook and one IOT. I am trying to learn ebtables/iptables and causing a lot of logging. Today I decided to manually move the log:
Code:
killall syslogd; syslogd -m 0 -l 7 -b 1 -s 256 -O /tmp/mnt/RT86V2/logs/syslog.log
The log moved fine, but lost the GUI does not show it anymore.
Puzzled by this, I checked NVRAM and found variable log_path set to /jffs. I changed it
Code:
nvram set log_path=/tmp/mnt/RT86V2/logs
nvram commit
but did not make a difference.
When this did break? And more important, is there a way around it?
I've never done it your way so I can't tell you when it "broke".

Did you try restarting the httpd daemon after changing the log location with the nvram setting? That's the only thing I can think of. Also if you use Skynet it will break any symlink to /tmp/syslog.log every hour. That's unavoidable. As @elorimer said, scribe takes care of all that by setting up syslog-ng (and logrotate), and moving the Skynet logs to their own logfile.
 

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