LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 04-13-2006, 09:11 PM   #1
damtor00
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Rep: Reputation: 0
Question 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.
 
Old 04-13-2006, 10:55 PM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
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?
 
Old 04-14-2006, 03:26 PM   #3
damtor00
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 04-14-2006, 06:41 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,384

Rep: Reputation: Disabled
Did you ever try <Shift> <PageUp> once you see the prompt?

Eric
 
Old 04-15-2006, 11:56 AM   #5
damtor00
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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...
 
Old 04-15-2006, 11:59 AM   #6
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
dmesg > out.txt
 
Old 04-15-2006, 11:20 PM   #7
geskorup
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Rep: Reputation: 0
There's other logs to look at. /var/log/messages and /var/log/syslog

-G
 
Old 04-16-2006, 11:30 PM   #8
damtor00
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 04-17-2006, 12:09 AM   #9
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
AFAIK, these logs are the only way to capture any boot process messages.
 
Old 04-18-2006, 01:00 AM   #10
Maximo
LQ Newbie
 
Registered: Mar 2006
Posts: 1

Rep: Reputation: 0
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
 
Old 04-18-2006, 02:01 AM   #11
geskorup
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Rep: Reputation: 0
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
init scripts lvgandhi Debian 2 10-11-2005 03:44 AM
New init scripts? xconspirisist Fedora 9 12-09-2004 12:41 PM
Bootsplash init scripts TheRepublican Slackware 5 05-11-2004 03:13 AM
Scripts in /etc/rc.d/init.d correro Linux - General 1 03-13-2003 10:47 PM
slack init scripts gui10 Slackware 11 05-15-2002 12:12 PM


All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration