Gradle processes¶
Daemonitor discovers and monitors Gradle-related JVM processes on macOS, Linux, and Windows, collecting operating system resource measurements, live JVM telemetry, process hierarchy, and Gradle daemon log tails.
Recognized process types¶
| Process type | Display label | Role | Live JVM probe |
|---|---|---|---|
GRADLE_DAEMON |
Gradle daemon | Persistent build daemon (GradleDaemon) |
Yes |
GRADLE_WRAPPER |
Gradle wrapper | Short-lived client launcher (GradleWrapperMain, gradlew) |
No |
KOTLIN_DAEMON |
Kotlin daemon | Persistent Kotlin compiler daemon (KotlinCompileDaemon) |
Yes |
TEST_WORKER |
Gradle test worker | Forked test executor (GradleWorkerMain + Gradle Test Executor) |
Yes |
GRADLE_WORKER |
Gradle worker | Worker API daemon (GradleWorkerMain + Gradle Worker Daemon) |
Yes |
UNKNOWN_GRADLE_WORKER |
Unknown Gradle worker | Other GradleWorkerMain worker |
Yes |
JAVA_GRADLE_RELATED |
Java (Gradle) | Fallback Java process with -Dorg.gradle.* or Gradle internal classes |
Yes |
Daemon lifetime vs. build lifetime¶
A GRADLE_DAEMON persists across many builds (and can stay idle for hours until its idle timeout expires). Because of this:
- Live snapshots reflect the daemon's current OS and JVM state.
ProjectPathisnullon liveGRADLE_DAEMONand worker rows because daemons are shared across projects; onlyGRADLE_WRAPPERsetsProjectPathfrom its working directory. - Build history tracks individual build executions inside a daemon by correlating
Marking the daemon as busy→Marking the daemon as idlewindows in<GRADLE_USER_HOME>/daemon/<version>/daemon-<pid>.out.log.
Process hierarchy¶
In Grouped view (Desktop and TUI), GRADLE_DAEMON acts as a hierarchy root. Child workers (TEST_WORKER, GRADLE_WORKER, UNKNOWN_GRADLE_WORKER, and child KOTLIN_DAEMON processes when spawned under the daemon) nest beneath their owning daemon with aggregated RSS and CPU on the root row.
JVM telemetry and arguments¶
For Gradle processes, Daemonitor:
- Parses
-Xmx(max_heap_mb),-Xms(min_heap_mb), and-XX:+Use*GC(gc) from the command line. - Detects automation flags (
--non-interactive,--console=plain,--console plain) and flags them asAUTOMATED. - Collects live heap, metaspace, memory pools, GC counts/times (
YGC/YGCT,FGC/FGCT,CGC/CGCT,GCT), JIT compilation, code cache, class loading, safepoints, and allowlisted JVM system properties viajcmd,jstat, andjinfo.
Logs, build history, and coding-agent attribution¶
daemonitor-cored polls daemon .out.log files for active GRADLE_DAEMON PIDs, redacts sensitive tokens, retains a 100-line ring buffer, and correlates each build window with SQLite process samples to record:
- Project directory (
currentDir), duration, final status (SUCCESS,FAILED,COMPLETED_NO_OUTCOME,INTERRUPTED), peak/average RSS, and peak CPU. - Invocation source:
IDE,TERMINAL, orUNKNOWN. - Coding-agent attribution: Infers
Claude Code,Cursor,Codex,Gemini CLI,Aider, or genericAI_*fromConfiguring env variables: [...]after subtracting ambient daemon environment variables (suppressed for IDE builds).
Filtering Gradle workloads in CLI¶
daemonitor-cli ps --ecosystem gradle
daemonitor-cli builds --project myapp --include-logs
daemonitor-cli logs
See also: Gradle plugin and Develocity.