systemd-analyze.xml revision 359deb60c25147e91a69c227ace686654ea7f484
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering This file is part of systemd.
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering Copyright 2012 Lennart Poettering
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering systemd is free software; you can redistribute it and/or modify it
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering under the terms of the GNU Lesser General Public License as published by
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering (at your option) any later version.
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering systemd is distributed in the hope that it will be useful, but
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering Lesser General Public License for more details.
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering You should have received a copy of the GNU Lesser General Public License
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <refentryinfo>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </authorgroup>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </refentryinfo>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <refentrytitle>systemd-analyze</refentrytitle>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <refpurpose>Analyze system boot-up performance</refpurpose>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <refsynopsisdiv>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <command>systemd-analyze <arg choice="opt" rep="repeat">OPTIONS</arg> time</command>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </cmdsynopsis>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <command>systemd-analyze <arg choice="opt" rep="repeat">OPTIONS</arg> blame </command>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </cmdsynopsis>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <command>systemd-analyze <arg choice="opt" rep="repeat">OPTIONS</arg> plot <arg choice="opt">> file.svg</arg></command>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </cmdsynopsis>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </refsynopsisdiv>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <para><command>systemd-analyze</command> may be used
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering to determine system boot-up performance of the current
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <para><command>systemd-analyze time</command>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering prints the time spent in the kernel before
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering userspace has been reached, the time spent in the
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering initial RAM disk (initrd) before normal system
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering userspace has been reached and the time normal system
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering userspace took to initialize. Note that these
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering measurements simply measure the time passed up to the
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering point where all system services have been spawned, but
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering not necessarily until they fully finished
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering initialization or the disk is idle.</para>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <para><command>systemd-analyze blame</command> prints
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering a list of all running units, ordered by the time they
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering took to initialize. This information may be used to
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering optimize boot-up times. Note that the output might be
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering misleading as the initialization of one service might
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering be slow simply because it waits for the initialization
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering of another service to complete.</para>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <para><command>systemd-analyze plot</command> prints
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering an SVG graphic detailing which system services have
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering been started at what time, highlighting the time they
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering spent on initialization.</para>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <para>If no command is passed <command>systemd-analyze
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <para>The following options are understood:</para>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <variablelist>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <varlistentry>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </varlistentry>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <varlistentry>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering of user sessions instead of the system
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </varlistentry>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering </variablelist>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <para>On success 0 is returned, a non-zero failure
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering code otherwise.</para>
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
359deb60c25147e91a69c227ace686654ea7f484Lennart Poettering <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>