FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 10-31-2011, 02:43 AM
Nathan D'elboux
 
Default Verbose output from Daemons on startup

Hi All,
I have built a new Linux box recently, have been using Fedora for years so decided to stick with it and put Fedora 15 on it
I am familiar with strace and redirecting STOUT and STDERR for debugging apps on the CLI but what i am unfamiliar with is on bootup
When the list of daemons begin to start up and eventually gets the [OK] message i have 1 daemon that will hang
So my question is, is there some way whether it be by Console port or rescue disk can i get a verbose output of what the daemon is doing when*attempting*to boot up so i can verify what part exactly it is failing at?*
I want to possibly pipe all STOUT to another box via console or just on local screen but i want a verbose output so i can see more detail of what the kernel is doing on bootup behind the scenes
I tried explaining it as well as i could so i apologize if some people get confused. I can post any other details needed if need be like Specs etc
Thanks guys
Cheers,Nathan
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 10-31-2011, 03:22 AM
"T.C. Hollingsworth"
 
Default Verbose output from Daemons on startup

On Sun, Oct 30, 2011 at 8:43 PM, Nathan D'elboux <nafe27@hotmail.com> wrote:
> Hi All,
> I have built a new Linux box recently, have been using Fedora for years so
> decided to stick with it and put Fedora 15 on it
> I am familiar with strace and redirecting STOUT and STDERR for debugging
> apps on the CLI but what i am unfamiliar with is on bootup
> When the list of daemons begin to start up and eventually gets the [OK]
> message i have 1 daemon that will hang
> So my question is, is there some way whether it be by Console port or rescue
> disk can i get a verbose output of what the daemon is doing
> when*attempting*to boot up so i can verify what part exactly it is failing
> at?
> I want to possibly pipe all STOUT to another box via console or just on
> local screen but i want a verbose output so i can see more detail of what
> the kernel is doing on bootup behind the scenes

Usually its easier to debug daemon problems by just running them on
the command line. Look for the ExecStart line in
/lib/systemd/system/<name>.service or if it uses classic initscripts
check the corresponding file in /etc/init.d for the command that is
run. That way you can easily run it through strace if you need to.

That being said, on Fedora 16, systemd redirects stdout and stderr to
syslog, so you can view the output from the daemons in
/var/log/messages. Unfortunately, IIRCC F15 systemd does not do this,
so edit /etc/systemd/system.conf and add a line that says
"DefaultStandardOutput=syslog". The next time you boot, all daemons'
stdout and stderr will be stored in syslog so you can view it
afterward, either in /var/log/messages or with a viewer like
KSystemLog. Messages from the kernel are also stored there, so you
can see everything in one place.

You can also set DefaultStandardOutput to "syslog+console" to have it
output to the console as well, but that can be problematic because
systemd starts many services in parallel. (If you decide to do that,
make sure to remove "rhgb quiet" from your kernel command line as well
so Plymouth gets out of the way and kernel messages are printed to the
console also.)

It's also rather easy to run systemd native services through strace,
just run copy the .service file from /lib/systemd/system to
/etc/systemd/system and append strace the command on the ExecStart
line. When you're done, just rm the file in /etc and the one in /lib
will take back over. Classic initscripts are a little harder: you
have to find the appropriate line in the script and change it, and
then change it back when you're done.

> I tried explaining it as well as i could so i apologize if some people get
> confused. I can post any other details needed if need be like Specs etc
> Thanks guys
> Cheers,
> Nathan

-T.C.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 10-31-2011, 07:54 AM
suvayu ali
 
Default Verbose output from Daemons on startup

On Mon, Oct 31, 2011 at 05:22, T.C. Hollingsworth
<tchollingsworth@gmail.com> wrote:
> Usually its easier to debug daemon problems by just running them on
> the command line. *Look for the ExecStart line in
> /lib/systemd/system/<name>.service or if it uses classic initscripts
> check the corresponding file in /etc/init.d for the command that is
> run. *That way you can easily run it through strace if you need to.
>
> That being said, on Fedora 16, systemd redirects stdout and stderr to
> syslog, so you can view the output from the daemons in
> /var/log/messages. *Unfortunately, IIRCC F15 systemd does not do this,
> so edit /etc/systemd/system.conf and add a line that says
> "DefaultStandardOutput=syslog". *The next time you boot, all daemons'
> stdout and stderr will be stored in syslog so you can view it
> afterward, either in /var/log/messages or with a viewer like
> KSystemLog. *Messages from the kernel are also stored there, so you
> can see everything in one place.
>
> You can also set DefaultStandardOutput to "syslog+console" to have it
> output to the console as well, but that can be problematic because
> systemd starts many services in parallel. *(If you decide to do that,
> make sure to remove "rhgb quiet" from your kernel command line as well
> so Plymouth gets out of the way and kernel messages are printed to the
> console also.)
>
> It's also rather easy to run systemd native services through strace,
> just run copy the .service file from /lib/systemd/system to
> /etc/systemd/system and append strace the command on the ExecStart
> line. *When you're done, just rm the file in /etc and the one in /lib
> will take back over. *Classic initscripts are a little harder: *you
> have to find the appropriate line in the script and change it, and
> then change it back when you're done.
>

That is an amazingly clear "systemd debugging howto". Thanks a lot, I
have been putting off debugging ddclient because of my unfamiliarity
with systemd. Not any more.

PS: Have you considered putting this on the fedoraproject wiki?

--
Suvayu

Open source is the future. It sets us free.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 10-31-2011, 04:17 PM
Pete Travis
 
Default Verbose output from Daemons on startup

On Oct 31, 2011 2:54 AM, "suvayu ali" <fatkasuvayu+linux@gmail.com> wrote:

>

> On Mon, Oct 31, 2011 at 05:22, T.C. Hollingsworth

> <tchollingsworth@gmail.com> wrote:

> > Usually its easier to debug daemon problems by just running them on

> > the command line. *Look for the ExecStart line in

> > /lib/systemd/system/<name>.service or if it uses classic initscripts

> > check the corresponding file in /etc/init.d for the command that is

> > run. *That way you can easily run it through strace if you need to.

> >

> > That being said, on Fedora 16, systemd redirects stdout and stderr to

> > syslog, so you can view the output from the daemons in

> > /var/log/messages. *Unfortunately, IIRCC F15 systemd does not do this,

> > so edit /etc/systemd/system.conf and add a line that says

> > "DefaultStandardOutput=syslog". *The next time you boot, all daemons'

> > stdout and stderr will be stored in syslog so you can view it

> > afterward, either in /var/log/messages or with a viewer like

> > KSystemLog. *Messages from the kernel are also stored there, so you

> > can see everything in one place.

> >

> > You can also set DefaultStandardOutput to "syslog+console" to have it

> > output to the console as well, but that can be problematic because

> > systemd starts many services in parallel. *(If you decide to do that,

> > make sure to remove "rhgb quiet" from your kernel command line as well

> > so Plymouth gets out of the way and kernel messages are printed to the

> > console also.)

> >

> > It's also rather easy to run systemd native services through strace,

> > just run copy the .service file from /lib/systemd/system to

> > /etc/systemd/system and append strace the command on the ExecStart

> > line. *When you're done, just rm the file in /etc and the one in /lib

> > will take back over. *Classic initscripts are a little harder: *you

> > have to find the appropriate line in the script and change it, and

> > then change it back when you're done.

> >

>

> That is an amazingly clear "systemd debugging howto". Thanks a lot, I

> have been putting off debugging ddclient because of my unfamiliarity

> with systemd. Not any more.

>

> PS: Have you considered putting this on the fedoraproject wiki?


I have marked this thread.* I hope T.C. is interested in writing something up, since he clearly has a better understanding than I.* If not, I will. This is great info, thanks!

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 11:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org