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">
7 This file is part of systemd.
9 Copyright 2012 Intel Corporation
12 Auke Kok <auke-jan.h.kok@intel.com>
13 William Giokas <1007380@gmail.com>
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.
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.
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/>.
29 <refentry id="systemd-bootchart" conditional='ENABLE_BOOTCHART'>
31 <title>systemd-bootchart</title>
32 <productname>systemd</productname>
36 <contrib>Developer</contrib>
37 <firstname>Auke</firstname>
38 <surname>Kok</surname>
39 <email>auke-jan.h.kok@intel.com</email>
45 <refentrytitle>systemd-bootchart</refentrytitle>
46 <manvolnum>1</manvolnum>
50 <refname>systemd-bootchart</refname>
51 <refpurpose>Boot performance analysis graphing tool</refpurpose>
55 <title>Description</title>
57 <para>Systemd-bootchart is an boot time analysis tool. It represents
58 various aspects of the system as graph elements. These graph
59 elements allow the user to determine resource usage, efficiency
60 and performance issues.</para>
65 <title>Invocation</title>
67 <para>systemd-bootchart can be invoked in several different ways:</para>
72 <title>Kernel invocation</title>
73 <listitem><para>The kernel can invoke systemd-bootchart
74 instead of the init process. In itself, systemd-bootchart
75 will invoke <filename>/sbin/init</filename> if invoked in
76 this matter.</para></listitem>
80 <title>Started as a standalone program</title>
81 <listitem><para>One can execute systemd-bootchart as
82 normal application from the commandline. In this mode
83 it is highly recommended to pass the "-r" flag in order
84 to not graph the time elapsed since boot and before
85 systemd-bootchart was started, as it may result in
86 extremely large graphs.
93 <title>Options</title>
95 <variablelist class='bootchart-directives'>
98 <term><option>-n</option></term>
99 <term><option>--sample N</option></term>
100 <listitem><para>Specify the amount of samples to
101 record total before bootchart exits. Each sample will
102 record at intervals defined by --freq.</para></listitem>
106 <term><option>-f</option></term>
107 <term><option>--freq N</option></term>
108 <listitem><para>Specify the sample log frequency.
109 This can be a fractional number, but must be larger than
110 0.0. Most systems can cope with values under 25-50 without
111 impacting boot time severely.</para></listitem>
115 <term><option>-r</option></term>
116 <term><option>--rel</option></term>
117 <listitem><para>Use relative times instead of absolute
118 times. This is useful for using bootchart at post-boot
119 time to profile an already booted system, otherwise the
120 graph would become extremely large. If set, the
121 horizontal axis starts at the first recorded sample
122 instead of time=0.0.</para></listitem>
126 <term><option>-F</option></term>
127 <term><option>--filter</option></term>
128 <listitem><para>Disable filtering of tasks tasks that
129 did not contribute significantly to the boot. Processes
130 that are too short-lived (only seen in one sample) or
131 that do not consume any significant CPU time (less than
132 0.001sec) will not be displayed in the output graph.
137 <term><option>-o</option></term>
138 <term><option>--output [path]</option></term>
139 <listitem><para>Configures the output folder for writing
140 the graphs. By default, bootchart writes the graphs to
141 <filename>/run/log</filename>.</para></listitem>
145 <term><option>-i</option></term>
146 <term><option>--init [path]</option></term>
147 <listitem><para>Set init binary to run. Defaults to
148 <filename>/sbin/init</filename>.
153 <term><option>-p</option></term>
154 <term><option>--pss</option></term>
155 <listitem><para>Enable logging and graphing
156 of processes PSS memory consumption.</para></listitem>
160 <term><option>-e</option></term>
161 <term><option>--entropy</option></term>
162 <listitem><para>Enable logging and graphing
163 of the kernel random entropy pool size.</para></listitem>
167 <term><option>-x</option></term>
168 <term><option>--scale-x N</option></term>
169 <listitem><para>Horizontal scaling factor for all variable
170 graph components.</para></listitem>
174 <term><option>-y</option></term>
175 <term><option>--scale-y N</option></term>
176 <listitem><para>Vertical scaling factor for all variable
177 graph components.</para></listitem>
186 <title>Output</title>
188 <para>Systemd-bootchart generates SVG graphs. In order to render these
189 on a graphical display any SVG capable viewer can be used. It should be
190 noted that the SVG render engines in most browsers (including Chrome
191 and Firefox) are many times faster than dedicated graphical applications
192 like Gimp and Inkscape. Just point your browser at "file:///var/log"!
197 <title>See Also</title>
199 <citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>