chiark / gitweb /
journalctl: add --user-unit= switch
[elogind.git] / man / systemd-analyze.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2012 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd-analyze">
25
26         <refentryinfo>
27                 <title>systemd-analyze</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>systemd-analyze</refentrytitle>
42                 <manvolnum>1</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd-analyze</refname>
47                 <refpurpose>Analyze system boot-up performance</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <cmdsynopsis>
52                         <command>systemd-analyze <arg choice="opt" rep="repeat">OPTIONS</arg> time</command>
53                 </cmdsynopsis>
54                 <cmdsynopsis>
55                         <command>systemd-analyze <arg choice="opt" rep="repeat">OPTIONS</arg> blame </command>
56                 </cmdsynopsis>
57                 <cmdsynopsis>
58                         <command>systemd-analyze <arg choice="opt" rep="repeat">OPTIONS</arg> plot <arg choice="opt">&gt; file.svg</arg></command>
59                 </cmdsynopsis>
60                 <cmdsynopsis>
61                         <command>systemd-analyze <arg choice="opt" rep="repeat">OPTIONS</arg> dot </command>
62                 </cmdsynopsis>
63         </refsynopsisdiv>
64
65         <refsect1>
66                 <title>Description</title>
67
68                 <para><command>systemd-analyze</command> may be used
69                 to determine system boot-up performance of the current
70                 boot.</para>
71
72                 <para><command>systemd-analyze time</command>
73                 prints the time spent in the kernel before
74                 userspace has been reached, the time spent in the
75                 initial RAM disk (initrd) before normal system
76                 userspace has been reached and the time normal system
77                 userspace took to initialize. Note that these
78                 measurements simply measure the time passed up to the
79                 point where all system services have been spawned, but
80                 not necessarily until they fully finished
81                 initialization or the disk is idle.</para>
82
83                 <para><command>systemd-analyze blame</command> prints
84                 a list of all running units, ordered by the time they
85                 took to initialize. This information may be used to
86                 optimize boot-up times. Note that the output might be
87                 misleading as the initialization of one service might
88                 be slow simply because it waits for the initialization
89                 of another service to complete.</para>
90
91                 <para><command>systemd-analyze plot</command> prints
92                 an SVG graphic detailing which system services have
93                 been started at what time, highlighting the time they
94                 spent on initialization.</para>
95
96                 <para><command>systemd-analyze dot</command>
97                 Generate textual dependency graph description in dot
98                 format for further processing with the GraphViz
99                 <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
100                 tool. Use a command line like <command>systemd-analyze
101                 dot | dot -Tsvg > systemd.svg</command> to generate
102                 a graphical dependency tree. Unless
103                 <option>--order</option> or <option>--require</option>
104                 is passed the generated graph will show both ordering
105                 and requirement dependencies.</para>
106
107                 <para>If no command is passed <command>systemd-analyze
108                 time</command> is implied.</para>
109
110         </refsect1>
111
112         <refsect1>
113                 <title>Options</title>
114
115                 <para>The following options are understood:</para>
116
117                 <variablelist>
118                         <varlistentry>
119                                 <term><option>-h</option></term>
120                                 <term><option>--help</option></term>
121
122                                 <listitem><para>Prints a short help
123                                 text and exits.</para></listitem>
124                         </varlistentry>
125
126                         <varlistentry>
127                                 <term><option>--user</option></term>
128
129                                 <listitem><para>Shows performance data
130                                 of user sessions instead of the system
131                                 manager.</para></listitem>
132                         </varlistentry>
133
134                         <varlistentry>
135                                 <term><option>--order</option></term>
136                                 <term><option>--require</option></term>
137
138                                 <listitem><para>When used in
139                                 conjunction with the
140                                 <command>dot</command> command (see
141                                 above), selects which dependencies are
142                                 shown in the dependency graph. If
143                                 <option>--order</option> is passed
144                                 only dependencies of type
145                                 <varname>After=</varname> or
146                                 <varname>Before=</varname> are
147                                 shown. If <option>--require</option>
148                                 is passed only dependencies of type
149                                 <varname>Requires=</varname>,
150                                 <varname>RequiresOverridable=</varname>,
151                                 <varname>Requisite=</varname>,
152                                 <varname>RequisiteOverridable=</varname>,
153                                 <varname>Wants=</varname> and
154                                 <varname>Conflicts=</varname> are
155                                 shown. If neither is passed, shows
156                                 dependencies of all these
157                                 types.</para></listitem>
158                         </varlistentry>
159                 </variablelist>
160
161         </refsect1>
162
163         <refsect1>
164                 <title>Exit status</title>
165
166                 <para>On success 0 is returned, a non-zero failure
167                 code otherwise.</para>
168         </refsect1>
169
170         <refsect1>
171                 <title>See Also</title>
172                 <para>
173                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
174                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
175                 </para>
176         </refsect1>
177
178 </refentry>