Tiny Core Linux

Tiny Core Base => TCB Tips & Tricks => Topic started by: remus on May 28, 2013, 06:25:46 PM

Title: [SOVLED] Saving log files ?
Post by: remus on May 28, 2013, 06:25:46 PM
I have remastered microcore boot cd to include syslog bootcode, however If the system reboots, any helpful information that may have been in /var/log/messages is lost.

What is the best way to keep copies of this file that will survive a reboot ?

All comments and suggestions welcome.
Title: Re: Saving log files ?
Post by: Rich on May 28, 2013, 06:46:11 PM
Hi remus
You could start syslog in bootlocal instead of using the boot code. This will allow you to specify a persistent directory.
For more info:
Code: [Select]
syslogd --help
Title: Re: Saving log files ?
Post by: remus on May 28, 2013, 10:18:50 PM
Thanks for input Rich,

I've achieved my goals with the following.

Added to /opt/bootlocal.sh
Code: [Select]
sudo syslogd -O /mnt/sda1/messages
sudo klogd

In case anyone else is interested, syslogd can be stopped with
sudo killall syslogd

I'm wondering if klogd and syslogd save output to the same file in microcore/tinycore ?
Title: Re: Saving log files ?
Post by: curaga on May 29, 2013, 03:09:12 AM
Yes, busybox klogd passes the kernel messages to syslogd.
Title: Re: Saving log files ?
Post by: remus on May 29, 2013, 04:45:05 PM
Ahh, ok so klogd passes kernel messages to syslogd which in turn writes to the log file, thanks.