systemd-bootchart.xml revision c3fec6715df4df7bfec9a0d0315e8f17b53eeb8e
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok This file is part of systemd.
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok Copyright 2012 Intel Corporation
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok Auke Kok <auke-jan.h.kok@intel.com>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas William Giokas <1007380@gmail.com>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok systemd is free software; you can redistribute it and/or modify it
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok under the terms of the GNU Lesser General Public License as published by
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok the Free Software Foundation; either version 2.1 of the License, or
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok (at your option) any later version.
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok systemd is distributed in the hope that it will be useful, but
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok WITHOUT ANY WARRANTY; without even the implied warranty of
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok Lesser General Public License for more details.
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok You should have received a copy of the GNU Lesser General Public License
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok along with systemd; If not, see <http://www.gnu.org/licenses/>.
56ba3c78ae35065064c4289a0c8e22a81256af20Zbigniew Jędrzejewski-Szmek<refentry id="systemd-bootchart" conditional='ENABLE_BOOTCHART'>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <refentryinfo>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <authorgroup>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </authorgroup>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </refentryinfo>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <refnamediv>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <refpurpose>Boot performance analysis graphing tool</refpurpose>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </refnamediv>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <para>systemd-bootchart is a tool used to analyze a boot sequence.
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas It collects system information pertaining to the CPU and disk load, as
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas well as per-process information, and then creates a chart with this
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas information. Usually it is invoked by setting the init to
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <filename>systemd-bootchart</filename> on the kernel command line. It
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas be run after boot to analyze running processes, though it is recommended
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas to use the <option>--rel</option> switch when doing this.</para>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <para>After collecting a certain amount of data (default: 20 seconds) it
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas will write the SVG chart to <filename>/run/log</filename>. This chart
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas can be used to find problems in the start up sequence and where these
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas problems exist. It is essentially a more detailed version of the
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas systemd-analyze plot function.</para>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </refsect1>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <para>systemd-bootchart can be invoked in several different ways:</para>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <term><emphasis>Kernel invocation</emphasis></term>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <listitem><para>The kernel can invoke systemd-bootchart
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok instead of the init process. In itself, systemd-bootchart
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok will invoke <filename>/sbin/init</filename> if invoked in
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </varlistentry>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <term><emphasis>Started as a standalone program</emphasis></term>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok <listitem><para>One can execute systemd-bootchart as
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok normal application from the commandline. In this mode
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok it is highly recommended to pass the "-r" flag in order
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok to not graph the time elapsed since boot and before
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok systemd-bootchart was started, as it may result in
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok extremely large graphs.
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </varlistentry>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </variablelist>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </refsect1>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <para>These options can be set globally in the <filename>/etc/systemd/bootchart.conf</filename>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <variablelist>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <listitem><para>Specify the amount of samples, N, to
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas record total before bootchart exits. Each sample will
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas record at intervals defined by --freq.</para></listitem>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <listitem><para>Specify the sample log frequency, N.
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas This can be a fractional number, but must be larger than
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas 0.0. Most systems can cope with values under 25-50 without
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas creating too much overhead.</para></listitem>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <listitem><para>Use relative times instead of absolute
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas times. This is useful for using bootchart at post-boot
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas time to profile an already booted system, otherwise the
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas graph would become extremely large. If set, the
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas horizontal axis starts at the first recorded sample
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <listitem><para>Disable filtering of tasks tasks that
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas did not contribute significantly to the boot. Processes
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas that are too short-lived (only seen in one sample) or
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas that do not consume any significant CPU time (less than
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas 0.001sec) will not be displayed in the output graph.
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <term><option>--output [path]</option></term>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <listitem><para>Configures the output folder for writing
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas the graphs. By default, bootchart writes the graphs to
895aeb27795c00f365ce3b30b1dca549b4f5468eWilliam Giokas <filename>/run/log</filename>.</para></listitem>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <listitem><para>Set init binary to run. Defaults to
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas of processes PSS memory consumption.</para></listitem>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas of the kernel random entropy pool size.</para></listitem>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <listitem><para>Horizontal scaling factor for all variable
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas <listitem><para>Vertical scaling factor for all variable
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </varlistentry>
5797606612b5b37dbba5d90b39665cdf7f7a1b11William Giokas </variablelist>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </refsect1>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <para>systemd-bootchart generates SVG graphs. In order to render these
1959c6ce940786d33f91e19c41441bf4c9f6a768Thomas Hindoe Paaboel Andersen on a graphical display any SVG capable viewer can be used. It should be
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok noted that the SVG render engines in most browsers (including Chrome
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok and Firefox) are many times faster than dedicated graphical applications
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas like Gimp and Inkscape. Just point your browser at "file:///run/log"!
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <para>This version of bootchart was implemented from scratch, but inspired
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas by former bootchart incantations:</para>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <variablelist>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <term><emphasis>Original bash</emphasis></term>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <listitem><para>The original bash/shell code implemented
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas bootchart. This version created a compressed tarball for
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas processing with external applications. This version did
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas not graph anything, only generated data.</para></listitem>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas </varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <term><emphasis>Ubuntu C Implementation</emphasis></term>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <listitem><para>This version replaced the shell version with
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas a fast and efficient data logger, but also did not graph
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas </varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <term><emphasis>Java bootchart</emphasis></term>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <listitem><para>This was the original graphing application
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas for charting the data, written in java.</para></listitem>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas </varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <term><emphasis>pybootchartgui.py</emphasis></term>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <listitem><para>pybootchart created a graph from the data
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas collected by either the bash or C version.</para></listitem>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas </varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas </variablelist>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <para>The version of bootchart you are using now combines both the data
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas collection and the charting into a single application, making it more
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas efficient and simpler. There are no longer any timing issues with the data
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas collector and the grapher, as the graphing cannot be run until the data
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas has been collected. Also, the data kept in memory is reduced to the absolute
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas minimum needed.</para>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </refsect1>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <para>For bugs, please contact the author or current maintainer:</para>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <varlistentry>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas <term><emphasis>auke-jan.h.kok@intel.com</emphasis></term>
c3fec6715df4df7bfec9a0d0315e8f17b53eeb8eWilliam Giokas </varlistentry>
83fdc450aa8f79941bec84488ffd5bf8eadab18eAuke Kok </refsect1>