February 12, 201412 yr Twice in the last month I've experienced a random reboot of my server. When I've went to check the logs, I've noticed that the log is reset on reboot. Is that normal behavior? Is there a way to preserve the log between reboots?
February 12, 201412 yr There are a few ways to do this. copy the log periodically. here's a quote from an old thread. the parity check is because the array is rebooted without proper shut down, nothing you can do about it, it has nothing to do with the reason of the umavailability itself.Try the following to save your syslog:Create a file called savelog in the /config dir of your flashdrive, contents as follows: #!/bin/bash # save syslog cp /var/log/syslog /mnt/cache/syslog.txt Now add the following lines to your GO file: # Setting up savelog cp /boot/config/savelog /etc/cron.hourly/savelog chmod +x /etc/cron.hourly/savelog Now your syslog will be saved to your cachedrive every hour. Save it immediately after startup to avoid it getting written over. Another option is to edit the syslog.conf file and have it write as it's occuring. It can write to the flash or to the cache drive (or anywhere over the network). Another option is to update the syslog.conf file and have it duplicate messages to console on tty12 Then switch the virtual terminal to tty12 with alt-f12 (this is only useful if you have a monitor). Lastly, you can add a line in the /etc/syslog.conf and forward them to another syslog server i.e. windows or other linux machine.
Archived
This topic is now archived and is closed to further replies.