Operating System - Linux
1752790 Members
6291 Online
108789 Solutions
New Discussion юеВ

shutdown and startup logging

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

shutdown and startup logging

Maybe I am missing something simple but.....

how to capture the boot/reboot logs ?

HPUX pushes all output of the scripts during shutdown and startup to /etc/rc.log

is there something similar in RHEL 5.x ?

once upon a time there linux used /var/log/boot.log but it looks depreciated .

any thoughts appreciated.

5 REPLIES 5
Matti_Kurkela
Honored Contributor
Solution

Re: shutdown and startup logging

This is a long-standing bug in RHEL5. For some reason, RedHat has tagged it as WONTFIX in RHEL 5.x series.

See the RedHat Bugzilla entry:
https://bugzilla.redhat.com/show_bug.cgi?id=223446

It includes a workaround, with a caveat that your console will be flooded with "WARNING: initlog is deprecated..." messages.

If you care enough, you might get the source RPM for the package that includes initlog, comment out the deprecation warning, and build yourself a custom binary RPM.

(That reminds me... one of these days I need to check if boot.log or something equivalent works in RHEL 6, and if the workaround is still applicable to RHEL 5.6 that just came out.)

MK
MK
dirk dierickx
Honored Contributor

Re: shutdown and startup logging

i'm thinking it must be possible to block those 'WARNING: initlog is deprecated and will be removed in a future release' messages from the console by redirecting error messages to /dev/null.

so the line (from the bugzilla entry);

initlog $INITLOG_ARGS -n $0 -s "$1" -e 1

would need to be;

initlog $INITLOG_ARGS -n $0 -s "$1" -e 1 2> /dev/null
Tim Nelson
Honored Contributor

Re: shutdown and startup logging

Thanks guys !!

I am doing some testing to see if I cannot simply tee the startups in /etc/rc.d/rc to a log files.

It may not be perfect but I am having an issue where 1 or more shutdown scripts is not running and I at least need to catch the message..

If that fails I may move onto what Matti mentioned, although I hate to add one more thing to my list that I have manually manage.

Will post any results if I find something.
Tim Nelson
Honored Contributor

Re: shutdown and startup logging

I was able to redirect some simple logging to a file during boot.

in /etc/rc add "|tee -a filename" (no quotes) to the end of the start and stop lines found in the "# Now run the START scripts" and the # # First, run the KILL scripts." sections.

and btw, I found my real issue with the help of this logging.

if /var/lock/subsys/<script_name> does not exist then the kill script will be skipped.

(at least on RHEL 5.3 and newer.)
Tim Nelson
Honored Contributor

Re: shutdown and startup logging

I found an alternate solution.

ILO2 and ILO3 have a screen recorder option.

enable in the settings section of remote console.

you will then have a "camera" icon in the top toolbar of your integrated console.

click to start recording and select a file location.

click again when you are done.

you can then use the HP ILO player (found on biz support site) to view your recording.