JVM heap, GC, and runtime metrics¶
JVM telemetry is collected only for eligible JVM processes (GRADLE_DAEMON, KOTLIN_DAEMON, KOTLIN_TOOLCHAIN, TEST_WORKER, GRADLE_WORKER, UNKNOWN_GRADLE_WORKER, JAVA_GRADLE_RELATED). GRADLE_WRAPPER and all native XCODE_* processes are not probed.
All live JVM probes run on a 10s cache TTL with a 750ms timeout and max concurrency 2.
JVM configuration (command-line & jinfo)¶
| Display name | JSON field | Unit | Kind | Source |
|---|---|---|---|---|
Heap limit (-Xmx) |
max_heap_mb |
MB | Snapshot | Command-line -Xmx argument |
Initial heap (-Xms) |
min_heap_mb |
MB | Snapshot | Command-line -Xms argument |
| Garbage collector | gc |
string | Snapshot | Command-line -XX:+Use*GC, jcmd GC.heap_info header, or jinfo -flags |
| Active processors | active_processor_count |
count | Snapshot | jcmd <pid> VM.info |
| Allowlisted system properties | java_version, java_runtime_version, java_vendor, java_vm_name, java_vm_version, os_name, os_arch |
string | Snapshot | jinfo -sysprops <pid> (strict allowlist only) |
JVM heap, metaspace, and memory pools¶
| Display name | JSON field | Unit | Kind | Source | Notes |
|---|---|---|---|---|---|
| Heap used | heap_used_mb |
MB | Gauge | jcmd GC.heap_info (fallback jstat -gc) |
Distinct from OS RSS; null if unavailable |
| Heap committed | heap_committed_mb |
MB | Gauge | jcmd GC.heap_info (fallback jstat -gc) |
Committed JVM heap |
| Heap max (runtime) | heap_max_mb |
MB | Gauge | Attach/JMX (Kotlin fallback) | null in Go cored probe; use max_heap_mb (-Xmx) |
| Heap sampled timestamp | heap_sampled_at_ms |
epoch ms | Snapshot | Probe timestamp | Indicates freshness of cached JVM sample |
| Metaspace used | metaspace_used_mb |
MB | Gauge | jcmd GC.heap_info |
Non-heap class metadata memory |
| Metaspace committed | metaspace_committed_mb |
MB | Gauge | jcmd GC.heap_info |
Committed metaspace |
| Memory pools | memory_pools[] |
raw units | Snapshot | jcmd GC.heap_info |
Array of {name, source, used, committed, max} |
Garbage collection¶
Collected via jstat -gc <pid> (run as a supplement even when jcmd GC.heap_info succeeds):
| Display name | JSON field | Unit | Kind | jstat column |
|---|---|---|---|---|
| Young GC count | young_gc_count |
count | Cumulative counter | YGC |
| Young GC time | young_gc_time_ms / young_gc_time_seconds |
ms / seconds | Cumulative counter | YGCT |
| Old / Full GC count | old_gc_count / full_gc_count |
count | Cumulative counter | FGC |
| Old / Full GC time | old_gc_time_ms / full_gc_time_seconds |
ms / seconds | Cumulative counter | FGCT |
| Concurrent GC count | concurrent_gc_count |
count | Cumulative counter | CGC |
| Concurrent GC time | concurrent_gc_time_seconds |
seconds | Cumulative counter | CGCT |
| Total GC time | total_gc_time_seconds |
seconds | Cumulative counter | GCT |
Interpretation & limitations:
- All GC counters and durations are cumulative since JVM startup, not per-interval deltas. (The TUI Process Details view derives a recent GC rate from retained history samples.)
CGCTreflects concurrent collector time (such as G1 or ZGC concurrent phases) and does not equate directly to stop-the-world application pause time.- Collector-specific columns (for example,
CGC/CGCTon Serial or Parallel GC) may be absent (null).
JIT compilation, code cache, class loading, and safepoints¶
Collected by default in daemonitor-cored (EnableAdvancedTelemetry = true):
| Category | JSON field | Unit | Kind | Source |
|---|---|---|---|---|
| JIT compilation | jit.compiled_count, jit.failed_count, jit.invalid_count, jit.compilation_time_seconds |
count / seconds | Cumulative | jstat -compiler <pid> (ignores FailedType/FailedMethod) |
| Code cache | code_cache[] (CodeHeap '...' pools) |
raw units | Snapshot | jcmd <pid> Compiler.codecache |
| Class loading | classes.loaded, classes.loaded_total, classes.unloaded_total, classes.time_seconds |
count / seconds | Gauge / Cumulative | jstat -class <pid> |
| Safepoints | safepoints.count, safepoints.time_ns, safepoints.sync_time_ns, safepoints.application_time_ns |
count / nanoseconds | Cumulative | jcmd <pid> PerfCounter.print (sun.rt.safepoint*, sun.rt.applicationTime) |
Probe diagnostics¶
When a JVM probe fails or times out, heap_probe_diagnostics[] records {tool, operation, category} where category is one of missing_tool, timeout, permission_denied, stale_pid, parse_error, unsupported_jdk, or probe_error. Raw tool stdout/stderr is never exposed.