@@ -13,6 +13,8 @@ Currently, it allows you to:
1313- To run jcmd remotely on your application
1414- To start, stop and retrieve JFR and [ async-profiler] ( https://github.com/jvm-profiling-tools/async-profiler )
1515 ([ SapMachine] ( https://sapmachine.io ) only) profiles from your application
16+ - To run [ jstall] ( https://github.com/parttimenerd/jstall ) for one-shot JVM inspection (deadlock detection, hot threads,
17+ dependency graphs, and more) — bundled directly in the plugin, requires Java 17+ locally
1618
1719## Installation
1820
@@ -150,6 +152,35 @@ JVM response code = 0
150152$TIME s
151153` ` `
152154
155+ Running [JStall](https://github.com/parttimenerd/jstall) for quick JVM inspection (requires Java 17+ locally) :
156+
157+ ` ` ` sh
158+ # Default: run status analysis with deadlock detection, hot threads, etc.
159+ > cf java jstall $APP_NAME
160+
161+ # Run a specific jstall subcommand
162+ > cf java jstall $APP_NAME --args 'deadlock'
163+ > cf java jstall $APP_NAME --args 'most-work --dumps 3'
164+ > cf java jstall $APP_NAME --args 'flame'
165+ ` ` `
166+
167+ Recording JVM diagnostic data for later analysis or sharing :
168+
169+ ` ` ` sh
170+ # Record all JVM diagnostic data into a zip file (default: APP_NAME-status.zip)
171+ > cf java record-status $APP_NAME
172+
173+ # Record to a specific output file
174+ > cf java record-status $APP_NAME diagnostics.zip
175+
176+ # Record with full data (including expensive jcmd commands, flame graph, and JFR)
177+ > cf java record-status $APP_NAME --args '--full'
178+
179+ # Replay the recording locally with jstall
180+ > jstall -f diagnostics.zip status all
181+ > jstall -f diagnostics.zip threads all
182+ ` ` `
183+
153184# ### Variable Replacements for JCMD and Asprof Commands
154185
155186When using `jcmd` and `asprof` commands with the `--args` parameter, the following variables are automatically replaced
@@ -181,7 +212,6 @@ directory and downloads any files created there to your local directory (unless
181212The following is a list of all available commands (some of the SapMachine specific), generated via `cf java --help` :
182213
183214<pre>
184-
185215NAME :
186216 java - Obtain a heap-dump, thread-dump or profile from a running, SSH-enabled Java application.
187217
@@ -274,24 +304,43 @@ USAGE:
274304 asprof-status (recent SapMachine only)
275305 Get the status of async-profiler on a running Java application
276306
307+ status (requires Java 17+ locally, supports --args)
308+ Quick status check of the remote JVM : deadlock detection, hot threads,
309+ dependency graph, and more. Requires Java 17+ locally. Pass additional
310+ options via --args (e.g., '--dumps 3', '--full'). See
311+ https://github.com/parttimenerd/jstall
312+
313+ jstall (requires Java 17+ locally, supports --args)
314+ Inspect the remote JVM via JStall (runs on your machine, connects via cf
315+ ssh). Requires Java 17+ locally. Pass jstall subcommands and options via
316+ --args (default : ' status all' ). See
317+ https://github.com/parttimenerd/jstall
318+
319+ record-status (requires Java 17+ locally, supports --args)
320+ Record diagnostic data from the remote JVM via JStall and save to a
321+ local zip file. Requires Java 17+ locally. Output file can be specified
322+ as a trailing argument (default : APP_NAME-status.zip). Use --args to
323+ pass additional jstall record options like '--full'. See
324+ https://github.com/parttimenerd/jstall
325+
277326OPTIONS :
278- -app-instance-index -i [index], select to which instance of the app to connect
279- -args -a, Miscellaneous arguments to pass to the command (if supported) in the
327+ -- app-instance-index -i [index], select to which instance of the app to connect
328+ -- args -a, Miscellaneous arguments to pass to the command (if supported) in the
280329 container, be aware to end it with a space if it is a simple option. For
281330 commands that create arbitrary files (jcmd, asprof), the environment
282331 variables @FSPATH, @ARGS, @APP_NAME, @FILE_NAME, and @STATIC_FILE_NAME are
283332 available in --args to reference the working directory path, arguments,
284333 application name, and generated file name respectively.
285- -container-dir -cd, the directory path in the container that the heap dump/JFR/... file will be
334+ -- container-dir -cd, the directory path in the container that the heap dump/JFR/... file will be
286335 saved to
287- -dry-run -n, just output to command line what would be executed
288- -keep -k, keep the heap dump in the container; by default the heap dump/JFR/... will
336+ -- dry-run -n, just output to command line what would be executed
337+ -- keep -k, keep the heap dump in the container; by default the heap dump/JFR/... will
289338 be deleted from the container's filesystem after being downloaded
290- -local-dir -ld, the local directory path that the dump/JFR/... file will be saved to,
339+ -- local-dir -ld, the local directory path that the dump/JFR/... file will be saved to,
291340 defaults to the current directory
292- -no-download -nd, don't download the heap dump/JFR/... file to local, only keep it in the
341+ -- no-download -nd, don't download the heap dump/JFR/... file to local, only keep it in the
293342 container, implies '--keep'
294- -verbose -v, enable verbose output for the plugin
343+ -- verbose -v, enable verbose output for the plugin
295344
296345</pre>
297346
@@ -379,6 +428,17 @@ make build
379428./scripts/lint-all.sh fix
380429` ` `
381430
431+ # ## Build Configuration
432+
433+ **JStall Version**: By default, the build downloads the latest stable JStall release. To test with the latest
434+ development build from GitHub Actions instead, use :
435+
436+ ` ` ` bash
437+ JSTALL_DEV=1 make build
438+ ` ` `
439+
440+ This pulls the latest JStall build directly from the GitHub Actions artifacts instead of the released version.
441+
382442# ## Testing
383443
384444**Python Tests**: Modern pytest-based test suite.
@@ -429,24 +489,7 @@ create GitHub issues for security-related doubts or problems.
429489
430490# # Changelog
431491
432- # # Snapshot
433-
434-
435- # # 4.0.2
436-
437- # ## 4.0.2
438-
439- - Fix rare ssh connection issue
440-
441- # ## 4.0.1
442-
443- - Fix thread-dump command
444-
445- # ## 4.0.0
446-
447- - Create a proper test suite
448- - Fix many bugs discovered during testing
449- - Profiling and JCMD related features
492+ See [CHANGELOG.md](CHANGELOG.md) for a detailed list of changes.
450493
451494# # License
452495
0 commit comments