IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Using dump agents > Dump agents



Tool option

The tool option allows external processes to be started when an event occurs.

The following example displays a simple message when the JVM stops. The %pid token is used to pass the pid of the process to the command. The list of available tokens can be printed by specifying -Xdump:tokens. Alternatively, see the topic Dump agent tokens. If you do not specify a tool to use, a platform-specific debugger is started.

java -Xdump:tool:events=vmstop,exec="cmd /c echo process %pid has finished" -version
....
JVMDUMP039I Processing dump event "vmstop", detail "#0000000000000000" at 2012/03/01 17:52:47
 - please wait.
JVMDUMP007I JVM Requesting Tool dump using 'cmd /c echo process 2140 has finished'
JVMDUMP011I Tool dump created process 4996
process 2140 has finished
JVMDUMP013I Processed dump event "vmstop", detail "#0000000000000000".

By default, the range option is set to 1..1. If you do not specify a range option for the dump agent, the tool is started only once. To start the tool every time the event occurs, set the range option to 1..0. For more information, see range option.

By default, the thread that launches the external process waits for that process to end before continuing. The opts option can be used to modify this behavior.


Parent: Dump agents








Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.