jinfo - generate Java configuration information for a specified Java process
jinfo [-flag name | -flag [+|-]name | -flag name=value | -flags | -sysprops] pid
Options you will use
-flags- VM flags.
-flag <name>- One flag.
-flag +<name>- Set a MANAGEABLE flag at runtime (e.g. HeapDumpOnOutOfMemoryError). Anything else: "cannot be changed".
-sysprops- System properties.
-flag NAME- Print one flag; -flag +NAME / -NAME / NAME=VALUE changes a MANAGEABLE flag at runtime.
Examples
$ jinfo -flag MaxHeapSize 1210$ jinfo -flag +HeapDumpOnOutOfMemoryError 1210No restart needed - it is manageable.
Gotchas
- ExitOnOutOfMemoryError is not manageable: it needs a restart.
Try jinfo in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.