[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to debug systemd unit problems?



On 2014-04-28 05:50, Michael Biebl wrote:
>> With a regular init script, I am used to doing the following:
>> bash -x /etc/init.d/foo
>>
>> How do I do something similar with a systemd unit? I can't figure out
>> how to find any indication of what programs are actually being run in
>> order to fulfill a unit.
> 
> See
> http://freedesktop.org/wiki/Software/systemd/Debugging/
> if you want to debug/diagnose such problems.
> 
> You can also inspect the units via
> systemctl status foo.{device,service,...}
> systemctl show foo.{device,service,...}

Thanks; I did find that page earlier. It has a very nice example of
"systemctl status" showing some helpful information that just wasn't
there when I ran it. :)

I get the impression the unit was just waiting for the device to appear,
rather than running any particular program, which would have failed
quickly rather than time out.

I haven't tried "systemctl show". I'll reproduce the problem this
evening and give the output of those two commands.

> Yeah, a broken fstab configuration is more likely to be noticed under
> systemd. With sysvinit the initscripts did not wait for any devices to
> show up but simply mount what is available when the script is called
> during boot. That's why you never noticed the broken fstab before.
> 
> Fwiw, I consider the systemd behaviour in that regard more correct /
> preferrable.

Me too, in general; I just wish there were some more useful output on
failure. Maybe it will all seem obvious to me once I get more familiar
with systemd--I'm very much in the newbie phase right now.

Thanks,
Corey


Reply to: