WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOVLED] Saving log files ?  (Read 6477 times)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
[SOVLED] Saving log files ?
« 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.
« Last Edit: May 29, 2013, 05:22:32 PM by remus »
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11229
Re: Saving log files ?
« Reply #1 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

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Saving log files ?
« Reply #2 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 ?
Live long and prosper.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10963
Re: Saving log files ?
« Reply #3 on: May 29, 2013, 03:09:12 AM »
Yes, busybox klogd passes the kernel messages to syslogd.
The only barriers that can stop you are the ones you create yourself.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Saving log files ?
« Reply #4 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.
Live long and prosper.