<p><br>
On Oct 31, 2011 2:54 AM, &quot;suvayu ali&quot; &lt;<a href="mailto:fatkasuvayu%2Blinux@gmail.com">fatkasuvayu+linux@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On Mon, Oct 31, 2011 at 05:22, T.C. Hollingsworth<br>
&gt; &lt;<a href="mailto:tchollingsworth@gmail.com">tchollingsworth@gmail.com</a>&gt; wrote:<br>
&gt; &gt; Usually its easier to debug daemon problems by just running them on<br>
&gt; &gt; the command line.  Look for the ExecStart line in<br>
&gt; &gt; /lib/systemd/system/&lt;name&gt;.service or if it uses classic initscripts<br>
&gt; &gt; check the corresponding file in /etc/init.d for the command that is<br>
&gt; &gt; run.  That way you can easily run it through strace if you need to.<br>
&gt; &gt;<br>
&gt; &gt; That being said, on Fedora 16, systemd redirects stdout and stderr to<br>
&gt; &gt; syslog, so you can view the output from the daemons in<br>
&gt; &gt; /var/log/messages.  Unfortunately, IIRCC F15 systemd does not do this,<br>
&gt; &gt; so edit /etc/systemd/system.conf and add a line that says<br>
&gt; &gt; &quot;DefaultStandardOutput=syslog&quot;.  The next time you boot, all daemons&#39;<br>
&gt; &gt; stdout and stderr will be stored in syslog so you can view it<br>
&gt; &gt; afterward, either in /var/log/messages or with a viewer like<br>
&gt; &gt; KSystemLog.  Messages from the kernel are also stored there, so you<br>
&gt; &gt; can see everything in one place.<br>
&gt; &gt;<br>
&gt; &gt; You can also set DefaultStandardOutput to &quot;syslog+console&quot; to have it<br>
&gt; &gt; output to the console as well, but that can be problematic because<br>
&gt; &gt; systemd starts many services in parallel.  (If you decide to do that,<br>
&gt; &gt; make sure to remove &quot;rhgb quiet&quot; from your kernel command line as well<br>
&gt; &gt; so Plymouth gets out of the way and kernel messages are printed to the<br>
&gt; &gt; console also.)<br>
&gt; &gt;<br>
&gt; &gt; It&#39;s also rather easy to run systemd native services through strace,<br>
&gt; &gt; just run copy the .service file from /lib/systemd/system to<br>
&gt; &gt; /etc/systemd/system and append strace the command on the ExecStart<br>
&gt; &gt; line.  When you&#39;re done, just rm the file in /etc and the one in /lib<br>
&gt; &gt; will take back over.  Classic initscripts are a little harder:  you<br>
&gt; &gt; have to find the appropriate line in the script and change it, and<br>
&gt; &gt; then change it back when you&#39;re done.<br>
&gt; &gt;<br>
&gt;<br>
&gt; That is an amazingly clear &quot;systemd debugging howto&quot;. Thanks a lot, I<br>
&gt; have been putting off debugging ddclient because of my unfamiliarity<br>
&gt; with systemd. Not any more. :)<br>
&gt;<br>
&gt; PS: Have you considered putting this on the fedoraproject wiki?</p>
<p>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!</p>