at v4.12 132 lines 4.1 kB view raw
1.TH BOOTGRAPH 8 2.SH NAME 3bootgraph \- Kernel boot timing analysis 4.SH SYNOPSIS 5.ft B 6.B bootgraph 7.RB [ OPTIONS ] 8.RB [ COMMAND ] 9.SH DESCRIPTION 10\fBbootgraph \fP reads the dmesg log from kernel boot and 11creates an html representation of the initcall timeline up to the start 12of the init process. 13.PP 14If no specific command is given, the tool reads the current dmesg log and 15outputs bootgraph.html. 16.PP 17The tool can also augment the timeline with ftrace data on custom target 18functions as well as full trace callgraphs. 19.SH OPTIONS 20.TP 21\fB-h\fR 22Print this help text 23.TP 24\fB-v\fR 25Print the current tool version 26.TP 27\fB-addlogs\fR 28Add the dmesg log to the html output. It will be viewable by 29clicking a button in the timeline. 30.TP 31\fB-o \fIfile\fR 32Override the HTML output filename (default: bootgraph.html) 33.SS "Ftrace Debug" 34.TP 35\fB-f\fR 36Use ftrace to add function detail (default: disabled) 37.TP 38\fB-callgraph\fR 39Use ftrace to create initcall callgraphs (default: disabled). If -filter 40is not used there will be one callgraph per initcall. This can produce 41very large outputs, i.e. 10MB - 100MB. 42.TP 43\fB-maxdepth \fIlevel\fR 44limit the callgraph trace depth to \fIlevel\fR (default: 2). This is 45the best way to limit the output size when using -callgraph. 46.TP 47\fB-mincg \fIt\fR 48Discard all callgraphs shorter than \fIt\fR milliseconds (default: 0=all). 49This reduces the html file size as there can be many tiny callgraphs 50which are barely visible in the timeline. 51The value is a float: e.g. 0.001 represents 1 us. 52.TP 53\fB-timeprec \fIn\fR 54Number of significant digits in timestamps (0:S, 3:ms, [6:us]) 55.TP 56\fB-expandcg\fR 57pre-expand the callgraph data in the html output (default: disabled) 58.TP 59\fB-filter \fI"func1,func2,..."\fR 60Instead of tracing each initcall, trace a custom list of functions (default: do_one_initcall) 61 62.SH COMMANDS 63.TP 64\fB-reboot\fR 65Reboot the machine and generate a new timeline automatically. Works in 4 steps. 66 1. updates grub with the required kernel parameters 67 2. installs a cron job which re-runs the tool after reboot 68 3. reboots the system 69 4. after startup, extracts the data and generates the timeline 70.TP 71\fB-manual\fR 72Show the requirements to generate a new timeline manually. Requires 3 steps. 73 1. append the string to the kernel command line via your native boot manager. 74 2. reboot the system 75 3. after startup, re-run the tool with the same arguments and no command 76.TP 77\fB-dmesg \fIfile\fR 78Create HTML output from an existing dmesg file. 79.TP 80\fB-ftrace \fIfile\fR 81Create HTML output from an existing ftrace file (used with -dmesg). 82.TP 83\fB-flistall\fR 84Print all ftrace functions capable of being captured. These are all the 85possible values you can add to trace via the -filter argument. 86 87.SH EXAMPLES 88Create a timeline using the current dmesg log. 89.IP 90\f(CW$ bootgraph\fR 91.PP 92Create a timeline using the current dmesg and ftrace log. 93.IP 94\f(CW$ bootgraph -callgraph\fR 95.PP 96Create a timeline using the current dmesg, add the log to the html and change the name. 97.IP 98\f(CW$ bootgraph -addlogs -o myboot.html\fR 99.PP 100Capture a new boot timeline by automatically rebooting the machine. 101.IP 102\f(CW$ sudo bootgraph -reboot -addlogs -o latestboot.html\fR 103.PP 104Capture a new boot timeline with function trace data. 105.IP 106\f(CW$ sudo bootgraph -reboot -f\fR 107.PP 108Capture a new boot timeline with trace & callgraph data. Skip callgraphs smaller than 5ms. 109.IP 110\f(CW$ sudo bootgraph -reboot -callgraph -mincg 5\fR 111.PP 112Capture a new boot timeline with callgraph data over custom functions. 113.IP 114\f(CW$ sudo bootgraph -reboot -callgraph -filter "acpi_ps_parse_aml,msleep"\fR 115.PP 116Capture a brand new boot timeline with manual reboot. 117.IP 118\f(CW$ sudo bootgraph -callgraph -manual\fR 119.IP 120\f(CW$ vi /etc/default/grub # add the CMDLINE string to your kernel params\fR 121.IP 122\f(CW$ sudo reboot # reboot the machine\fR 123.IP 124\f(CW$ sudo bootgraph -callgraph # re-run the tool after restart\fR 125.PP 126 127.SH "SEE ALSO" 128dmesg(1), update-grub(8), crontab(1), reboot(8) 129.PP 130.SH AUTHOR 131.nf 132Written by Todd Brandt <todd.e.brandt@linux.intel.com>