]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-bootchart.xml
man: document that the passive units cannot be pulled in mnaully
[thirdparty/systemd.git] / man / systemd-bootchart.xml
CommitLineData
83fdc450
AK
1<?xml version='1.0'?> <!--*-nxml-*-->
2<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6<!--
7 This file is part of systemd.
8
9 Copyright 2012 Intel Corporation
10
11 Authors:
12 Auke Kok <auke-jan.h.kok@intel.com>
57976066 13 William Giokas <1007380@gmail.com>
83fdc450
AK
14
15 systemd is free software; you can redistribute it and/or modify it
16 under the terms of the GNU Lesser General Public License as published by
17 the Free Software Foundation; either version 2.1 of the License, or
18 (at your option) any later version.
19
20 systemd is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 Lesser General Public License for more details.
24
25 You should have received a copy of the GNU Lesser General Public License
26 along with systemd; If not, see <http://www.gnu.org/licenses/>.
27-->
28
56ba3c78 29<refentry id="systemd-bootchart" conditional='ENABLE_BOOTCHART'>
83fdc450
AK
30 <refentryinfo>
31 <title>systemd-bootchart</title>
32 <productname>systemd</productname>
33
34 <authorgroup>
35 <author>
36 <contrib>Developer</contrib>
37 <firstname>Auke</firstname>
38 <surname>Kok</surname>
39 <email>auke-jan.h.kok@intel.com</email>
40 </author>
41 </authorgroup>
42 </refentryinfo>
43
44 <refmeta>
45 <refentrytitle>systemd-bootchart</refentrytitle>
46 <manvolnum>1</manvolnum>
47 </refmeta>
48
49 <refnamediv>
50 <refname>systemd-bootchart</refname>
f1c24fea 51 <refpurpose>Boot performance graphing tool</refpurpose>
83fdc450
AK
52 </refnamediv>
53
54 <refsect1>
55 <title>Description</title>
f1c24fea
ZJS
56 <para>
57 <command>systemd-bootchart</command> is a
58 tool, usually run at system startup, that
59 collects the CPU load, disk load, memory
60 usage, as well as per-process information from
61 a running system. Collected results are output
62 as an SVG graph. Normally, systemd-bootchart
63 is invoked by the kernel by passing
64 <option>init=<filename>/usr/lib/systemd/systemd-bootchart</filename></option>
65 on the kernel commandline. systemd-bootchart will then
66 fork the real init off to resume normal system
67 startup, while monitoring and logging startup
68 information in the background.
69 </para>
70 <para>
71 After collecting a certain amount of data
72 (usually 15-30 seconds, default 20 s) the
73 logging stops and a graph is generated from
74 the logged information. This graph contains
75 vital clues as to which resources are being used,
76 in which order, and where possible problems
77 exist in the startup sequence of the system.
78 It is essentially a more detailed version of
79 the <command>systemd-analyze</command>
80 <command>plot</command> function.
81 </para>
82 <para>
83 Of course, bootchart can also be used at any
84 moment in time to collect and graph some data
85 for an amount of time. It is
86 recommended to use the <option>--rel</option>
87 switch in this case.
88 </para>
89 <para>
90 Bootchart does not require root privileges,
91 and will happily run as a normal user.
92 </para>
93 <para>
94 Bootchart graphs are by default written
95 time-stamped in <filename>/run/log</filename>.
96 </para>
83fdc450
AK
97
98 </refsect1>
99
100 <refsect1>
101 <title>Invocation</title>
102
f1c24fea 103 <para><command>systemd-bootchart</command> can be invoked in several different ways:</para>
83fdc450 104
ccc9a4f9 105 <variablelist>
83fdc450
AK
106
107 <varlistentry>
c3fec671 108 <term><emphasis>Kernel invocation</emphasis></term>
f1c24fea
ZJS
109 <listitem><para>The kernel can invoke
110 <command>systemd-bootchart</command>
111 instead of the init process. In turn,
112 <command>systemd-bootchart</command>
113 will invoke <command>/sbin/init</command>.
114 </para></listitem>
83fdc450
AK
115 </varlistentry>
116
117 <varlistentry>
c3fec671 118 <term><emphasis>Started as a standalone program</emphasis></term>
f1c24fea
ZJS
119 <listitem><para>One can execute
120 <command>systemd-bootchart</command>
121 as normal application from the
122 commandline. In this mode it is highly
123 recommended to pass the
124 <option>-r</option> flag in order to
125 not graph the time elapsed since boot
126 and before systemd-bootchart was
127 started, as it may result in extremely
128 large graphs. </para></listitem>
83fdc450
AK
129 </varlistentry>
130 </variablelist>
131 </refsect1>
132
133 <refsect1>
134 <title>Options</title>
135
f1c24fea
ZJS
136 <para>These options can also be set in the
137 <filename>/etc/systemd/bootchart.conf</filename>
138 file. See
139 <citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
140 </para>
c3fec671
WG
141
142 <variablelist>
57976066
WG
143
144 <varlistentry>
145 <term><option>-n</option></term>
f1c24fea
ZJS
146 <term><option>--sample <replaceable>N</replaceable></option></term>
147 <listitem><para>Specify the number of
148 samples, <replaceable>N</replaceable>,
149 to record. Samples will be recorded at
150 intervals defined with <option>--freq</option>.
151 </para></listitem>
57976066
WG
152 </varlistentry>
153
154 <varlistentry>
155 <term><option>-f</option></term>
f1c24fea
ZJS
156 <term><option>--freq <replaceable>f</replaceable></option></term>
157 <listitem><para>Specify the sample log
158 frequency, a positive real <replaceable>f</replaceable>, in Hz.
159 Most systems can cope with values up to 25-50 without
c3fec671 160 creating too much overhead.</para></listitem>
57976066
WG
161 </varlistentry>
162
163 <varlistentry>
164 <term><option>-r</option></term>
165 <term><option>--rel</option></term>
166 <listitem><para>Use relative times instead of absolute
167 times. This is useful for using bootchart at post-boot
f1c24fea
ZJS
168 time to profile an already booted system. Without this
169 option the graph would become extremely large. If set, the
57976066 170 horizontal axis starts at the first recorded sample
f1c24fea 171 instead of time 0.0.</para></listitem>
57976066
WG
172 </varlistentry>
173
174 <varlistentry>
175 <term><option>-F</option></term>
6d267991 176 <term><option>--no-filter</option></term>
f1c24fea 177 <listitem><para>Disable filtering of tasks that
57976066
WG
178 did not contribute significantly to the boot. Processes
179 that are too short-lived (only seen in one sample) or
180 that do not consume any significant CPU time (less than
f1c24fea 181 0.001 s) will not be displayed in the output graph.
57976066
WG
182 </para></listitem>
183 </varlistentry>
184
78da2cd9
HH
185 <varlistentry>
186 <term><option>-C</option></term>
187 <term><option>--cmdline</option></term>
188 <listitem><para>Display the full command line with arguments of processes,
189 instead of only the process name.
190 </para></listitem>
191 </varlistentry>
192
57976066
WG
193 <varlistentry>
194 <term><option>-o</option></term>
f1c24fea
ZJS
195 <term><option>--output <replaceable>path</replaceable></option></term>
196 <listitem><para>Specify the output folder for the
197 graphs. By default, bootchart writes the graphs to
895aeb27 198 <filename>/run/log</filename>.</para></listitem>
57976066
WG
199 </varlistentry>
200
201 <varlistentry>
202 <term><option>-i</option></term>
f1c24fea
ZJS
203 <term><option>--init <replaceable>path</replaceable></option></term>
204 <listitem><para>Use this init binary. Defaults to
205 <command>/sbin/init</command>.
57976066
WG
206 </para></listitem>
207 </varlistentry>
208
209 <varlistentry>
210 <term><option>-p</option></term>
211 <term><option>--pss</option></term>
212 <listitem><para>Enable logging and graphing
f1c24fea
ZJS
213 of processes' PSS (Proportional Set Size)
214 memory consumption. See <filename>filesystems/proc.txt</filename>
215 in the kernel documentation for an
216 explanation of this field.
217 </para></listitem>
57976066
WG
218 </varlistentry>
219
220 <varlistentry>
221 <term><option>-e</option></term>
222 <term><option>--entropy</option></term>
223 <listitem><para>Enable logging and graphing
224 of the kernel random entropy pool size.</para></listitem>
225 </varlistentry>
226
227 <varlistentry>
228 <term><option>-x</option></term>
f1c24fea 229 <term><option>--scale-x <replaceable>N</replaceable></option></term>
57976066
WG
230 <listitem><para>Horizontal scaling factor for all variable
231 graph components.</para></listitem>
232 </varlistentry>
233
234 <varlistentry>
235 <term><option>-y</option></term>
f1c24fea 236 <term><option>--scale-y <replaceable>N</replaceable></option></term>
57976066
WG
237 <listitem><para>Vertical scaling factor for all variable
238 graph components.</para></listitem>
239 </varlistentry>
240
241 </variablelist>
242
243
83fdc450
AK
244 </refsect1>
245
246 <refsect1>
247 <title>Output</title>
248
f1c24fea 249 <para><command>systemd-bootchart</command> generates SVG graphs. In order to render those
1959c6ce 250 on a graphical display any SVG capable viewer can be used. It should be
83fdc450
AK
251 noted that the SVG render engines in most browsers (including Chrome
252 and Firefox) are many times faster than dedicated graphical applications
f1c24fea 253 like Gimp and Inkscape. Just point your browser at <ulink url="file:///run/log/" />!
c3fec671
WG
254 </para>
255 </refsect1>
256
257 <refsect1>
258 <title>History</title>
259
f1c24fea
ZJS
260 <para>This version of bootchart was implemented from
261 scratch, but is inspired by former bootchart
262 incantations:</para>
c3fec671
WG
263
264 <variablelist>
265 <varlistentry>
266 <term><emphasis>Original bash</emphasis></term>
267 <listitem><para>The original bash/shell code implemented
268 bootchart. This version created a compressed tarball for
269 processing with external applications. This version did
270 not graph anything, only generated data.</para></listitem>
271 </varlistentry>
272
273 <varlistentry>
274 <term><emphasis>Ubuntu C Implementation</emphasis></term>
275 <listitem><para>This version replaced the shell version with
276 a fast and efficient data logger, but also did not graph
277 the data.</para></listitem>
278 </varlistentry>
279
280 <varlistentry>
281 <term><emphasis>Java bootchart</emphasis></term>
282 <listitem><para>This was the original graphing application
283 for charting the data, written in java.</para></listitem>
284 </varlistentry>
285
286 <varlistentry>
287 <term><emphasis>pybootchartgui.py</emphasis></term>
288 <listitem><para>pybootchart created a graph from the data
289 collected by either the bash or C version.</para></listitem>
290 </varlistentry>
291 </variablelist>
292
293 <para>The version of bootchart you are using now combines both the data
294 collection and the charting into a single application, making it more
295 efficient and simpler. There are no longer any timing issues with the data
296 collector and the grapher, as the graphing cannot be run until the data
297 has been collected. Also, the data kept in memory is reduced to the absolute
298 minimum needed.</para>
299
c3fec671
WG
300 </refsect1>
301
302 <refsect1>
303 <title>See Also</title>
304 <para>
305 <citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
83fdc450
AK
306 </para>
307 </refsect1>
308
309 <refsect1>
c3fec671 310 <title>Bugs</title>
1e447e0a
WG
311 <para>systemd-bootchart does not get the model information for the hard drive
312 unless the root device is specified with <code>root=/dev/sdxY</code>. Using
313 UUIDs or PARTUUIDs will boot fine, but the hard drive model will not be
314 added to the chart.</para>
f1c24fea
ZJS
315 <para>For bugs, please contact the author and current maintainer:</para>
316 <simplelist>
317 <member>Auke Kok <email>auke-jan.h.kok@intel.com</email></member>
318 </simplelist>
83fdc450
AK
319 </refsect1>
320
321</refentry>