Linux command
jinfo 命令
文本
Copy it and replace filenames, paths, or keywords as needed.
命令示例
Show JVM flags
jinfo [pid]
Show system properties
jinfo -sysprops [pid]
Show specific flag
jinfo -flag [HeapDumpOnOutOfMemoryError] [pid]
Set flag dynamically
jinfo -flag +[HeapDumpOnOutOfMemoryError] [pid]
Unset flag
jinfo -flag -[PrintGC] [pid]
Print all flags
jinfo -flags [pid]
说明
jinfo prints and modifies Java VM configuration. It shows system properties and VM flags for running processes. The tool can dynamically change manageable flags. Useful for tuning JVM behavior without restart.
参数
- -flags
- Print VM flags.
- -sysprops
- Print system properties.
- -flag _NAME_
- Print or modify specific flag.
- +_FLAG_
- Enable boolean flag.
- -_FLAG_
- Disable boolean flag.
- --help
- Display help information.
FAQ
What is the jinfo command used for?
jinfo prints and modifies Java VM configuration. It shows system properties and VM flags for running processes. The tool can dynamically change manageable flags. Useful for tuning JVM behavior without restart.
How do I run a basic jinfo example?
Run `jinfo [pid]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -flags do in jinfo?
Print VM flags.