tree: 9922cc4190d475639e29df87e620b45a38a427b2 [path history] [tgz]
  1. delegate/
  2. events/
  3. executor/
  4. fake/
  5. fetchers/
  6. minijail/
  7. mojom/
  8. routines/
  9. seccomp/
  10. system/
  11. utils/
  12. BUILD.gn
  13. cros_healthd_daemon.cc
  14. cros_healthd_daemon.h
  15. cros_healthd_diagnostics_service.cc
  16. cros_healthd_diagnostics_service.h
  17. cros_healthd_diagnostics_service_test.cc
  18. cros_healthd_mojo_service.cc
  19. cros_healthd_mojo_service.h
  20. event_aggregator.cc
  21. event_aggregator.h
  22. fetch_aggregator.cc
  23. fetch_aggregator.h
  24. main.cc
  25. README.md
  26. service_config.h
diagnostics/cros_healthd/README.md

cros_healthd: Telemetry and Diagnostics Daemon

cros_healthd provides the universal one-stop telemetry and diagnostics API support for the ChromeOS system.

Design doc

go/cros_healthd

Development

Set up Device Under Test (DUT)

  • Make sure that the DUT is running a recent ChromeOS image, preferably by running:
    (cros-sdk) cros flash ${DUT_IP} xbuddy://remote/${BOARD}/latest-dev/test
    

Build packages (once each board)

  • Build the diagnostics package:
    (cros-sdk) USE="-cros-debug" cros build-packages --board=${BOARD}
    (cros-sdk) cros_workon-${BOARD} start diagnostics
    
    Note that cros build-packages is necessary to rebuild all dependencies with the correct USE flags.

Emerge and deploy to DUT

  • emerge the package. This is needed whenever you make code changes.

    (cros-sdk) USE="-cros-debug" emerge-${BOARD} diagnostics
    
  • Deploy the package to DUT:

    (cros-sdk) cros deploy ${DUT_IP} diagnostics
    
  • Restart the cros_healthd daemon:

    (DUT) restart cros_healthd
    

Run command line tools and inspect the output

  • Run cros-health-tool for telemetry, diagnostic routines or events. For examples:
    (DUT) cros-health-tool telem --category=system
    
    (DUT) cros-health-tool diag disk_read
    
    (DUT) cros-health-tool event --category=touchpad