blob: b3964ce1caf65efdb5f2e4516be3740379905f5e [file] [log] [blame] [view]
James Hawkinsabd73e62016-01-19 15:10:38 -08001# bootstat #
2
3The bootstat command records boot events (e.g., `firmware_loaded`,
4`boot_complete`) and the relative time at which these events occurred. The
5command also aggregates boot event metrics locally and logs the metrics for
6analysis.
7
8 Usage: bootstat [options]
9 options include:
James Hawkinsa4a1a4a2016-02-09 15:32:38 -080010 -h, --help Show this help
11 -l, --log Log all metrics to logstorage
12 -p, --print Dump the boot event records to the console
13 -r, --record Record the timestamp of a named boot event
14 --record_boot_reason Record the reason why the device booted
James Hawkinsabd73e62016-01-19 15:10:38 -080015
16## Relative time ##
17
18The timestamp recorded by bootstat is the uptime of the system, i.e., the
19number of seconds since the system booted.
20
21## Recording boot events ##
22
23To record the relative time of an event during the boot phase, call `bootstat`
24with the `-r` option and the name of the boot event.
25
26 $ bootstat -r boot_complete
27
28The relative time at which the command runs is recorded along with the name of
29the boot event to be persisted.
30
31## Logging boot events ##
32
33To log the persisted boot events, call `bootstat` with the `-l` option.
34
35 $ bootstat -l
36
37bootstat logs all boot events recorded using the `-r` option to the EventLog
James Hawkins6d0d12a2016-01-20 13:16:31 -080038using the Tron histogram. These logs may be uploaded by interested parties
39for aggregation and analysis of boot time across different devices and
40versions.
James Hawkinsabd73e62016-01-19 15:10:38 -080041
42## Printing boot events ##
43
44To print the set of persisted boot events, call `bootstat` with the `-p` option.
45
46 $ bootstat -p
47 Boot events:
48 ------------
49 boot_complete 71