File: systemd-analyze.html

package info (click to toggle)
systemd 215-17
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 49,568 kB
  • sloc: ansic: 192,789; xml: 39,586; sh: 13,002; makefile: 4,700; perl: 1,461; python: 1,355
file content (146 lines) | stat: -rw-r--r-- 15,788 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-analyze</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·
  <a href="../libudev/index.html">libudev </a>·
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-analyze"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-analyze — Analyze system boot-up performance</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...] [time]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  blame </p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  critical-chain  [<em class="replaceable"><code>UNIT</code></em>...]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  plot  [&gt; file.svg]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  dot  [<em class="replaceable"><code>PATTERN</code></em>...] [&gt; file.dot]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  dump </p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  set-log-level  [<em class="replaceable"><code>LEVEL</code></em>]</p></div></div><div class="refsect1"><a name="idm214183644624"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-analyze</strong></span> may be used
                to determine system boot-up performance statistics and
                retrieve other state and tracing information from the
                system and service manager.</p><p><span class="command"><strong>systemd-analyze time</strong></span>
                prints the time spent in the kernel before
                userspace has been reached, the time spent in the
                initial RAM disk (initrd) before normal system
                userspace has been reached, and the time normal system
                userspace took to initialize. Note that these
                measurements simply measure the time passed up to the
                point where all system services have been spawned, but
                not necessarily until they fully finished
                initialization or the disk is idle.</p><p><span class="command"><strong>systemd-analyze blame</strong></span> prints
                a list of all running units, ordered by the time they
                took to initialize. This information may be used to
                optimize boot-up times. Note that the output might be
                misleading as the initialization of one service might
                be slow simply because it waits for the initialization
                of another service to complete.</p><p><span class="command"><strong>systemd-analyze critical-chain [<em class="replaceable"><code>UNIT...</code></em>]</strong></span>
                prints a tree of the time-critical chain of units
                (for each of the specified <em class="replaceable"><code>UNIT</code></em>s
                or for the default target otherwise).
                The time after the unit is active or started is printed
                after the "@" character. The time the unit takes to
                start is printed after the "+" character.
                Note that the output might be misleading as the
                initialization of one service might depend on socket
                activation and because of the parallel execution
                of units.</p><p><span class="command"><strong>systemd-analyze plot</strong></span> prints
                an SVG graphic detailing which system services have
                been started at what time, highlighting the time they
                spent on initialization.</p><p><span class="command"><strong>systemd-analyze dot</strong></span> generates
                textual dependency graph description in dot format for
                further processing with the GraphViz
                <a href="dot.html"><span class="citerefentry"><span class="refentrytitle">dot</span>(1)</span></a>
                tool. Use a command line like <span class="command"><strong>systemd-analyze
                dot | dot -Tsvg &gt; systemd.svg</strong></span> to generate a
                graphical dependency tree. Unless
                <code class="option">--order</code> or <code class="option">--require</code>
                is passed, the generated graph will show both ordering
                and requirement dependencies. Optional pattern
                globbing style specifications
                (e.g. <code class="filename">*.target</code>) may be given at
                the end. A unit dependency is included in the graph if
                any of these patterns match either the origin or
                destination node.</p><p><span class="command"><strong>systemd-analyze dump</strong></span> outputs
                a (usually very long) human-readable serialization of
                the complete server state. Its format is subject to
                change without notice and should not be parsed by
                applications.</p><p><span class="command"><strong>systemd-analyze set-log-level
                <em class="replaceable"><code>LEVEL</code></em></strong></span> changes the
                current log level of the <span class="command"><strong>systemd</strong></span>
                daemon to <em class="replaceable"><code>LEVEL</code></em> (accepts
                the same values as <code class="option">--log-level=</code>
                described in
                <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>).</p><p>If no command is passed, <span class="command"><strong>systemd-analyze
                time</strong></span> is implied.</p></div><div class="refsect1"><a name="idm214183618672"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--user"><span class="term"><code class="option">--user</code></span><a class="headerlink" title="Permalink to this term" href="#--user">¶</a></dt><dd><p>Shows performance data
                                of user sessions instead of the system
                                manager.</p></dd><dt id="--system"><span class="term"><code class="option">--system</code></span><a class="headerlink" title="Permalink to this term" href="#--system">¶</a></dt><dd><p>Shows performance data
                                of the system manager. This is the
                                implied default.</p></dd><dt id="--order"><span class="term"><code class="option">--order</code>, </span><span class="term"><code class="option">--require</code></span><a class="headerlink" title="Permalink to this term" href="#--order">¶</a></dt><dd><p>When used in
                                conjunction with the
                                <span class="command"><strong>dot</strong></span> command (see
                                above), selects which dependencies are
                                shown in the dependency graph. If
                                <code class="option">--order</code> is passed,
                                only dependencies of type
                                <code class="varname">After=</code> or
                                <code class="varname">Before=</code> are
                                shown. If <code class="option">--require</code>
                                is passed, only dependencies of type
                                <code class="varname">Requires=</code>,
                                <code class="varname">RequiresOverridable=</code>,
                                <code class="varname">Requisite=</code>,
                                <code class="varname">RequisiteOverridable=</code>,
                                <code class="varname">Wants=</code> and
                                <code class="varname">Conflicts=</code> are
                                shown. If neither is passed, this shows
                                dependencies of all these
                                types.</p></dd><dt id="--from-pattern="><span class="term"><code class="option">--from-pattern=</code>, </span><span class="term"><code class="option">--to-pattern=</code></span><a class="headerlink" title="Permalink to this term" href="#--from-pattern=">¶</a></dt><dd><p>When used in
                                conjunction with the
                                <span class="command"><strong>dot</strong></span> command (see
                                above), this selects which relationships
                                are shown in the dependency graph.
                                They both require
                                <a href="glob.html"><span class="citerefentry"><span class="refentrytitle">glob</span>(7)</span></a>
                                patterns as arguments, which are
                                matched against left-hand and
                                right-hand, respectively, nodes of a
                                relationship. Each of these can be
                                used more than once, which means a
                                unit name must match one of the given
                                values.</p></dd><dt id="--fuzz=timespan"><span class="term"><code class="option">--fuzz=</code><em class="replaceable"><code>timespan</code></em></span><a class="headerlink" title="Permalink to this term" href="#--fuzz=timespan">¶</a></dt><dd><p>When used in conjunction
                                with the <span class="command"><strong>critical-chain</strong></span>
                                command (see above), also show units, which
                                finished <em class="replaceable"><code>timespan</code></em> earlier, than the
                                latest unit in the same level. The unit of
                                <em class="replaceable"><code>timespan</code></em> is seconds
                                unless specified with a different unit,
                                e.g. "50ms".</p></dd><dt id="-H"><span class="term"><code class="option">-H</code>, </span><span class="term"><code class="option">--host=</code></span><a class="headerlink" title="Permalink to this term" href="#-H">¶</a></dt><dd><p><a name="host-text"></a>Execute the operation remotely. Specify a hostname, or a
      username and hostname separated by "<code class="literal">@</code>", to
      connect to. The hostname may optionally be suffixed by a
      container name, separated by "<code class="literal">:</code>", which
      connects directly to a specific container on the specified
      host. This will use SSH to talk to the remote machine manager
      instance. Container names may be enumerated with
      <span class="command"><strong>machinectl -H
      <em class="replaceable"><code>HOST</code></em></strong></span>.</p></dd><dt id="-M"><span class="term"><code class="option">-M</code>, </span><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#-M">¶</a></dt><dd><p><a name="machine-text"></a>Execute operation on a local container. Specify a
      container name to connect to.</p></dd><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.
    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214178965472"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
                code otherwise.</p></div><div class="refsect1"><a name="idm214178964320"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>This plots all dependencies of any unit whose
                name starts with "<code class="literal">avahi-daemon.</code>":</p><pre class="programlisting">$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg &gt; avahi.svg
$ eog avahi.svg</pre><p>This plots the dependencies between all known target units:</p><pre class="programlisting">systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' | dot -Tsvg &gt; targets.svg
$ eog targets.svg</pre></div><div class="refsect1"><a name="idm214166569984"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                        <code class="option">--no-pager</code> is not given;
                        overrides <code class="varname">$PAGER</code>.  Setting
                        this to an empty string or the value
                        "<code class="literal">cat</code>" is equivalent to passing
                        <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                        options passed to
                        <span class="command"><strong>less</strong></span>
                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214178960288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                        <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
                </p></div></div></body></html>