Logging output of /etc/rc.d init scripts
I know I can use dmesg to view the output of the kernel system log.
But once the kernel has booted, and init is called to read /etc/inittab, all the output of the initialization scripts (eg, /etc/rc.d/rc.S, /etc/rc.d/rc.M, etc) scrolls by so fast that I can't follow all of it. I'd like to be able to review it after the system boots. As for as I can tell, all the output of those initialization scripts is "lost". Is there some way to save or retrieve the output of the initialization shell scripts so I can look at it after the system has booted? Walt. |
dmesg doesn't just show kernel output... Essentially all of the output from the boot process should be in dmesg. Is there something in particular you're looking for?
|
I'm looking for all of the standard output and standard error
from the init scripts. For example, the first echo statement in /etc/rc.d/rc.M is "Going multiuser...". dmesg does not capture the echo statements (or more importantly, and stderr) from the init scripts. They scroll off the screen so quickly that you can't read or retrieve them. I'd like to be able to save them all somehow. |
Did you ever try <Shift> <PageUp> once you see the prompt?
Eric |
No, I had never tried that, and it does allow me to see all the messages.
Thanks! However, I still would really like to save them all to a file somehow. I still don't know how to do that, but this is certainly better than never seeing them at all... If anyone knows how to save them to a file I'd appreciate it if you could tell me how... |
dmesg > out.txt
|
There's other logs to look at. /var/log/messages and /var/log/syslog
-G |
dmesg output, /var/log/messages, and /var/log/syslog do not contain the
stderr/stdout of the initialization scripts. That is why I started this thread. For example, as stated above, /etc/rc.d/rc.M echoes out the string "Going Multiuser...". dmesg, /var/log/messages,and /var/log/syslog do not show that string. I'd like to capture it to a file. I'm really looking to capture the stderr, but stdin would be nice to. |
AFAIK, these logs are the only way to capture any boot process messages.
|
I have noticed that my dmesg, messages and syslog do not contain init script output either.. is it a config option some where to log this stuff? There has got to be a way to dump the <SHIFT> <PAGEUP> buffer to a file.. I'd like to know too.
Thanks, -Eric |
I think the easiest way to dump the output of the rc scripts is to edit each script and add a redirect (>>, NOT > if you plan on logging all rc output to a single file).
|
All times are GMT -5. The time now is 04:28 PM. |