Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-13-2006, 09:11 PM
|
#1
|
LQ Newbie
Registered: Apr 2006
Posts: 5
Rep:
|
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.
|
|
|
04-13-2006, 10:55 PM
|
#2
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
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?
|
|
|
04-14-2006, 03:26 PM
|
#3
|
LQ Newbie
Registered: Apr 2006
Posts: 5
Original Poster
Rep:
|
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.
|
|
|
04-14-2006, 06:41 PM
|
#4
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
Did you ever try <Shift> <PageUp> once you see the prompt?
Eric
|
|
|
04-15-2006, 11:56 AM
|
#5
|
LQ Newbie
Registered: Apr 2006
Posts: 5
Original Poster
Rep:
|
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...
|
|
|
04-15-2006, 11:59 AM
|
#6
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
dmesg > out.txt
|
|
|
04-15-2006, 11:20 PM
|
#7
|
LQ Newbie
Registered: Sep 2005
Posts: 9
Rep:
|
There's other logs to look at. /var/log/messages and /var/log/syslog
-G
|
|
|
04-16-2006, 11:30 PM
|
#8
|
LQ Newbie
Registered: Apr 2006
Posts: 5
Original Poster
Rep:
|
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.
|
|
|
04-17-2006, 12:09 AM
|
#9
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
AFAIK, these logs are the only way to capture any boot process messages.
|
|
|
04-18-2006, 01:00 AM
|
#10
|
LQ Newbie
Registered: Mar 2006
Posts: 1
Rep:
|
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
|
|
|
04-18-2006, 02:01 AM
|
#11
|
LQ Newbie
Registered: Sep 2005
Posts: 9
Rep:
|
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 08:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|