Process details and termination¶
Process details view¶
Press Enter on any process row in the TUI to open its full details view. Opening details pauses background table polling and fetches data from /v1/processes/history (last 30 minutes, limit 500), /v1/daemon-logs, /v1/daemon-logs/{pid}/tail, /v1/builds (daemon-scoped, limit 20), /v1/host, and /v1/capabilities.
Adaptive pane layout¶
The details view adapts to terminal width:
| Terminal width | Layout |
|---|---|
>= 140 columns |
3 columns: ATTRIBUTES (left) | RESOURCE TRENDS + RECENT BUILDS (middle) | GRADLE LOG (right, for GRADLE_DAEMON) |
120–139 columns |
2 columns: ATTRIBUTES (left) | stacked RESOURCE TRENDS, RECENT BUILDS, and GRADLE LOG (right) |
< 120 columns |
Single combined scrollable PROCESS DETAILS panel |
When width is >= 120, use Tab / Shift+Tab (or h / l) to switch focus between panes, and Shift+Left / Shift+Right to scroll long Gradle log lines horizontally.
Information displayed¶
- Attributes: OS activity (CPU, threads, I/O, page faults, context switches, descriptors), JVM memory pools / native physical footprint, GC counters and recent GC rate, JIT compilation and code cache, process lifecycle, host resource context, and collection capabilities.
- Resource trends: RSS and Heap sparklines over the recent 30-minute window, sustained memory growth assessment, and build retention deltas.
- Recent builds (
GRADLE_DAEMON): Up to 3 recent correlated builds with status, duration, and memory delta. - Gradle log (
GRADLE_DAEMON): Scrollable redacted tail of the daemon.out.logfile.
Process termination¶
Unlike the read-only Desktop app, the TUI supports interactive process termination directly from the main process table:
- Press
xto prompt to terminate the selected process (in Grouped mode,targetis the selected row's own process). - Press
Xto prompt to terminate all currently listed processes.
Safety mechanisms¶
Daemonitor applies four safeguards (cored/internal/tui/terminate.go and model.go) before sending any termination signal:
- Target snapshot freeze: The exact process list (
pidandstartTimeMs) is frozen when the prompt opens, so background refreshes cannot change what gets terminated. - Explicit confirmation: You must press
yorYto confirm; any other key cancels immediately. - Self-protection: Refuses invalid PIDs (
<= 0) and refuses to terminatedaemonitor-cliitself. - PID-reuse verification: When
startTimeMs > 0, Daemonitor re-reads the process's live creation time from the OS immediately before signaling and aborts with"pid now belongs to a different process"if it does not match.
Signal behavior¶
Confirmed targets receive a graceful termination signal (SIGTERM on macOS/Linux, TerminateProcess on Windows) with a 3-second timeout per process. The result appears in the status bar above the footer.