Skip to content
Snippets Groups Projects
Select Git revision
  • 22dc27b9fa46b20aca4f5982979681a858a97284
  • master default protected
  • android-7.1.2_r28_klist
  • oreo-mr1-iot-release
  • sdk-release
  • pie-cts-dev
  • pie-cts-release
  • pie-vts-release
  • nougat-iot-release
  • pie-gsi
  • pie-platform-release
  • pie-r2-release
  • pie-r2-s1-release
  • pie-release
  • pie-dev
  • oreo-m4-s4-release
  • o-mr1-iot-preview-8
  • oreo-m2-s2-release
  • oreo-m2-s1-release
  • oreo-m6-s2-release
  • oreo-m6-s3-release
  • android-o-mr1-iot-release-1.0.4
  • android-9.0.0_r8
  • android-9.0.0_r7
  • android-9.0.0_r6
  • android-9.0.0_r5
  • android-8.1.0_r46
  • android-8.1.0_r45
  • android-n-iot-release-smart-display-r2
  • android-vts-8.1_r5
  • android-cts-8.1_r8
  • android-cts-8.0_r12
  • android-cts-7.1_r20
  • android-cts-7.0_r24
  • android-cts-6.0_r31
  • android-o-mr1-iot-release-1.0.3
  • android-cts-9.0_r1
  • android-8.1.0_r43
  • android-8.1.0_r42
  • android-n-iot-release-smart-display
  • android-p-preview-5
41 results

bootstat

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Mark Salyzyn authored
    Provide some easy kernel panic subreasons mined from last kmesg,
    generates a canonical boot reason (system boot reason) that
    may aid triage.
    
    Notably report kernel_panic,hung if [khungtaskd] triggers on
    a livelock condition, forms a signals on the dashboards.
    
    Helper function getSubreason modified to optionally enable checking
    for a single quote resulting in a refactoring to ease maintenance of
    the termination detection in the face of single bit errors heuristics.
    
    Test: boot_reason_test.sh
    Bug: 63736262
    Bug: 33808187
    Change-Id: I7fdd1e57e7a26095738175074306f0d2d59b1d69
    3f48fa9c
    History

    bootstat

    The bootstat command records boot events (e.g., firmware_loaded, boot_complete) and the relative time at which these events occurred. The command also aggregates boot event metrics locally and logs the metrics for analysis.

    Usage: bootstat [options]
    options include:
      -h, --help            Show this help
      -l, --log             Log all metrics to logstorage
      -p, --print           Dump the boot event records to the console
      -r, --record          Record the timestamp of a named boot event
      --record_boot_reason  Record the reason why the device booted
      --record_time_since_factory_reset Record the time since the device was reset

    Relative time

    The timestamp recorded by bootstat is the uptime of the system, i.e., the number of seconds since the system booted.

    Recording boot events

    To record the relative time of an event during the boot phase, call bootstat with the -r option and the name of the boot event.

    $ bootstat -r boot_complete

    The relative time at which the command runs is recorded along with the name of the boot event to be persisted.

    Logging boot events

    To log the persisted boot events, call bootstat with the -l option.

    $ bootstat -l

    bootstat logs all boot events recorded using the -r option to the EventLog using the Tron histogram. These logs may be uploaded by interested parties for aggregation and analysis of boot time across different devices and versions.

    Printing boot events

    To print the set of persisted boot events, call bootstat with the -p option.

    $ bootstat -p
    Boot events:
    ------------
    boot_complete   71