[systemd-devel] [HEADSUP] systemd-analyze in git

Chen Jie chenj at lemote.com
Thu Apr 14 02:21:04 PDT 2011


Good utility, thanks.

2011/3/31 Lennart Poettering <lennart at poettering.net>

> Heya,
>
> I just added "systemd-analyze" to git. It's a little Python tool which
> can help you figuring out why your boot is not as fast as it could be.
>
> If you run "systemd-analyze blame" it will print a list of all units
> that have been started since boot, ordered by the time they took to
> start up. If your service appears right at the top of the list, then
> there's probably something to fix. But don't misunderstand this tool. It
> will simply look how long each service took to start, it doesn't give
> you any hint on why it did take so long. For example it could be because
> the service was waiting for another service or for user input (for
> example in the cryptsetup case). So, take the output with a grain of
> salt and then it is quite interesting. Let the blame game begin!
>
> If you run "systemd-analyze plot > plot.svg && eog plot.svg" then you'll
> look at a graphical plot of the boot processes showing how long we had
> to had to wait for which unit to start up. The startup time will be
> visible as a bright red bar. The runtime of a unit will be shown in
> light pink. The output is a bit like bootchart, but on a very different
> level, as this tells you something about the ordering and the units in
> systemd. To optimize your boot process you probably want to look at both
> outputs.
>
> For this to work properly you need to run systemd from git. Older
> versions of systemd do not keep track of timestamps properly, and this
> is fixed in git.
>
> On an older X300 with SSD and a reasonably complete Linux installation
> systemd needs less than 1s to spawn all services at boot and enter idle
> mode. If your installation takes longer, then you probably have a lot of
> room for optimization. (1s to idle does not mean the bootup was
> complete. It just means systemd started all processes it needed to start
> and the machine might still be busy with those. But early boot/fsck and
> stuff is all finished as are all SysV scripts, and graphical.target is
> reached).
>
> Lennart
>
> --
> Lennart Poettering - Red Hat, Inc.
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110414/1833064c/attachment.html>


More information about the systemd-devel mailing list