On Sat, Sep 10, 2016 at 6:17 AM, Pathangi Janardhanan <[email protected]>
wrote:

> Hi All,
>
>  What is the best option to do some debug/analysis of the system and the
> services started by systemd during initial bootup?
>
>  I would like to use tools like perf and strace etc. on some of the
> services. I could do this by starting the service manually but would like
> to have all the services that start at bootup and was wondering if there is
> a way for me to do this sort of thing, just for the initial boot up time.
>

One possible method is, boot with `init=/bin/sh`, then in the shell run:

    exec strace -D -f -o /tmp/strace.log /usr/lib/systemd/systemd

Alternatively, for both perf and strace, make a .service with
{Before=sysinit.target, DefaultDependencies=no} that attaches to pid 1:

    ExecStart=/bin/strace -p 1 -f -o /tmp/strace.log

-- 
Mantas Mikulėnas <[email protected]>
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to