| James Hawkins | abd73e6 | 2016-01-19 15:10:38 -0800 | [diff] [blame] | 1 | # bootstat # |
| 2 | |
| 3 | The bootstat command records boot events (e.g., `firmware_loaded`, |
| 4 | `boot_complete`) and the relative time at which these events occurred. The |
| 5 | command also aggregates boot event metrics locally and logs the metrics for |
| 6 | analysis. |
| 7 | |
| 8 | Usage: bootstat [options] |
| 9 | options include: |
| 10 | -d Dump the boot event records to the console. |
| 11 | -h Show this help. |
| 12 | -l Log all metrics to logstorage. |
| 13 | -r Record the relative time of a named boot event. |
| 14 | |
| 15 | ## Relative time ## |
| 16 | |
| 17 | The timestamp recorded by bootstat is the uptime of the system, i.e., the |
| 18 | number of seconds since the system booted. |
| 19 | |
| 20 | ## Recording boot events ## |
| 21 | |
| 22 | To record the relative time of an event during the boot phase, call `bootstat` |
| 23 | with the `-r` option and the name of the boot event. |
| 24 | |
| 25 | $ bootstat -r boot_complete |
| 26 | |
| 27 | The relative time at which the command runs is recorded along with the name of |
| 28 | the boot event to be persisted. |
| 29 | |
| 30 | ## Logging boot events ## |
| 31 | |
| 32 | To log the persisted boot events, call `bootstat` with the `-l` option. |
| 33 | |
| 34 | $ bootstat -l |
| 35 | |
| 36 | bootstat logs all boot events recorded using the `-r` option to the EventLog |
| 37 | using the Tron histogram. On GMS devices these logs are uploaded via Clearcut |
| 38 | for aggregation and analysis. |
| 39 | |
| 40 | ## Printing boot events ## |
| 41 | |
| 42 | To print the set of persisted boot events, call `bootstat` with the `-p` option. |
| 43 | |
| 44 | $ bootstat -p |
| 45 | Boot events: |
| 46 | ------------ |
| 47 | boot_complete 71 |