chiark / gitweb /
man: Update bootchart.conf(5)
[elogind.git] / man / systemd-bootchart.xml
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>
13     William Giokas <1007380@gmail.com>
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
29 <refentry id="systemd-bootchart" conditional='ENABLE_BOOTCHART'>
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>
51                 <refpurpose>Boot performance analysis graphing tool</refpurpose>
52         </refnamediv>
53
54         <refsect1>
55                 <title>Description</title>
56
57                 <para>systemd-bootchart is a tool used to analyze a boot sequence.
58                 It collects system information pertaining to the CPU and disk load, as
59                 well as per-process information, and then creates a chart with this
60                 information. Usually it is invoked by setting the init to
61                 <filename>systemd-bootchart</filename> on the kernel command line. It
62                 be run after boot to analyze running processes, though it is recommended
63                 to use the <option>--rel</option> switch when doing this.</para>
64
65                 <para>After collecting a certain amount of data (default: 20 seconds) it
66                 will write the SVG chart to <filename>/run/log</filename>. This chart
67                 can be used to find problems in the start up sequence and where these
68                 problems exist. It is essentially a more detailed version of the
69                 systemd-analyze plot function.</para>
70
71         </refsect1>
72
73         <refsect1>
74                 <title>Invocation</title>
75
76                 <para>systemd-bootchart can be invoked in several different ways:</para>
77
78                 <variablelist>
79
80                         <varlistentry>
81                                 <term><emphasis>Kernel invocation</emphasis></term>
82                                 <listitem><para>The kernel can invoke systemd-bootchart
83                                 instead of the init process. In itself, systemd-bootchart
84                                 will invoke <filename>/sbin/init</filename> if invoked in
85                                 this manner.</para></listitem>
86                         </varlistentry>
87
88                         <varlistentry>
89                                 <term><emphasis>Started as a standalone program</emphasis></term>
90                                 <listitem><para>One can execute systemd-bootchart as
91                                 normal application from the commandline. In this mode
92                                 it is highly recommended to pass the "-r" flag in order
93                                 to not graph the time elapsed since boot and before
94                                 systemd-bootchart was started, as it may result in
95                                 extremely large graphs.
96                                 </para></listitem>
97                         </varlistentry>
98                 </variablelist>
99         </refsect1>
100
101         <refsect1>
102                 <title>Options</title>
103
104                 <para>These options can be set globally in the <filename>/etc/systemd/bootchart.conf</filename>
105                 file.</para>
106
107                 <variablelist>
108
109                         <varlistentry>
110                                 <term><option>-n</option></term>
111                                 <term><option>--sample N</option></term>
112                                 <listitem><para>Specify the amount of samples, N, to
113                                 record total before bootchart exits. Each sample will
114                                 record at intervals defined by --freq.</para></listitem>
115                         </varlistentry>
116
117                         <varlistentry>
118                                 <term><option>-f</option></term>
119                                 <term><option>--freq N</option></term>
120                                 <listitem><para>Specify the sample log frequency, N.
121                                 This can be a fractional number, but must be larger than
122                                 0.0. Most systems can cope with values under 25-50 without
123                                 creating too much overhead.</para></listitem>
124                         </varlistentry>
125
126                         <varlistentry>
127                                 <term><option>-r</option></term>
128                                 <term><option>--rel</option></term>
129                                 <listitem><para>Use relative times instead of absolute
130                                 times. This is useful for using bootchart at post-boot
131                                 time to profile an already booted system, otherwise the
132                                 graph would become extremely large. If set, the
133                                 horizontal axis starts at the first recorded sample
134                                 instead of time=0.0.</para></listitem>
135                         </varlistentry>
136
137                         <varlistentry>
138                                 <term><option>-F</option></term>
139                                 <term><option>--filter</option></term>
140                                 <listitem><para>Disable filtering of tasks tasks that
141                                 did not contribute significantly to the boot. Processes
142                                 that are too short-lived (only seen in one sample) or
143                                 that do not consume any significant CPU time (less than
144                                 0.001sec) will not be displayed in the output graph.
145                                 </para></listitem>
146                         </varlistentry>
147
148                         <varlistentry>
149                                 <term><option>-o</option></term>
150                                 <term><option>--output [path]</option></term>
151                                 <listitem><para>Configures the output folder for writing
152                                 the graphs. By default, bootchart writes the graphs to
153                                 <filename>/run/log</filename>.</para></listitem>
154                         </varlistentry>
155
156                         <varlistentry>
157                                 <term><option>-i</option></term>
158                                 <term><option>--init [path]</option></term>
159                                 <listitem><para>Set init binary to run. Defaults to
160                                 <filename>/sbin/init</filename>.
161                                 </para></listitem>
162                         </varlistentry>
163
164                         <varlistentry>
165                                 <term><option>-p</option></term>
166                                 <term><option>--pss</option></term>
167                                 <listitem><para>Enable logging and graphing
168                                 of processes PSS memory consumption.</para></listitem>
169                         </varlistentry>
170
171                         <varlistentry>
172                                 <term><option>-e</option></term>
173                                 <term><option>--entropy</option></term>
174                                 <listitem><para>Enable logging and graphing
175                                 of the kernel random entropy pool size.</para></listitem>
176                         </varlistentry>
177
178                         <varlistentry>
179                                 <term><option>-x</option></term>
180                                 <term><option>--scale-x N</option></term>
181                                 <listitem><para>Horizontal scaling factor for all variable
182                                 graph components.</para></listitem>
183                         </varlistentry>
184
185                         <varlistentry>
186                                 <term><option>-y</option></term>
187                                 <term><option>--scale-y N</option></term>
188                                 <listitem><para>Vertical scaling factor for all variable
189                                 graph components.</para></listitem>
190                         </varlistentry>
191
192                 </variablelist>
193
194
195         </refsect1>
196
197         <refsect1>
198                 <title>Output</title>
199
200                 <para>systemd-bootchart generates SVG graphs. In order to render these
201                 on a graphical display any SVG capable viewer can be used. It should be
202                 noted that the SVG render engines in most browsers (including Chrome
203                 and Firefox) are many times faster than dedicated graphical applications
204                 like Gimp and Inkscape.  Just point your browser at "file:///run/log"!
205                 </para>
206         </refsect1>
207
208         <refsect1>
209                 <title>History</title>
210
211                 <para>This version of bootchart was implemented from scratch, but inspired
212                   by former bootchart incantations:</para>
213
214                 <variablelist>
215                         <varlistentry>
216                                 <term><emphasis>Original bash</emphasis></term>
217                                 <listitem><para>The original bash/shell code implemented
218                                 bootchart. This version created a compressed tarball for
219                                 processing with external applications. This version did
220                                 not graph anything, only generated data.</para></listitem>
221                         </varlistentry>
222
223                         <varlistentry>
224                                 <term><emphasis>Ubuntu C Implementation</emphasis></term>
225                                 <listitem><para>This version replaced the shell version with
226                                 a fast and efficient data logger, but also did not graph
227                                 the data.</para></listitem>
228                         </varlistentry>
229
230                         <varlistentry>
231                                 <term><emphasis>Java bootchart</emphasis></term>
232                                 <listitem><para>This was the original graphing application
233                                 for charting the data, written in java.</para></listitem>
234                         </varlistentry>
235
236                         <varlistentry>
237                                 <term><emphasis>pybootchartgui.py</emphasis></term>
238                                 <listitem><para>pybootchart created a graph from the data
239                                 collected by either the bash or C version.</para></listitem>
240                         </varlistentry>
241                 </variablelist>
242
243                 <para>The version of bootchart you are using now combines both the data
244                 collection and the charting into a single application, making it more
245                 efficient and simpler. There are no longer any timing issues with the data
246                 collector and the grapher, as the graphing cannot be run until the data
247                 has been collected. Also, the data kept in memory is reduced to the absolute
248                 minimum needed.</para>
249
250
251         </refsect1>
252
253         <refsect1>
254                 <title>See Also</title>
255                 <para>
256                         <citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
257                 </para>
258         </refsect1>
259
260         <refsect1>
261                 <title>Bugs</title>
262                 <para>For bugs, please contact the author or current maintainer:</para>
263                 <varlistentry>
264                         <term>Auke Kok</term>
265                         <term><emphasis>auke-jan.h.kok@intel.com</emphasis></term>
266                 </varlistentry>
267         </refsect1>
268
269 </refentry>