tree: 5d1551e04e87cd04cefc2e378f6e6b456f8f573c [path history] [tgz]
  1. events/
  2. executor/
  3. fake/
  4. fetchers/
  5. minijail/
  6. network/
  7. network_diagnostics/
  8. process/
  9. routines/
  10. seccomp/
  11. system/
  12. utils/
  13. BUILD.gn
  14. cros_healthd.cc
  15. cros_healthd.h
  16. cros_healthd_mojo_service.cc
  17. cros_healthd_mojo_service.h
  18. cros_healthd_routine_factory.h
  19. cros_healthd_routine_factory_impl.cc
  20. cros_healthd_routine_factory_impl.h
  21. cros_healthd_routine_service.cc
  22. cros_healthd_routine_service.h
  23. cros_healthd_routine_service_test.cc
  24. fake_cros_healthd_routine_factory.cc
  25. fake_cros_healthd_routine_factory.h
  26. fetch_aggregator.cc
  27. fetch_aggregator.h
  28. main.cc
  29. README.md
  30. routine_parameter_fetcher.cc
  31. routine_parameter_fetcher.h
  32. routine_parameter_fetcher_constants.cc
  33. routine_parameter_fetcher_constants.h
  34. routine_parameter_fetcher_test.cc
diagnostics/cros_healthd/README.md

cros_healthd: Telemetry and Diagnostics Daemon

Warning: This document is old & has moved. Please update any links:
https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/diagnostics/cros_healthd/README.md

cros_healthd provides telemetry and diagnostics support for enterprise-enrolled devices.

Design

go/cros_healthd

Manual Testing

Because the telem and diag utilities are currently unable to test cros_healthd, manual testing of cros_healthd in a sandbox is necessary. If any new sources of telemetry data or diagnostic routines are added before the automation framework is complete, the new functionality must be manually tested by the developer prior to code review.

TODO(crbug.com/1023933): Update these instructions once telem can talk to cros_healthd and cherry-picking a test CL is no longer necessary.

Procedure

  • Make sure both Chrome OS and Chrome sources are up to date. This is necessary because there are a number of dependencies between Chrome OS and Chrome, and trying to deploy a recent Chrome image onto an older Chrome OS image (or vice versa) will likely fail in a manner unrelated to the code under test.

  • Enterprise-enroll the DUT. Make sure that the DUT is running a recent Chrome OS image, preferably by running:

    (cros-sdk) cros flash ${DUT_IP} xbuddy://remote/${BOARD}/latest-dev/test
    
  • Build and deploy the diagnostics package with the local changes under test:

    (cros-sdk) USE="-cros-debug" ~/trunk/src/scripts/build_packages --board=${BOARD}
    (cros-sdk) cros_workon-${BOARD} start diagnostics
    (cros-sdk) USE="-cros-debug" emerge-${BOARD} diagnostics
    (cros-sdk) cros deploy ${DUT_IP} diagnostics
    

    Note that build_packages is necessary to rebuild all dependencies with the correct USE flags.

  • Cherry-pick https://crrev.com/c/1779132 to use as a starting point for testing. Extend the CL to log any new data reported by cros_healthd in status_uploader.cc.

  • Build and deploy Chrome to the DUT using simple Chrome: https://chromium.googlesource.com/chromiumos/docs/+/HEAD/simple_chrome_workflow.md

  • Restart the DUT, and check that the fields are being reported properly:

    (DUT) grep status_uploader /var/log/chrome/chrome