If the machine crashes, I'd like to be able to read any kernel panic or other issue.
However, after a reboot, only the current one is available.
Is there a way to keep the previous one?
Thanks.
Both metalog and syslog-ng can log everything, including dmesg, if configured so. Otherwise, here's a quick'n'dirty hack you can put in rc.local:
dmesg -wHT >>/var/log/dmesg-prev.log &
[EDIT reason: added '&']
Thanks.
This is an option in bootmisc.
Edit /etc/conf.d/bootmisc to set
log_dmesg="yes"
previous_dmesg="yes"
Ah so this won't work with runit? Do you know if there is any built in solution? I suppose I could set up log rotation in `/etc/logrotate.conf` or `/etc/logrotate.d`