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¶
daemonitor-cored(cored/):- Polls OS processes every
2s(or1sduring active sessions /xcodebuildruns), host metrics every5s, and JVM probes on a10scache TTL with bounded concurrency (2). - Persists snapshots, process instances, lifecycle events, correlated Gradle builds, and observation sessions in
<appSupportDir>/watcher.db(SQLite WAL mode). - Serves a local HTTP/1.1 API over a Unix domain socket (
0600) on macOS/Linux or a per-user named pipe on Windows. - Native CLI & TUI (
daemonitor-cli): - Auto-starts
daemonitor-coredunless--no-autostartis passed. - Communicates exclusively with
daemonitor-coredover IPC. - Desktop application (
src/+core/): - Connects to
daemonitor-coredby default (auto-starting the bundled binary inside the app bundle). - Retains an optional
--jvm-collectorfallback (OSHI + JDK Attach API) if explicitly requested. - Hosts the local read-only MCP server (stdio via
--mcp, or localhost HTTP when enabled in Settings), queryingwatcher.dband live snapshots throughDefaultDaemonitorQueryService. - Gradle plugin (
gradle-plugin/): - Experimental local plugin that notifies
daemonitor-coredover its Unix socket to open/close build observation sessions and optionally projects GBOS custom values into Develocity Build Scans.