Skip to content

Architecture overview

Daemonitor separates low-level process collection and persistence into a lightweight native Go daemon (daemonitor-cored) that serves all user-facing interfaces over local IPC.

Operating system processes & JDK diagnostic tools (jcmd, jstat, jinfo)
                        │
                        ▼
        daemonitor-cored (Go monitoring core)
   ┌────────────────────┼────────────────────┐
   │ Discovery &        │ Bounded JVM probes │ Gradle log watcher &
   │ classification     │ & OS collectors    │ session aggregator
   └────────────────────┼────────────────────┘
                        │
          ┌─────────────┴─────────────┐
          ▼                           ▼
   SQLite (watcher.db)     Local HTTP/1.1 over IPC
   WAL mode, 0600          Unix socket (0600) / Win pipe
          │                           │
          └─────────────┬─────────────┘
                        ▼
    ┌──────────┬────────┴────────┬──────────┐
    ▼          ▼                 ▼          ▼
 Desktop      TUI               CLI        MCP
 (Compose)  (Bubble Tea)   (daemonitor-cli) (Desktop --mcp / HTTP)

Core components

  1. daemonitor-cored (cored/):
  2. Polls OS processes every 2s (or 1s during active sessions / xcodebuild runs), host metrics every 5s, and JVM probes on a 10s cache TTL with bounded concurrency (2).
  3. Persists snapshots, process instances, lifecycle events, correlated Gradle builds, and observation sessions in <appSupportDir>/watcher.db (SQLite WAL mode).
  4. Serves a local HTTP/1.1 API over a Unix domain socket (0600) on macOS/Linux or a per-user named pipe on Windows.
  5. Native CLI & TUI (daemonitor-cli):
  6. Auto-starts daemonitor-cored unless --no-autostart is passed.
  7. Communicates exclusively with daemonitor-cored over IPC.
  8. Desktop application (src/ + core/):
  9. Connects to daemonitor-cored by default (auto-starting the bundled binary inside the app bundle).
  10. Retains an optional --jvm-collector fallback (OSHI + JDK Attach API) if explicitly requested.
  11. Hosts the local read-only MCP server (stdio via --mcp, or localhost HTTP when enabled in Settings), querying watcher.db and live snapshots through DefaultDaemonitorQueryService.
  12. Gradle plugin (gradle-plugin/):
  13. Experimental local plugin that notifies daemonitor-cored over its Unix socket to open/close build observation sessions and optionally projects GBOS custom values into Develocity Build Scans.