jinfo (JVM configuration viewer)¶
jinfo is a command-line utility included in the Java Development Kit (JDK) used to view and configure Java Virtual Machine (JVM) system properties and JVM flags for a specified Java process^[600-developer-operation-maintenance-zabbix-zabbix-key.md:358-408].
Functionality¶
The primary function of jinfo is to attach to a running Java process and output detailed configuration information.^[600-developer-operation-maintenance-zabbix-zabbix-key.md:358-408]
The output generally includes two main categories of information:
- Java System Properties: A list of key-value pairs defining the system environment, such as
java.vendor,java.home,user.language, andfile.encoding.^[600-developer-operation-maintenance-zabbix-zabbix-key.md:358-408] - VM Flags: Displays both non-default VM flags (e.g., heap size settings like
-XX:InitialHeapSize) and the full command line arguments used to start the JVM (e.g.,-Xmx700m).^[600-developer-operation-maintenance-zabbix-zabbix-key.md:358-408]
Usage Syntax¶
To view the configuration of a specific JVM instance, the command requires the Process ID (PID) of the target Java process^[600-developer-operation-maintenance-zabbix-zabbix-key.md:358-408].
jinfo <pid>
When executed, the utility prints the "Attaching to process ID..." status, followed by the debugger confirmation and the complete list of properties and flags^[600-developer-operation-maintenance-zabbix-zabbix-key.md:358-408].
Practical Applications¶
In system administration and automation, jinfo is often used within scripts to inspect the state of running Java applications^[600-developer-operation-maintenance-zabbix-zabbix-key.md:44-50].
For example, it can be utilized in monitoring workflows (such as with Zabbix) to iterate through active Java process IDs and query specific configuration details or paths to determine if a particular application instance is running^[600-developer-operation-maintenance-zabbix-zabbix-key.md:44-50].
Related Concepts¶
- [[jcmd]]
- [[jps]]
- [[JVM]]
Sources¶
^[600-developer-operation-maintenance-zabbix-zabbix-key.md]