LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Logging output of /etc/rc.d init scripts (https://www.linuxquestions.org/questions/slackware-14/logging-output-of-etc-rc-d-init-scripts-434955/)

damtor00 04-13-2006 08:11 PM

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.

mdarby 04-13-2006 09:55 PM

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?

damtor00 04-14-2006 02:26 PM

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.

Alien Bob 04-14-2006 05:41 PM

Did you ever try <Shift> <PageUp> once you see the prompt?

Eric

damtor00 04-15-2006 10:56 AM

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...

mdarby 04-15-2006 10:59 AM

dmesg > out.txt

geskorup 04-15-2006 10:20 PM

There's other logs to look at. /var/log/messages and /var/log/syslog

-G

damtor00 04-16-2006 10:30 PM

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.

mdarby 04-16-2006 11:09 PM

AFAIK, these logs are the only way to capture any boot process messages.

Maximo 04-18-2006 12:00 AM

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

geskorup 04-18-2006 01:01 AM

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.