Bugzilla – Bug 15311
keep more, larger syslog files if using /media/*/log/ directories
Last modified: 2010-04-08 17:25:37 UTC
fab4 PB2 currently running 7.5.0 r8224 I'm trying to track down a bug, but the syslog messages file is too chatty -- with the default setting of rotating every 1000 KB, I only get about 45 minutes of log data before it's rotated. The bug I'm looking at tends to occur after hours of idle/off time, so I need about 24 hours of log data. I think /etc/init.d/rcS should be modified to write larger log files (10 MB) and keep more of them (9 backups rather than just 1) if using attached media. With SD cards typically holding between 2 and 16 GB, I think it's reasonable to expect that users can devote 100 MB (1 live file, 9 backups) to SqueezeOS logs. I'd suggest changing this in rcS # Start syslogd if [ -e /media/*/log ]; then # log and core files to media LOG_DIR=`echo /media/*/log` echo "Starting syslogd (to $LOG_DIR)" /sbin/syslogd -S -s1000 -O $LOG_DIR/messages to something like # Start syslogd if [ $(ls -d /media/*/log | wc -l) -gt 0 ]; then # log and core files to media LOG_DIR=`echo /media/*/log | head -1` echo "Starting syslogd (to $LOG_DIR)" /sbin/syslogd -S -s10240 -O $LOG_DIR/messages -b 9 (Note I'm also being more careful when setting LOG_DIR to ensure that only the first /media/*/log directory is used, and that the script's test won't choke if there are "log" directories on two different mounted media. I don't know if USB and SD are mounted before this runs, but it seems prudent to be more careful here.) For the time being, I manually killed syslogd and spawned a new instance with the desired command line args. Thanks.
The idea makes sense to me. If someone has created a log directory on their SD/USB cards then most likely they are interested in the log files and they have enough knowledge to track the potential problems. I will add the support.
With the current implementation of the syslogd in busybox it does not seem feasible to run multiple syslogd that function properly or redirecting the output to multiple files. Also it is not feasible to keep the older files in compressed format. I was hoping to find an easy way to persist the log files under all the devices that are interested in the logs including USB/SD. I will check in my changes that will redirect the logs to the first log directory that is found under /media if any available.
The maximum size that will be captured is 60MB to facilitate the potential capturing of the log files on the NAND flash.
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release. If you are still seeing this issue, please let us know!