Debian Codegraph @

upstream/debian-unstable/man1/systemd-bootchart.1

raw
1 '\" t
2 .TH "SYSTEMD\-BOOTCHART" "1" "" "systemd 235" "systemd-bootchart"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-bootchart \- Boot performance graphing tool
24 .SH "DESCRIPTION"
25 .PP
26 \fBsystemd\-bootchart\fR
27 is a tool, usually run at system startup, that collects the CPU load, disk load, memory usage, as well as per\-process information from a running system\&. Collected results are output as an SVG graph\&. Normally, systemd\-bootchart is invoked by the kernel by passing
28 \fBinit=\fR\fB/usr/lib/systemd/systemd\-bootchart\fR
29 on the kernel command line, adding
30 \fBinitcall_debug\fR
31 to collect data on kernel init threads\&. systemd\-bootchart will then fork the real init off to resume normal system startup, while monitoring and logging startup information in the background\&.
32 .PP
33 After collecting a certain amount of data (usually 15\-30 seconds, default 20 s) the logging stops and a graph is generated from the logged information\&. This graph contains vital clues as to which resources are being used, in which order, and where possible problems exist in the startup sequence of the system\&. It is essentially a more detailed version of the
34 \fBsystemd\-analyze plot\fR
35 function\&.
36 .PP
37 Of course, bootchart can also be used at any moment in time to collect and graph some data for an amount of time\&. It is recommended to use the
38 \fB\-\-rel\fR
39 switch in this case\&.
40 .PP
41 Bootchart does not require root privileges, and will happily run as a normal user\&.
42 .PP
43 Bootchart graphs are by default written time\-stamped in
44 /run/log
45 and saved to the journal with
46 \fIMESSAGE_ID=9f26aa562cf440c2b16c773d0479b518\fR\&. Journal field
47 \fIBOOTCHART=\fR
48 contains the bootchart in SVG format\&.
49 .SH "INVOCATION"
50 .PP
51 \fBsystemd\-bootchart\fR
52 can be invoked in several different ways:
53 .PP
54 \fIKernel invocation\fR
55 .RS 4
56 The kernel can invoke
57 \fBsystemd\-bootchart\fR
58 instead of the init process\&. In turn,
59 \fBsystemd\-bootchart\fR
60 will invoke
61 \fB/usr/lib/systemd/systemd\fR\&. Data will be collected on kernel init threads and also processes including the services started by systemd\&.
62 .RE
63 .PP
64 \fIsystemd unit\fR
65 .RS 4
66 A unit file is provided,
67 \fBsystemd\-bootchart\&.service\fR\&. If enabled when the system starts it will collect data on processes including the services started by systemd\&.
68 .RE
69 .PP
70 \fIStarted as a standalone program\fR
71 .RS 4
72 One can execute
73 \fBsystemd\-bootchart\fR
74 as normal application from the command line\&. In this mode it is highly recommended to pass the
75 \fB\-r\fR
76 flag in order to not graph the time elapsed since boot and before systemd\-bootchart was started, as it may result in extremely large graphs\&. The time elapsed since boot might also include any time that the system was suspended\&.
77 .RE
78 .SH "OPTIONS"
79 .PP
80 These options can also be set in the
81 /etc/systemd/bootchart\&.conf
82 file\&. See
83 \fBbootchart.conf\fR(5)\&.
84 .PP
85 \fB\-h\fR, \fB\-\-help\fR
86 .RS 4
87 Print a short help text and exit\&.
88 .RE
89 .PP
90 \fB\-n\fR, \fB\-\-sample \fR\fB\fIN\fR\fR
91 .RS 4
92 Specify the number of samples,
93 \fIN\fR, to record\&. Samples will be recorded at intervals defined with
94 \fB\-\-freq\fR\&.
95 .RE
96 .PP
97 \fB\-f\fR, \fB\-\-freq \fR\fB\fIf\fR\fR
98 .RS 4
99 Specify the sample log frequency, a positive real
100 \fIf\fR, in Hz\&. Most systems can cope with values up to 25\-50 without creating too much overhead\&.
101 .RE
102 .PP
103 \fB\-r\fR, \fB\-\-rel\fR
104 .RS 4
105 Use relative times instead of absolute times\&. This is useful for using bootchart at post\-boot time to profile an already booted system\&. Without this option the graph would become extremely large\&. If set, the horizontal axis starts at the first recorded sample instead of time 0\&.0\&.
106 .RE
107 .PP
108 \fB\-F\fR, \fB\-\-no\-filter\fR
109 .RS 4
110 Disable filtering of tasks that did not contribute significantly to the boot\&. Processes that are too short\-lived (only seen in one sample) or that do not consume any significant CPU time (less than 0\&.001 s) will not be displayed in the output graph\&.
111 .RE
112 .PP
113 \fB\-C\fR, \fB\-\-cmdline\fR
114 .RS 4
115 Display the full command line with arguments of processes, instead of only the process name\&.
116 .RE
117 .PP
118 \fB\-g\fR, \fB\-\-control\-group\fR
119 .RS 4
120 Display process control group
121 .RE
122 .PP
123 \fB\-o\fR, \fB\-\-output \fR\fB\fIpath\fR\fR
124 .RS 4
125 Specify the output directory for the graphs\&. By default, bootchart writes the graphs to
126 /run/log\&.
127 .RE
128 .PP
129 \fB\-i\fR, \fB\-\-init \fR\fB\fIpath\fR\fR
130 .RS 4
131 Use this init binary\&. Defaults to
132 \fB/usr/lib/systemd/systemd\fR\&.
133 .RE
134 .PP
135 \fB\-p\fR, \fB\-\-pss\fR
136 .RS 4
137 Enable logging and graphing of processes\*(Aq PSS (Proportional Set Size) memory consumption\&. See
138 filesystems/proc\&.txt
139 in the kernel documentation for an explanation of this field\&.
140 .RE
141 .PP
142 \fB\-e\fR, \fB\-\-entropy\fR
143 .RS 4
144 Enable logging and graphing of the kernel random entropy pool size\&.
145 .RE
146 .PP
147 \fB\-x\fR, \fB\-\-scale\-x \fR\fB\fIN\fR\fR
148 .RS 4
149 Horizontal scaling factor for all variable graph components\&.
150 .RE
151 .PP
152 \fB\-y\fR, \fB\-\-scale\-y \fR\fB\fIN\fR\fR
153 .RS 4
154 Vertical scaling factor for all variable graph components\&.
155 .RE
156 .SH "OUTPUT"
157 .PP
158 \fBsystemd\-bootchart\fR
159 generates SVG graphs\&. In order to render those on a graphical display any SVG capable viewer can be used\&. It should be noted that the SVG render engines in most browsers (including Chrome and Firefox) are many times faster than dedicated graphical applications like Gimp and Inkscape\&. Just point your browser at
160 \m[blue]\fB\%file:///run/log/\fR\m[]!
161 .SH "HISTORY"
162 .PP
163 This version of bootchart was implemented from scratch, but is inspired by former bootchart incantations:
164 .PP
165 \fIOriginal bash\fR
166 .RS 4
167 The original bash/shell code implemented bootchart\&. This version created a compressed tarball for processing with external applications\&. This version did not graph anything, only generated data\&.
168 .RE
169 .PP
170 \fIUbuntu C Implementation\fR
171 .RS 4
172 This version replaced the shell version with a fast and efficient data logger, but also did not graph the data\&.
173 .RE
174 .PP
175 \fIJava bootchart\fR
176 .RS 4
177 This was the original graphing application for charting the data, written in java\&.
178 .RE
179 .PP
180 \fIpybootchartgui\&.py\fR
181 .RS 4
182 pybootchart created a graph from the data collected by either the bash or C version\&.
183 .RE
184 .PP
185 The version of bootchart you are using now combines both the data collection and the charting into a single application, making it more efficient and simpler\&. There are no longer any timing issues with the data collector and the grapher, as the graphing cannot be run until the data has been collected\&. Also, the data kept in memory is reduced to the absolute minimum needed\&.
186 .SH "SEE ALSO"
187 .PP
188 \fBbootchart.conf\fR(5)
189 .SH "BUGS"
190 .PP
191 systemd\-bootchart does not get the model information for the hard drive unless the root device is specified with
192 root=/dev/sdxY\&. Using UUIDs or PARTUUIDs will boot fine, but the hard drive model will not be added to the chart\&.
193 .PP
194 For bugs, please contact the author and current maintainer:
195 .RS 4
196 Auke Kok <auke\-jan\&.h\&.kok@intel\&.com>
197 .RE