> ## Documentation Index
> Fetch the complete documentation index at: https://docs.efference.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Health Check

> Run the on-device diagnostic sweep and read the results

The M1 health check probes the camera, IMU, storage, networking, USB, compute,
and device services. A deep check adds stress tests. Use a USB or Bluetooth LE
(BLE) control session and stop recording, upload, or update work first.

```cpp theme={null}
HealthStatus health;
ERROR_CODE ec = dev.health_check(health);          // quick sweep (blocks)
// ERROR_CODE ec = dev.health_check(health, true); // + deep stress tier

if (ec == ERROR_CODE::SUCCESS) {
    std::printf("overall: %s\n", health.passed ? "PASS" : "FAIL");
    for (const HealthCheck& c : health.checks)
        std::printf("  %-16s %s  %s\n", c.name.c_str(),
                    c.passed ? "PASS" : "FAIL", c.detail.c_str());
}
```

`health_check()` blocks until the sweep completes and fills:

| Field            | Meaning                                    |
| ---------------- | ------------------------------------------ |
| `camera` / `imu` | current availability                       |
| `passed`         | no probe failed                            |
| `deep`           | the stress tier was included               |
| `checks`         | per-probe name, verdict, and detail string |
| `timestamp`      | when the sweep completed                   |

The last completed sweep remains cached, and `get_health_status()` returns it
without contacting the device.

## From the CLI

```sh theme={null}
ef-cli health
ef-cli health --deep
```

Available over USB and Bluetooth LE. A health check requires no data plane, so a
control-only BLE session is sufficient.

The check verifies subsystem availability and function. Validate stream
quality separately when the application depends on frame timing or sensor
noise.
