@@ -8,14 +8,23 @@ bootgraph \- Kernel boot timing analysis
8
8
.RB [ COMMAND ]
9
9
.SH DESCRIPTION
10
10
\fB bootgraph \fP reads the dmesg log from kernel boot and
11
- creates an html representation of the initcall timeline up to the start
12
- of the init process.
11
+ creates an html representation of the initcall timeline. It graphs
12
+ every module init call found, through both kernel and user modes. The
13
+ timeline is split into two phases: kernel mode & user mode. kernel mode
14
+ represents a single process run on a single cpu with serial init calls.
15
+ Once user mode begins, the init process is called, and the init calls
16
+ start working in parallel.
13
17
.PP
14
18
If no specific command is given, the tool reads the current dmesg log and
15
- outputs bootgraph.html .
19
+ outputs a new timeline .
16
20
.PP
17
21
The tool can also augment the timeline with ftrace data on custom target
18
22
functions as well as full trace callgraphs.
23
+ .PP
24
+ Generates output files in subdirectory: boot-yymmdd-HHMMSS
25
+ html timeline : <hostname>_boot.html
26
+ raw dmesg file : <hostname>_boot_dmesg.txt
27
+ raw ftrace file : <hostname>_boot_ftrace.txt
19
28
.SH OPTIONS
20
29
.TP
21
30
\fB -h \fR
@@ -28,15 +37,18 @@ Print the current tool version
28
37
Add the dmesg log to the html output. It will be viewable by
29
38
clicking a button in the timeline.
30
39
.TP
31
- \fB -o \fI file \fR
32
- Override the HTML output filename (default: bootgraph.html)
33
- .SS "Ftrace Debug"
40
+ \fB -o \fI name \fR
41
+ Overrides the output subdirectory name when running a new test.
42
+ Use {date}, {time}, {hostname} for current values.
43
+ .sp
44
+ e.g. boot-{hostname}-{date}-{time}
45
+ .SS "advanced"
34
46
.TP
35
47
\fB -f \fR
36
48
Use ftrace to add function detail (default: disabled)
37
49
.TP
38
50
\fB -callgraph \fR
39
- Use ftrace to create initcall callgraphs (default: disabled). If -filter
51
+ Use ftrace to create initcall callgraphs (default: disabled). If -func
40
52
is not used there will be one callgraph per initcall. This can produce
41
53
very large outputs, i.e. 10MB - 100MB.
42
54
.TP
@@ -50,16 +62,19 @@ This reduces the html file size as there can be many tiny callgraphs
50
62
which are barely visible in the timeline.
51
63
The value is a float: e.g. 0.001 represents 1 us.
52
64
.TP
65
+ \fB -cgfilter \fI "func1,func2,..." \fR
66
+ Reduce callgraph output in the timeline by limiting it to a list of calls. The
67
+ argument can be a single function name or a comma delimited list.
68
+ (default: none)
69
+ .TP
53
70
\fB -timeprec \fI n \fR
54
71
Number of significant digits in timestamps (0:S, 3:ms, [6:us])
55
72
.TP
56
73
\fB -expandcg \fR
57
74
pre-expand the callgraph data in the html output (default: disabled)
58
75
.TP
59
- \fB -filter \fI "func1,func2,..." \fR
76
+ \fB -func \fI "func1,func2,..." \fR
60
77
Instead of tracing each initcall, trace a custom list of functions (default: do_one_initcall)
61
-
62
- .SH COMMANDS
63
78
.TP
64
79
\fB -reboot \fR
65
80
Reboot the machine and generate a new timeline automatically. Works in 4 steps.
@@ -73,16 +88,23 @@ Show the requirements to generate a new timeline manually. Requires 3 steps.
73
88
1. append the string to the kernel command line via your native boot manager.
74
89
2. reboot the system
75
90
3. after startup, re-run the tool with the same arguments and no command
91
+
92
+ .SH COMMANDS
93
+ .SS "rebuild"
76
94
.TP
77
95
\fB -dmesg \fI file \fR
78
96
Create HTML output from an existing dmesg file.
79
97
.TP
80
98
\fB -ftrace \fI file \fR
81
99
Create HTML output from an existing ftrace file (used with -dmesg).
100
+ .SS "other"
82
101
.TP
83
102
\fB -flistall \fR
84
103
Print all ftrace functions capable of being captured. These are all the
85
- possible values you can add to trace via the -filter argument.
104
+ possible values you can add to trace via the -func argument.
105
+ .TP
106
+ \fB -sysinfo \fR
107
+ Print out system info extracted from BIOS. Reads /dev/mem directly instead of going through dmidecode.
86
108
87
109
.SH EXAMPLES
88
110
Create a timeline using the current dmesg log.
@@ -93,13 +115,13 @@ Create a timeline using the current dmesg and ftrace log.
93
115
.IP
94
116
\f(CW $ bootgraph -callgraph \fR
95
117
.PP
96
- Create a timeline using the current dmesg, add the log to the html and change the name .
118
+ Create a timeline using the current dmesg, add the log to the html and change the folder .
97
119
.IP
98
- \f(CW $ bootgraph -addlogs -o myboot.html \fR
120
+ \f(CW $ bootgraph -addlogs -o " myboot-{date}-{time}" \fR
99
121
.PP
100
122
Capture a new boot timeline by automatically rebooting the machine.
101
123
.IP
102
- \f(CW $ sudo bootgraph -reboot -addlogs -o latestboot.html \fR
124
+ \f(CW $ sudo bootgraph -reboot -addlogs -o "latest-{hostname)" \fR
103
125
.PP
104
126
Capture a new boot timeline with function trace data.
105
127
.IP
@@ -111,7 +133,7 @@ Capture a new boot timeline with trace & callgraph data. Skip callgraphs smaller
111
133
.PP
112
134
Capture a new boot timeline with callgraph data over custom functions.
113
135
.IP
114
- \f(CW $ sudo bootgraph -reboot -callgraph -filter "acpi_ps_parse_aml,msleep" \fR
136
+ \f(CW $ sudo bootgraph -reboot -callgraph -func "acpi_ps_parse_aml,msleep" \fR
115
137
.PP
116
138
Capture a brand new boot timeline with manual reboot.
117
139
.IP
@@ -123,6 +145,15 @@ Capture a brand new boot timeline with manual reboot.
123
145
.IP
124
146
\f(CW $ sudo bootgraph -callgraph # re-run the tool after restart \fR
125
147
.PP
148
+ .SS "rebuild timeline from logs"
149
+ .PP
150
+ Rebuild the html from a previous run's logs, using the same options.
151
+ .IP
152
+ \f(CW $ bootgraph -dmesg dmesg.txt -ftrace ftrace.txt -callgraph \fR
153
+ .PP
154
+ Rebuild the html with different options.
155
+ .IP
156
+ \f(CW $ bootgraph -dmesg dmesg.txt -ftrace ftrace.txt -addlogs \fR
126
157
127
158
.SH "SEE ALSO"
128
159
dmesg(1), update-grub(8), crontab(1), reboot(8)
0 commit comments