Jinfo is the JDK's own configuration information tool that allows you to view and set parameter configurations for Java processes.
Command format
jinfo [option] pid
jinfo [option] executable core
jinfo [option] [[Email Protected]]remote-hostname-or-ip
Command parameters
-flag Name
Prints a key-value pair for a given parameter.
-flag [+|-]name
Makes the given command-line argument available or unavailable.
-flag Name=value
Sets the value of the given command-line argument to the specified value.
-flags
Prints parameters passed to the JVM.
-sysprops
Prints the Java system properties expressed as key-value pairs.
-H,-help
Print help information.
Instance
A) outputs the MaxPermSize parameter of the specified Java process
jinfo-flag maxpermsize 2684-xx:maxpermsize=67108864
b) Printing parameters passed to the JVM
jinfo-flags 2265 Attaching to process ID 2265, please wait ... Debugger attached successfully. Server compiler detected. JVM version is 23.21-b01-xms256m-xmx256m-dorg.apache.activemq.usededicatedtaskrunner=true- Djava.util.logging.config.file=logging.properties-dcom.sun.management.jmxremote-dactivemq.classpath=/home/huey /huey/java/activemq/apache-activemq-5.5.1/conf; -dactivemq.home=/home/huey/huey/java/activemq/apache-activemq-5.5.1-dactivemq.base=/home/huey/huey/java/ activemq/apache-activemq-5.5.1
c) Print Java System Properties
Jinfo-sysprops 2265 Attaching to process ID 2265, please wait ... Debugger attached successfully. Server compiler detected. JVM version is 23.21-b01org.apache.activemq.usededicatedtaskrunner = Truejava.runtime.name = Java (TM) SE runtime Environmentjava.vm.version = 23.21-b01 ...
JDK Tools-jinfo:java configuration Information tool