---
description: "Diagnose LLM inference issues on Mac: asiai doctor checks engine health, port conflicts, model loading, and GPU status."
---

# asiai doctor

Diagnose installation, engines, system health, and database.

## Usage

```bash
asiai doctor
```

## Output

```
Doctor

  System
    ✓ Apple Silicon       Mac Mini M4 Pro — Apple M4 Pro
    ✓ RAM                 64 GB total, 42% used
    ✓ Memory pressure     normal
    ✓ Thermal             nominal (100%)

  Engine
    ✓ Ollama              v0.17.5 — 1 model(s): qwen3.5:35b-a3b
    ✓ Ollama config       host=0.0.0.0:11434, num_parallel=1 (default), ...
    ✓ LM Studio           v0.4.6 — 1 model(s): qwen3.5-35b-a3b
    ✗ mlx-lm              not installed
    ✗ llama.cpp           not installed
    ✗ vllm-mlx            not installed

  Database
    ✓ SQLite              2.4 MB, last entry: 1m ago

  Daemon
    ✓ Monitoring daemon   running PID 1234
    ✓ Web dashboard       not installed

  Alerting
    ✓ Webhook URL         https://hooks.slack.com/services/...
    ✓ Webhook reachable   HTTP 200

  9 ok, 0 warning(s), 3 failed
```

## Checks

- **System**: Apple Silicon detection, RAM, memory pressure, thermal state
- **Engine**: Reachability and version for all 7 supported engines; Ollama runtime parameters (host, num_parallel, max_loaded_models, keep_alive, flash_attention)
- **Database**: SQLite schema version, size, last entry timestamp
- **Daemon**: LaunchAgent status for monitor and web services
- **Alerting**: Webhook URL configuration and connectivity
