]>
Commit | Line | Data |
---|---|---|
663996b3 MS |
1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-bootchart</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style> |
2 | a.headerlink { | |
3 | color: #c60f0f; | |
4 | font-size: 0.8em; | |
5 | padding: 0 4px 0 4px; | |
6 | text-decoration: none; | |
7 | visibility: hidden; | |
8 | } | |
9 | ||
10 | a.headerlink:hover { | |
11 | background-color: #c60f0f; | |
12 | color: white; | |
13 | } | |
14 | ||
15 | h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { | |
16 | visibility: visible; | |
17 | } | |
18 | </style><a href="index.html">Index </a>· | |
19 | <a href="systemd.directives.html">Directives </a>· | |
20 | <a href="../python-systemd/index.html">Python </a>· | |
86f210e9 MP |
21 | |
22 | <span style="float:right">systemd 221</span><hr><div class="refentry"><a name="systemd-bootchart"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bootchart — Boot performance graphing tool</p></div><div class="refsect1"><a name="idm47920800421904"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p> | |
e735f4d4 MP |
23 | <span class="command"><strong>systemd-bootchart</strong></span> is a tool, usually run at |
24 | system startup, that collects the CPU load, disk load, memory | |
25 | usage, as well as per-process information from a running system. | |
26 | Collected results are output as an SVG graph. Normally, | |
27 | systemd-bootchart is invoked by the kernel by passing | |
28 | <code class="option">init=<code class="filename">/usr/lib/systemd/systemd-bootchart</code></code> | |
29 | on the kernel command line. systemd-bootchart will then fork the | |
30 | real init off to resume normal system startup, while monitoring | |
31 | and logging startup information in the background. | |
32 | </p><p> | |
33 | After collecting a certain amount of data (usually 15-30 | |
34 | seconds, default 20 s) the logging stops and a graph is | |
35 | generated from the logged information. This graph contains vital | |
36 | clues as to which resources are being used, in which order, and | |
37 | where possible problems exist in the startup sequence of the | |
38 | system. It is essentially a more detailed version of the | |
39 | <span class="command"><strong>systemd-analyze plot</strong></span> function. | |
40 | </p><p> | |
41 | Of course, bootchart can also be used at any moment in time to | |
42 | collect and graph some data for an amount of time. It is | |
43 | recommended to use the <code class="option">--rel</code> switch in this | |
44 | case. | |
45 | </p><p> | |
46 | Bootchart does not require root privileges, and will happily run | |
47 | as a normal user. | |
48 | </p><p> | |
49 | Bootchart graphs are by default written time-stamped in | |
50 | <code class="filename">/run/log</code> and saved to the journal with | |
51 | <code class="varname">MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518</code>. | |
52 | Journal field <code class="varname">BOOTCHART=</code> contains the | |
53 | bootchart in SVG format. | |
86f210e9 | 54 | </p></div><div class="refsect1"><a name="idm47920795462912"></a><h2 id="Invocation">Invocation<a class="headerlink" title="Permalink to this headline" href="#Invocation">¶</a></h2><p><span class="command"><strong>systemd-bootchart</strong></span> can be invoked in several different ways:</p><div class="variablelist"><dl class="variablelist"><dt id="Kernel invocation"><span class="term"><span class="emphasis"><em>Kernel invocation</em></span></span><a class="headerlink" title="Permalink to this term" href="#Kernel%20invocation">¶</a></dt><dd><p>The kernel can invoke |
e735f4d4 MP |
55 | <span class="command"><strong>systemd-bootchart</strong></span> instead of the init |
56 | process. In turn, <span class="command"><strong>systemd-bootchart</strong></span> will | |
57 | invoke <span class="command"><strong>/usr/lib/systemd/systemd</strong></span>. | |
58 | </p></dd><dt id="Started as a standalone program"><span class="term"><span class="emphasis"><em>Started as a standalone program</em></span></span><a class="headerlink" title="Permalink to this term" href="#Started%20as%20a%20standalone%20program">¶</a></dt><dd><p>One can execute | |
59 | <span class="command"><strong>systemd-bootchart</strong></span> as normal application | |
60 | from the command line. In this mode it is highly recommended | |
61 | to pass the <code class="option">-r</code> flag in order to not graph the | |
62 | time elapsed since boot and before systemd-bootchart was | |
63 | started, as it may result in extremely large graphs. The time | |
64 | elapsed since boot might also include any time that the system | |
86f210e9 | 65 | was suspended.</p></dd></dl></div></div><div class="refsect1"><a name="idm47920795454784"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>These options can also be set in the |
e735f4d4 MP |
66 | <code class="filename">/etc/systemd/bootchart.conf</code> file. See |
67 | <a href="http://man7.org/linux/man-pages/man5/bootchart.conf.5.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>. | |
68 | </p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit. | |
69 | </p></dd><dt id="-n"><span class="term"><code class="option">-n</code>, </span><span class="term"><code class="option">--sample <em class="replaceable"><code>N</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p>Specify the number of samples, | |
70 | <em class="replaceable"><code>N</code></em>, to record. Samples will be | |
71 | recorded at intervals defined with <code class="option">--freq</code>. | |
72 | </p></dd><dt id="-f"><span class="term"><code class="option">-f</code>, </span><span class="term"><code class="option">--freq <em class="replaceable"><code>f</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-f">¶</a></dt><dd><p>Specify the sample log frequency, a positive | |
73 | real <em class="replaceable"><code>f</code></em>, in Hz. Most systems can | |
74 | cope with values up to 25-50 without creating too much | |
75 | overhead.</p></dd><dt id="-r"><span class="term"><code class="option">-r</code>, </span><span class="term"><code class="option">--rel</code></span><a class="headerlink" title="Permalink to this term" href="#-r">¶</a></dt><dd><p>Use relative times instead of absolute times. | |
76 | This is useful for using bootchart at post-boot time to | |
77 | profile an already booted system. Without this option the | |
78 | graph would become extremely large. If set, the horizontal | |
79 | axis starts at the first recorded sample instead of time | |
80 | 0.0.</p></dd><dt id="-F"><span class="term"><code class="option">-F</code>, </span><span class="term"><code class="option">--no-filter</code></span><a class="headerlink" title="Permalink to this term" href="#-F">¶</a></dt><dd><p>Disable filtering of tasks that did not | |
81 | contribute significantly to the boot. Processes that are too | |
82 | short-lived (only seen in one sample) or that do not consume | |
83 | any significant CPU time (less than 0.001 s) will not be | |
84 | displayed in the output graph. </p></dd><dt id="-C"><span class="term"><code class="option">-C</code>, </span><span class="term"><code class="option">--cmdline</code></span><a class="headerlink" title="Permalink to this term" href="#-C">¶</a></dt><dd><p>Display the full command line with arguments | |
85 | of processes, instead of only the process name. | |
86 | </p></dd><dt id="-g"><span class="term"><code class="option">-g</code>, </span><span class="term"><code class="option">--control-group</code></span><a class="headerlink" title="Permalink to this term" href="#-g">¶</a></dt><dd><p>Display process control group | |
87 | </p></dd><dt id="-o"><span class="term"><code class="option">-o</code>, </span><span class="term"><code class="option">--output <em class="replaceable"><code>path</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-o">¶</a></dt><dd><p>Specify the output directory for the graphs. | |
88 | By default, bootchart writes the graphs to | |
89 | <code class="filename">/run/log</code>.</p></dd><dt id="-i"><span class="term"><code class="option">-i</code>, </span><span class="term"><code class="option">--init <em class="replaceable"><code>path</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p>Use this init binary. Defaults to | |
90 | <span class="command"><strong>/usr/lib/systemd/systemd</strong></span>. | |
91 | </p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--pss</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Enable logging and graphing of processes' PSS | |
92 | (Proportional Set Size) memory consumption. See | |
93 | <code class="filename">filesystems/proc.txt</code> in the kernel | |
94 | documentation for an explanation of this field. | |
95 | </p></dd><dt id="-e"><span class="term"><code class="option">-e</code>, </span><span class="term"><code class="option">--entropy</code></span><a class="headerlink" title="Permalink to this term" href="#-e">¶</a></dt><dd><p>Enable logging and graphing of the kernel | |
96 | random entropy pool size.</p></dd><dt id="-x"><span class="term"><code class="option">-x</code>, </span><span class="term"><code class="option">--scale-x <em class="replaceable"><code>N</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p>Horizontal scaling factor for all variable | |
97 | graph components.</p></dd><dt id="-y"><span class="term"><code class="option">-y</code>, </span><span class="term"><code class="option">--scale-y <em class="replaceable"><code>N</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-y">¶</a></dt><dd><p>Vertical scaling factor for all variable graph | |
86f210e9 | 98 | components.</p></dd></dl></div></div><div class="refsect1"><a name="idm47920795422032"></a><h2 id="Output">Output<a class="headerlink" title="Permalink to this headline" href="#Output">¶</a></h2><p><span class="command"><strong>systemd-bootchart</strong></span> generates SVG graphs. |
e735f4d4 MP |
99 | In order to render those on a graphical display any SVG capable |
100 | viewer can be used. It should be noted that the SVG render engines | |
101 | in most browsers (including Chrome and Firefox) are many times | |
102 | faster than dedicated graphical applications like Gimp and | |
103 | Inkscape. Just point your browser at | |
104 | <a class="ulink" href="file:///run/log/" target="_top">file:///run/log/</a>! | |
86f210e9 | 105 | </p></div><div class="refsect1"><a name="idm47920795419536"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p>This version of bootchart was implemented from scratch, but |
e735f4d4 MP |
106 | is inspired by former bootchart incantations:</p><div class="variablelist"><dl class="variablelist"><dt id="Original bash"><span class="term"><span class="emphasis"><em>Original bash</em></span></span><a class="headerlink" title="Permalink to this term" href="#Original%20bash">¶</a></dt><dd><p>The original bash/shell code implemented |
107 | bootchart. This version created a compressed tarball for | |
108 | processing with external applications. This version did not | |
109 | graph anything, only generated data.</p></dd><dt id="Ubuntu C Implementation"><span class="term"><span class="emphasis"><em>Ubuntu C Implementation</em></span></span><a class="headerlink" title="Permalink to this term" href="#Ubuntu%20C%20Implementation">¶</a></dt><dd><p>This version replaced the shell version with a | |
110 | fast and efficient data logger, but also did not graph the | |
111 | data.</p></dd><dt id="Java bootchart"><span class="term"><span class="emphasis"><em>Java bootchart</em></span></span><a class="headerlink" title="Permalink to this term" href="#Java%20bootchart">¶</a></dt><dd><p>This was the original graphing application for | |
112 | charting the data, written in java.</p></dd><dt id="pybootchartgui.py"><span class="term"><span class="emphasis"><em>pybootchartgui.py</em></span></span><a class="headerlink" title="Permalink to this term" href="#pybootchartgui.py">¶</a></dt><dd><p>pybootchart created a graph from the data | |
113 | collected by either the bash or C version.</p></dd></dl></div><p>The version of bootchart you are using now combines both the | |
114 | data collection and the charting into a single application, making | |
115 | it more efficient and simpler. There are no longer any timing | |
116 | issues with the data collector and the grapher, as the graphing | |
117 | cannot be run until the data has been collected. Also, the data | |
86f210e9 | 118 | kept in memory is reduced to the absolute minimum needed.</p></div><div class="refsect1"><a name="idm47920795410832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p> |
e735f4d4 | 119 | <a href="http://man7.org/linux/man-pages/man5/bootchart.conf.5.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a> |
86f210e9 | 120 | </p></div><div class="refsect1"><a name="idm47920795408672"></a><h2 id="Bugs">Bugs<a class="headerlink" title="Permalink to this headline" href="#Bugs">¶</a></h2><p>systemd-bootchart does not get the model information for the |
e735f4d4 MP |
121 | hard drive unless the root device is specified with |
122 | <code class="code">root=/dev/sdxY</code>. Using UUIDs or PARTUUIDs will boot | |
123 | fine, but the hard drive model will not be added to the | |
124 | chart.</p><p>For bugs, please contact the author and current maintainer:</p><table border="0" summary="Simple list" class="simplelist"><tr><td>Auke Kok <code class="email"><<a class="email" href="mailto:auke-jan.h.kok@intel.com">auke-jan.h.kok@intel.com</a>></code></td></tr></table></div></div></body></html> |