In OS 12.1, is there a way to enable shutdown logging?
In Ubuntu it can be done by settings in /etc/default/bootlogd but that doesn’t exist in OS 12.1 and I haven’t been able to find any reference to bootlogd anywhere. It isn’t available in Yast2 > Services or sysconfig editor.
Thanks and Happy New Year, Tom
Look at */var/log/boot.msg *and /var/log/boot.omsg. If you want to store them try man 8 logrotate.
That is very interesting info about logrotate. It was not clear to me if logrotate must be autostarted on each PC restart or just what causes it to read its configuration files to rotate your logs. Have you been using this application yourself?
Thank You,
I just edit or add (using an existing one as a template) a file in* /etc/logrotate.d* when I want to change the behaviour.* logrotate* is not a daemon, it reads the configuration files each time it is run.
From man 8 logrotate
DESCRIPTION
logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compres-
sion, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.
Normally, logrotate is run as a daily cron job. It will not modify a log multiple times in one day unless the criterium for that log is
based on the log's size and logrotate is being run multiple times each day, or unless the -f or -force option is used.
Very good eng-int and thanks for your help here. It is very much appreciated!
Thank You,
After perusing those files I wasn’t able to find anything relevant to SHUTDOWN, only STARTUP information. Also, looking at the manpage for logrotate, it doesn’t seem to offer any method of starting a shutdown log.
Is there a way of redirecting console output to a file during shutdown?
Thanks, Tom
/var/log/boot.msg should contain console messages fo rth current session.
/var/log/boot.omsg should contain console messages fo rth previous session.
The current session can only contain the startup messages. The previous session log should contain both startup and shutdown messages.
Of course if you are using systemd in 12.1 lots of stuff concerned with starting and stopping do not work properly.
So if tail -70 /var/log/boot.omsg does not show a shutdown sequence, the first thing to do is to abandon systemd. As far as I can tell, systemd is a “fashion” change to unreliable complexity with no, or minimal, benefit to the user.
In grub add the kernel parameter init=/sbin/sysvinit and check that sysvinit and sysvinit-init packages are installed.