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