Java Reference
In-Depth Information
Here is how to retrieve the values of all the flags in the process:
% jinfo -flags process_id
With the -flags option, jinfo will provide information about all flags; otherwise it prints
only those specified on the command line. The output from either of these commands isn't as
easy to read as that from the -XX:+PrintFlagsFinal option, but jinfo has other features to
keep in mind.
jinfo can inspect the value of an individual flag:
% jinfo -flag PrintGCDetails process_id
Although jinfo does not itself indicate whether a flag is manageable or not, flags that are
manageable (as identified when using the PrintFlagsFinal argument) can be turned on or
off via jinfo :
% jinfo -flag -PrintGCDetails process_id # turns off PrintGCDetails
% jinfo -flag PrintGCDetails process_id
Be aware that jinfo can change the value of any flag, but that doesn't mean that the JVM
will respond to that change. For example, most flags that affect the behavior of a GC al-
gorithm are used at startup time to determine various ways that the collector will behave. Al-
tering a flag later via jinfo does not cause the JVM to change its behavior; it will continue
executing based on how the algorithm was initialized. So this technique only works for those
flags marked manageable in the output of the PrintFlagsFinal command.
Search WWH ::

Custom Search