CLI Commands
The CLI is a standalone tool that works on any running JVM process. You don't need to have started the application with any special flags. You don't need to install an agent. If you can see the process in jps, Argus can diagnose it.
Your First Diagnosis
Let's say you have a Java application that's behaving strangely. Here's how you'd investigate:
# Step 1: Find your application's PID
argus ps
# Step 2: Get an overview of the JVM
argus info 12345
# Step 3: Check GC behavior — is the GC working too hard?
argus gc 12345
# Step 4: Look at memory — is something leaking?
argus heap 12345
# Step 5: Check threads — are there too many? Any deadlocked?
argus threads 12345
argus deadlock 12345
# Step 6: If memory is the issue, find what's consuming it
argus histo 12345
Argus CLI in action — diagnosing a running JVM process
All 71 Commands
Every command follows the same pattern: argus <command> <pid>. All commands support --format=json for scripting and --source=auto|agent|jdk to control the data source.
| Category | Commands | What they tell you |
|---|---|---|
| Health & triage | doctor, suggest, report, snapshot, compare, top, tui, info, ps, init, env, watch |
One-click JVM health diagnosis; flag tuning recommendations; full diagnostic report; forensic bundle; side-by-side two-PID comparison; real-time agent dashboard; interactive terminal UI; JVM version/uptime/flags; list running JVM processes; first-time setup wizard; launch environment (classpath, VM args); htop-style live JVM dashboard |
| GC | gc, gcutil, gccause, gcnew, gcwhy, gcscore, gclog, gclogdiff, gcrun, gcprofile, g1, zgc |
GC stats (heap usage, pause time, collector); generation utilization % (jstat-style); last/current GC cause with gen utilization; young-gen detail (eden, survivor, tenuring); plain-English narration of the worst GC pause; A–F GC health scorecard (live PID or GC-log file); analyze GC log files (pauses, causes, tuning); compare two GC log files; trigger System.gc() remotely; JFR-based allocation profiling; G1GC live health verdict; ZGC live health verdict |
| Memory & heap | heap, histo, heapdump, heapanalyze, diff, nmt, buffers, metaspace |
Detailed heap usage with space breakdown; heap object histogram (count + size); generate heap dump (.hprof); offline HPROF analysis — dominator tree, retained sizes, leak suspects; heap snapshot comparison (leak detection); native memory tracking by category; NIO direct/mapped buffer pools; metaspace usage by space type |
| Threads & concurrency | threads, threaddump, deadlock, pool |
Thread state summary with distribution bars; full thread dump (jstack replacement); automated deadlock detection; thread pool grouping with state distribution |
| CPU & profiling | profile, profile-gate, flame, benchmark, jfr, jfranalyze, events, slowlog, trace |
CPU/alloc/lock/wall profiling (async-profiler); CI/CD CPU regression gate comparing a profile snapshot against a baseline; one-shot flame graph (HTML, opens browser); sampling-based throughput estimate for a method; JFR start/stop/check/dump; analyze JFR recording file; VM internal event log (safepoints, deoptimizations); real-time slow method detection (JFR streaming); method call tree from thread-dump sampling |
| Classes | classstat, classloader, classleak, searchclass, stringtable, symboltable |
Class loading throughput; class loader hierarchy + class counts; classloader-level metaspace leak attribution (--top/--save/--diff/--watch); search loaded classes by pattern; interned string table statistics; JVM symbol table statistics |
| Runtime & VM | sysprops, vmflag, vmset, vmlog, compiler, compilerqueue, perfcounter, finalizer, dynlibs, logger, mbean, jmx |
JVM system properties (-D flags); show/filter non-default VM flags; set a manageable VM flag at runtime; control JVM unified logging at runtime; JIT compiler status + code cache usage; current JIT compilation queue; low-level JVM performance counters; finalizer queue status; native libraries loaded in the JVM; view/change log levels at runtime; MBean browser (domains, attributes); JMX management agent control |
| Diagnostics & ops | rightsize, explain, instrument, harness, alert, ci, cluster, spring |
JVM right-sizing recommendations (-Xmx/-Xms, container request/limit) from observed heap HWM/live-set; plain-English lookup of GC causes, flags, and metrics (--llm adds opt-in LLM advisory with BYO key); opt-in live method instrumentation (watch/trace/monitor) — requires --enable-instrument and the agent JAR; continuous trend-aware health watch (doctor + 4 trend rules over a window); threshold-based webhook alerting; CI/CD health gate with exit codes; multi-instance aggregated health; Spring Boot app inspection via JMX |
ZGC Diagnosis
ZGC monitoring in one command. argus zgc <PID> runs a 30-second live JFR capture and returns a HEALTHY/WARNING/UNHEALTHY verdict driven by allocation stalls, SoftMaxHeapSize breach, and cycle overlap — the signals JDK Mission Control surfaces with three GUI clicks, in a one-line CLI.
The command pre-checks the target JVM via JMX to confirm ZGC is the active collector, then captures a JFR profile recording, parses ZGC-specific events, and prints a verdict with concrete tuning recommendations. Use --duration=N to override the default 30-second capture window (clamped 5–120 seconds). Allocation stalls now ship with the top-5 allocator call sites from the same JFR capture, so you see what allocated and who stalled in one shot. Use --save/--diff to track ZGC health across deploys, or --watch for live load tests.
$ argus zgc 12345
ZGC Diagnosis (PID 12345, JDK 21, Generational)
Heap committed 4.2 GB / soft 4.0 GB / max 5.0 GB
Cycles 12 minor, 2 major (avg interval 2.5s)
Allocation Stalls ✘ 7 stalls in 30s (max 508.8ms)
Verdict: UNHEALTHY — allocation stalls + soft-max breach
Recommend:
• Raise -Xmx (e.g. -Xmx7g)
• Or raise -XX:SoftMaxHeapSize toward -Xmx
• Profile allocations: argus profile 12345 --event=alloc
If the JVM is not running ZGC, the command exits with a clear message and suggests argus gc <PID> instead. Requires Java 21+ on the target process.
# Save a healthy baseline before a deploy
$ argus zgc 12345 --save=/tmp/zgc-pre.txt
Saved ZGC baseline to: /tmp/zgc-pre.txt
# After the deploy, see what changed
$ argus zgc 12345 --diff=/tmp/zgc-pre.txt
ZGC Diff (baseline 2026-05-08T12:00:00Z → now 2026-05-08T12:30:00Z, +30 min)
Heap committed 4.0 GB → 4.5 GB (+512 MB) ⚠
Allocation stalls 0 → 7 (NEW) ✘
Pause Mark End 0.30ms → 0.42ms (+0.12ms ⚠)
# Or watch live during a load test (10 iterations, 60 s between captures)
$ argus zgc 12345 --watch=10 --interval=60