What's new

Keep more of syslog

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

szepe.viktor

New Around Here
I've noticed /tmp/syslog.log is copied to syslog.log-1 - maybe - daily.
How is it possible to keep more of syslog without copying it offsite?

Thank you for your help
 
Try
Code:
nvram set log_ipaddr=FQDN |IP
nvram set log_port=PORT
nvram commit

To syslog offsite, even on remote syslog facilities like papertrail.com
In case of remote syslog, you will loose the very early start of log, before the WAN is up & running, but it's not a big miss from my point of view..

BR,
Brouno
 
Thank you!

> ... without copying it offsite

Is there a solution to keep it on the router itself?

You can move syslog to a flash drive attached to the router..

http://www.snbforums.com/threads/system-log-to-usb-disk.8217/

I have a custom script that renames the logs so I can quickly review the effects of new scripts during reboots.

NOTE: I have so far never experienced a router crash although there have been a couple of power outages so hopefully if the router did crash there may be something useful saved on the flash drive, but who knows?

2015-06-19_15-41-28.png
 
I ended up in a cru job.

Code:
OLD_LOG="/tmp/syslog.log-1"
LOGS="/mnt/optware/log"

[ -f "$OLD_LOG" ] && mv "$OLD_LOG" "$LOGS"

# /jffs/scripts/init-start
# cru a syslogsave "10 12 * * *  /mnt/optware/root/syslogsave.sh"
 

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