JCMD(1)
๐ JCMD(1) โ send diagnostic command requests to a running Java Virtual Machine (JVM) ๐
๐ธ NAME ๐ธ
okay so bestie, jcmd is the utility that sends diagnostic command requests to a running Java Virtual Machine (JVM). that's the whole assignment. ๐
โจ SYNOPSIS โจ
here's the shape of it, no cap:
jcmd [pid | main-class] command... | PerfCounter.print | -f filename
jcmd [-l]
jcmd -h
pidโ When used, thejcmdutility sends the diagnostic command request to the process ID for the Java process.main-classโ When used, thejcmdutility sends the diagnostic command request to all Java processes with the specified name of the main class.commandโ The command must be a validjcmdcommand for the selected JVM. The list of available commands forjcmdis obtained by running thehelpcommand (jcmd pid help) wherepidis the process ID for the running Java process. If thepidis0, commands will be sent to all Java processes. Themain classargument will be used to match, either partially or fully, the class used to start Java. If no options are given, it lists the running Java process identifiers with the main class and command-line arguments that were used to launch the process (the same as using-l).Perfcounter.printโ Prints the performance counters exposed by the specified Java process.-f filenameโ Reads and executes commands from a specified file,filename.-lโ Displays the list of Java Virtual Machine process identifiers that are not running in a separate docker process along with the main class and command-line arguments that were used to launch the process. If the JVM is in a docker process, you must use tools such aspsto look up the PID.
Note: Usingjcmdwithout arguments is the same as usingjcmd -l.
-hโ Displays thejcmdutility's command-line help.
๐ฆ DESCRIPTION ๐ฆ
The jcmd utility is used to send diagnostic command requests to the JVM. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM. Each diagnostic command has its own set of arguments. To display the description, syntax, and a list of available arguments for a diagnostic command, use the name of the command as the argument. For example:
jcmd pid help command
If arguments contain spaces, then you must surround them with single or double quotation marks (' or "). In addition, you must escape single or double quotation marks with a backslash (\) to prevent the operating system shell from processing quotation marks. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks).
If you specify the process identifier (pid) or the main class (main-class) as the first argument, then the jcmd utility sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class. You can also send the diagnostic command request to all available Java processes by specifying 0 as the process identifier.
๐ COMMANDS FOR JCMD ๐
The command must be a valid jcmd diagnostic command for the selected JVM. The list of available commands for jcmd is obtained by running the help command (jcmd pid help) where pid is the process ID for a running Java process. If the pid is 0, commands will be sent to all Java processes. The main class argument will be used to match, either partially or fully, the class used to start Java. If no options are given, it lists the running Java process identifiers that are not in separate docker processes along with the main class and command-line arguments that were used to launch the process (the same as using -l).
The following commands are available:
๐ help [options] [arguments]
For more information about a specific command.
arguments:
command name: The name of the command for which we want help (STRING, no default value)
Note: The following options must be specified using eitherkeyorkey=valuesyntax.
options:
-all: (Optional) Show help for all commands (BOOLEAN, false).
๐ Compiler.codecache
Prints code cache layout and bounds.
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
๐ Compiler.codelist
Prints all compiled methods in code cache that are alive.
Impact: Medium
Permission: java.lang.management.ManagementPermission(monitor)
๐ Compiler.queue
Prints methods queued for compilation.
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
๐ Compiler.directives_add *filename* *arguments*
Adds compiler directives from a file.
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
arguments:
filename: The name of the directives file (STRING, no default value)
๐ Compiler.directives_clear
Remove all compiler directives.
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
๐ Compiler.directives_print
Prints all active compiler directives.
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
๐ Compiler.directives_remove
Remove latest added compiler directive.
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
๐ GC.class_histogram [options]
Provides statistics about the Java heap usage.
Impact: High --- depends on Java heap size and content.
Permission: java.lang.management.ManagementPermission(monitor)
Note: The options must be specified using eitherkeyorkey=valuesyntax.
options:
-all: (Optional) Inspects all objects, including unreachable objects (BOOLEAN, false)
๐ GC.finalizer_info
Provides information about the Java finalization queue.
Impact: Medium
Permission: java.lang.management.ManagementPermission(monitor)
๐ GC.heap_dump [options] [arguments]
Generates a HPROF format dump of the Java heap.
Impact: High --- depends on the Java heap size and content. Request a full GC unless the -all option is specified.
Permission: java.lang.management.ManagementPermission(monitor)
Note: The following options must be specified using eitherkeyorkey=valuesyntax.
options:
-all: (Optional) Dump all objects, including unreachable objects (BOOLEAN, false)
arguments:
filename: The name of the dump file (STRING, no default value)
๐ GC.heap_info
Provides generic Java heap information.
Impact: Medium
Permission: java.lang.management.ManagementPermission(monitor)
๐ฅ GC.run
Calls java.lang.System.gc().
Impact: Medium --- depends on the Java heap size and content.
๐ฅ GC.run_finalization
Calls java.lang.System.runFinalization().
Impact: Medium --- depends on the Java content.
๐ JFR.check [options]
Show information about a running flight recording
Impact: Low
Note: The options must be specified using eitherkeyorkey=valuesyntax. If no parameters are entered, information for all active recordings is shown.
options:
name: (Optional) Name of the flight recording. (STRING, no default value)verbose: (Optional) Flag for printing the event settings for the recording (BOOLEAN, false)
๐ JFR.configure [options]
Set the parameters for a flight recording
Impact: Low
Note: The options must be specified using eitherkeyorkey=valuesyntax. If no parameters are entered, the current settings are displayed.
options:
globalbuffercount: (Optional) Number of global buffers. This option is a legacy option: change thememorysizeparameter to alter the number of global buffers. This value cannot be changed once JFR has been initalized. (STRING, default determined by the value formemorysize)globalbuffersize: (Optional) Size of the global buffers, in bytes. This option is a legacy option: change thememorysizeparameter to alter the size of the global buffers. This value cannot be changed once JFR has been initalized. (STRING, default determined by the value formemorysize)maxchunksize: (Optional) Maximum size of an individual data chunk in bytes if one of the following suffixes is not used:'m'or'M'for megabytes OR'g'or'G'for gigabytes. This value cannot be changed once JFR has been initialized. (STRING, 12M)memorysize: (Optional) Overall memory size, in bytes if one of the following suffixes is not used:'m'or'M'for megabytes OR'g'or'G'for gigabytes. This value cannot be changed once JFR has been initialized. (STRING, 10M)repositorypath: (Optional) Path to the location where recordings are stored until they are written to a permanent file. (STRING, The default location is the temporary directory for the operating system. On Linux operating systems, the temporary directory is/tmp. On Windwows, the temporary directory is specified by theTMPenvironment variable.)stackdepth: (Optional) Stack depth for stack traces. Setting this value greater than the default of 64 may cause a performance degradation. This value cannot be changed once JFR has been initialized. (LONG, 64)thread_buffer_size: (Optional) Local buffer size for each thread in bytes if one of the following suffixes is not used:'k'or'K'for kilobytes or'm'or'M'for megabytes. Overriding this parameter could reduce performance and is not recommended. This value cannot be changed once JFR has been initialized. (STRING, 8k)samplethreads: (Optional) Flag for activating thread sampling. (BOOLEAN, true)
๐ JFR.dump [options]
Write data to a file while a flight recording is running
Impact: Low
Note:
Like, the options have to be written with either key or key=value syntax โ that's the only way. And no, nothing is required, bestie. Your recording keeps running after the data gets written, so no stress there. ๐
options:
beginโ (Optional) The start of the time window for the recording data that gets included in the dump file. Format is local time. (STRING, no default value)endโ (Optional) The end of the time window for the recording data that gets included in the dump file. Format is local time. (STRING, no default value)
Note: for bothbeginandend, the time has to be in a format thatjava.time.LocalTime::parse(STRING),java.time.LocalDateTime::parse(STRING)orjava.time.Instant::parse(STRING)can read. For example,"13:20:15","2020-03-17T09:00:00"or"2020-03-17T09:00:00Z".
Note: thebeginandendtimes line up with the timestamps found inside the recorded information in the flight recording data. iykyk ๐
Another option (hehe) is a time relative to right now, which you write as a negative integer followed by "s", "m" or "h". For example, "-12h", "-15m" or "-30s" โจ
filenameโ (Optional) The name of the file the flight recording data gets dumped into. If you don't give a filename, one gets generated from the PID and the current date. The filename can also be a directory, in which case the filename is generated from the PID and the current date inside that directory you specified. (STRING, no default value)maxageโ (Optional) How long a length of time for dumping the flight recording data to a file. (INTEGER followed by's'for seconds,'m'for minutes or'h'for hours, no default value)maxsizeโ (Optional) The maximum size for the amount of data to dump from a flight recording, in bytes โ that's if you don't use one of these suffixes:'m'or'M'for megabytes OR'g'or'G'for gigabytes. (STRING, no default value)nameโ (Optional) The name of the recording. If you don't give a name, data from all recordings gets dumped. (STRING, no default value)path-to-gc-rootโ (Optional) A flag for saving the path to garbage collection (GC) roots at the moment the recording data gets dumped. This path info is genuinely useful for hunting down memory leaks, but collecting it can make your app pause for a short period of time ๐ญ so only turn this flag on when you actually suspect your application has a memory leak. (BOOLEAN, false)
๐ธ JFR.start [options] ๐ธ
Starts a flight recording. Slay, let's capture some history. ๐
Impact: Low
Note: the options have to be specified using eitherkeyorkey=valuesyntax. If you enter no parameters at all, a recording starts with the default values.
options:
delayโ (Optional) How long to wait before it actually starts recording (INTEGER followed by's'for seconds,'m'for minutes or'h'for hours,0s)diskโ (Optional) Flag for also writing the data to disk while recording (BOOLEAN,true)dumponexitโ (Optional) Flag for writing the recording to disk when the Java Virtual Machine (JVM) shuts down. If it's set to'true'and you didn't give a value forfilename, the recording gets written to a file in the directory where the process was started. The file name is a system-generated name containing the process ID, the recording ID and the current time stamp. (For example:id-1-2019_12_12_10_41.jfr) (BOOLEAN,false)durationโ (Optional) How long to record for. Heads up,0smeans forever ๐ (INTEGER followed by's'for seconds,'m'for minutes or'h'for hours,0s)filenameโ (Optional) The name of the file the flight recording data gets written to when the recording is stopped. If you don't give a filename, one gets generated from the PID and the current date and placed in the directory where the process was started. The filename can also be a directory, in which case the filename is generated from the PID and the current date inside the directory you specified. (STRING, no default value)maxageโ (Optional) Maximum time to keep the recorded data on disk. This parameter is only valid whendiskis set totrue. Note:0smeans forever. (INTEGER followed by's'for seconds,'m'for minutes or'h'for hours,0s)maxsizeโ (Optional) Maximum size of the data to keep on disk, in bytes โ that's if you're not using one of these suffixes:'m'or'M'for megabytes OR'g'or'G'for gigabytes. This parameter is only valid whendiskis set to'true'. The value must not be less than the value for themaxchunksizeparameter set with theJFR.configurecommand. (STRING,0(no maximum size))nameโ (Optional) The name of the recording. If you don't provide a name, one gets generated for you. Write down that generated name, bestie โ it shows up in the response to the command and you'll need it for the other commands. (STRING, system-generated default name)path-to-gc-rootโ (Optional) Flag for saving the path to garbage collection (GC) roots at the end of a recording. This path info is great for finding memory leaks but collecting it is time consuming ๐ฎโ๐จ so only turn on this flag when you suspect your application has a memory leak. If thesettingsparameter is set to'profile', then the information collected also includes the stack trace from where the potential leaking object was allocated. (BOOLEAN,false)settingsโ (Optional) The name of the settings file that says which events to record. To specify more than one file, separate the names with a comma (,). Include the path if the file isn't inJAVA-HOME/lib/jfr. These profiles ship with the JDK in theJAVA-HOME/lib/jfrdirectory:'default.jfc'โ collects a predefined set of information with low overhead, so it has minimal impact on performance and can be used with recordings that run continuously;'profile.jfc'โ provides more data than the'default.jfc'profile, but with more overhead and impact on performance, so use this configuration for short periods of time when you need more info. Usenoneto start a recording without a predefined configuration file. (STRING,JAVA-HOME/lib/jfr/default.jfc)
Event settings and .jfc options can be specified using the following syntax:
optionโ (Optional) Specifies the option value to modify. To list the available options, use theJAVA_HOME/bin/jfrtool.event-settingโ (Optional) Specifies the event setting value to modify. Use the form:#=To add a new event setting, prefix the event name with'+'.
You can specify values for multiple event settings and .jfc options by separating them with a whitespace. And if there's ever a conflict between a parameter and a .jfc option, the parameter takes precedence โ periodt. The whitespace delimiter can be omitted for timespan values, i.e. 20ms. For more info about the settings syntax, see the Javadoc of the jdk.jfr package. ๐ฆ
๐ JFR.stop [options] ๐
Stops a flight recording. That's it, that's the vibe.
Impact: Low
Note: the options must be specified using eitherkeyorkey=valuesyntax. And if you enter no parameters at all, then no recording is stopped. (Iconic behaviour, honestly.)
options:
filenameโ (Optional) The name of the file the recording gets written to when the recording is stopped. If no path is provided, the data from the recording is discarded ๐๏ธ (STRING, no default value)nameโ (Optional) The name of the recording (STRING, no default value)
๐ง JVMTI.agent_load [arguments] ๐ง
Loads a JVMTI native agent.
Impact: Low
Permission: java.lang.management.ManagementPermission(control)
arguments:
library pathโ Absolute path of the JVMTI agent to load. (STRING, no default value)agent optionโ (Optional) Option string to pass the agent. (STRING, no default value)
๐ฅ JVMTI.data_dump ๐ฅ
Signals the JVM to do a data-dump request for JVMTI.
Impact: High
Permission: java.lang.management.ManagementPermission(monitor)
๐ ManagementAgent.start [options] ๐
Starts the remote management agent.
Impact: Low --- no impact
Note: the following options must be specified using eitherkeyorkey=valuesyntax.
options:
config.fileโ (Optional) Setscom.sun.management.config.file(STRING, no default value)jmxremote.hostโ (Optional) Setscom.sun.management.jmxremote.host(STRING, no default value)jmxremote.portโ (Optional) Setscom.sun.management.jmxremote.port(STRING, no default value)jmxremote.rmi.portโ (Optional) Setscom.sun.management.jmxremote.rmi.port(STRING, no default value)jmxremote.sslโ (Optional) Setscom.sun.management.jmxremote.ssl(STRING, no default value)jmxremote.registry.sslโ (Optional) Setscom.sun.management.jmxremote.registry.ssl(STRING, no default value)jmxremote.authenticateโ (Optional) Setscom.sun.management.jmxremote.authenticate(STRING, no default value)jmxremote.password.fileโ (Optional) Setscom.sun.management.jmxremote.password.file(STRING, no default value)jmxremote.access.fileโ (Optional) Setscom.sun.management.jmxremote.access.file(STRING, no default value)jmxremote.login.configโ (Optional) Setscom.sun.management.jmxremote.login.config(STRING, no default value)jmxremote.ssl.enabled.cipher.suitesโ (Optional) Setscom.sun.management.jmxremote.ssl.enabled.cipher.suiteโ (STRING, no default value)jmxremote.ssl.enabled.protocolsโ (Optional) Setscom.sun.management.jmxremote.ssl.enabled.protocols(STRING, no default value)jmxremote.ssl.need.client.authโ (optional) setscom.sun.management.jmxremote.need.client.authโจ (aSTRING, no default value, so likeโฆ you're on your own bestie)jmxremote.ssl.config.fileโ (optional) setscom.sun.management.jmxremote.ssl_config_file๐ (aSTRING, no default value)jmxremote.autodiscoveryโ (optional) setscom.sun.management.jmxremote.autodiscovery๐ฆ (aSTRING, no default value)jdp.portโ (optional) setscom.sun.management.jdp.port(anINT, no default value)jdp.addressโ (optional) setscom.sun.management.jdp.address(aSTRING, no default value)jdp.source_addrโ (optional) setscom.sun.management.jdp.source_addr(aSTRING, no default value) ๐ธjdp.ttlโ (optional) setscom.sun.management.jdp.ttl(anINT, no default value)jdp.pauseโ (optional) setscom.sun.management.jdp.pause(anINT, no default value)jdp.nameโ (optional) setscom.sun.management.jdp.name(aSTRING, no default value) ๐
ManagementAgent.start_local
Starts the local management agent, bestie. It's the low-key sibling of start โ right there on the same box.
Impact: Low โ literally no impact ๐
ManagementAgent.status
Prints out the management agent status, so you can vibe check it ๐
Impact: Low โ no impact
Permission: java.lang.management.ManagementPermission(monitor)
ManagementAgent.stop
Stops the remote management agent. bye bestie ๐ซถ
Impact: Low โ no impact
Permission: java.lang.management.ManagementPermission(monitor)
Thread.print [options]
Prints all the threads, stacktraces and all โ the full group chat screenshot of your JVM ๐ญ
Impact: Medium โ depends on the number of threads
Permission: java.lang.management.ManagementPermission(monitor)
Note: the following options must be specified using eitherkeyorkey=valuesyntax. No free-form chaos allowed โจ
options:
-lโ (optional) printsjava.util.concurrentlocks (BOOLEAN,false) ๐ฅ
VM.cds [arguments]
Dumps a static or dynamic shared archive that includes all currently loaded classes. It's giving "here's everything I've ever loved, in one file" ๐
Impact: Medium โ pause time depends on number of loaded classes
Permission: java.lang.management.ManagementPermission(monitor)
arguments:
subcmdโ must be eitherstatic_dumporfilenameโ (optional) name of the shared archive to be dumped (STRING, no default value)
If filename is not specified, a default file name is chosen using the pid of the target JVM process. For example, java_pid1234_static.jsa, java_pid5678_dynamic.jsa, etc. ๐ฆ
If filename is not specified as an absolute path, the archive file is created in a directory relative to the current directory of the target JVM process. no cap, that's the actual rule.
VM.classloaders [options]
Prints the classloader hierarchy โ the whole family tree of who loaded what ๐
Impact: Medium โ Depends on number of class loaders and classes loaded
Permission: java.lang.management.ManagementPermission(monitor)
The following options must be specified using either key or key=value syntax:
options:
show-classesโ (optional) print loaded classes (BOOLEAN,false)verboseโ (optional) print detailed information (BOOLEAN,false)foldโ (optional) show loaders of the same name and class as one (BOOLEAN,true) โ note that it'strueby default, the only icon here that starts on ๐
VM.classloader_stats
Prints statistics about all ClassLoaders. like a whole spreadsheet of your loaders, slay ๐
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
VM.class_hierarchy [options] [arguments]
Prints a list of all loaded classes, indented to show the class hierarchy. The name of each class is followed by the ClassLoaderData* of its ClassLoader, or "null" if it is loaded by the bootstrap class loader. it's giving organisational chart with lore ๐
Impact: Medium โ depends on the number of loaded classes
Permission: java.lang.management.ManagementPermission(monitor)
Note: the following options must be specified using eitherkeyorkey=valuesyntax.
options:
-iโ (optional) inherited interfaces should be printed (BOOLEAN,false)-sโ (optional) if a class name is specified, it prints the subclasses. If the class name is not specified, only the superclasses are printed (BOOLEAN,false) ๐ง
arguments:
classnameโ (optional) the name of the class whose hierarchy should be printed. If not specified, all class hierarchies are printed (STRING, no default value)
VM.command_line
Prints the command line used to start this VM instance. receipts, basically ๐งพ
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
VM.dynlibs
Prints the loaded dynamic libraries. all the little .so besties ๐ซถ
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
VM.info
Prints information about the JVM environment and status. the full vibe check of the whole JVM โจ
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
VM.log [options]
Lists current log configuration, enables/disables/configures a log output, or rotates all logs. it does a lot, honestly, lowkey the main character of logging ๐
Impact: Low
Permission: java.lang.management.ManagementPermission(control)
options:
Note: the following options must be specified using eitherkeyorkey=valuesyntax.
outputโ (optional) the name or index (#) of output to configure (STRING, no default value)output_optionsโ (optional) options for the output (STRING, no default value)whatโ (optional) configures what tags to log (STRING, no default value)decoratorsโ (optional) configures which decorators to use. Use'none'or an empty value to remove all (STRING, no default value) ๐ฆdisableโ (optional) turns off all logging and clears the log configuration (BOOLEAN, no default value)listโ (optional) lists current log configuration (BOOLEAN, no default value)rotateโ (optional) rotates all logs (BOOLEAN, no default value) ๐ฅ
VM.flags [options]
Prints the VM flag options and their current values. the receipts of every setting, iykyk ๐
Impact: Low
Permission: java.lang.management.ManagementPermission(monitor)
Note: the following options must be specified using eitherkeyorkey=valuesyntax.
options:
-allโ (optional) prints all flags supported by the VM (BOOLEAN,false). yes, all of them. buckle up ๐
VM.native_memory [options]
Prints native memory usage ๐พ
Impact: Medium
Permission: java.lang.management.ManagementPermission(monitor)
Note: the following options must be specified using eitherkeyorkey=valuesyntax.
options:
summaryโ (optional) requests runtime to report current memory summary, which includes total reserved and committed memory, along with memory usage summary by each subsystem (BOOLEAN,false)detailโ (optional) requests runtime to report memory allocation>= 1Kby each callsite (BOOLEAN,false)baselineโ (optional) requests runtime to baseline current memory usage, so it can be compared against in later time (BOOLEAN,false) ๐summary.diffโ (optional) requests runtime to report memory summary comparison against previous baseline (BOOLEAN,false)detail.diffโ (optional) requests runtime to report memory detail comparison against previous baseline, which shows the memory allocation activities at different callsites (BOOLEAN,false)shutdownโ (optional) requests runtime to shutdown itself and free the memory used by runtime (BOOLEAN,false) ๐ญstatisticsโ (optional) prints tracker statistics for tuning purpose (BOOLEAN,false)scaleโ (optional) memory usage in which scale,KB,MBorGB(STRING,KB) โ yes, the default isKB๐ธ
VM.print_touched_methods
Prints all methods that have ever been touched during the lifetime of this JVM. every single one. it remembers everything ๐ง โจ
Impact: Medium โ depends on Java content
VM.set_flag [arguments]
Sets the VM flag option by using the provided value. you're literally editing the JVM's settings live, main character energy ๐
Impact: Low
Permission: java.lang.management.ManagementPermission(control)
arguments:
flag nameโ the name of the flag that you want to set (STRING, no default value)string valueโ (optional) the value that you want to set (STRING, no default value)
VM.stringtable [options]
Dumps the string table. every string, just vibing in a table ๐
Impact: Medium โ depends on the Java content
Permission: java.lang.management.ManagementPermission(monitor)
Note: the following options must be specified using eitherkeyorkey=valuesyntax.
options:
-verboseโ (optional) dumps the content of each string in the table (BOOLEAN,false)
VM.symboltable [options]
Dumps the symbol table. same energy as above, but symbols ๐ฆ
Impact: Medium โ depends on the Java content
Permission: java.lang.management.ManagementPermission(monitor)
Note: the following options must be specified using eitherkeyorkey=valuesyntax).
options:
-verboseโ (optional) dumps the content of each symbol in the table (BOOLEAN,false)
VM.systemdictionary
Prints the statistics for dictionary hashtable sizes and bucket length. truly the nerdiest option and I respect it ๐
Impact: Medium
Permission: java.lang.management.ManagementPermission(monitor)
Note: the following options must be specified using eitherkeyorkey=valuesyntax.
options:
verboseโ (optional) dump the content of each dictionary entry for all class loaders (BOOLEAN,false) .
VM.system_properties
Prints the system properties. the whole -D collection, served fresh ๐
Impact: Low
Permission: java.util.PropertyPermission(*, read) โ read only bestie, don't get any ideas
VM.uptime [options]
Prints the VM uptime. how long has this bad boy been awake โฐ
Impact: Low
Note: the following options must be specified using eitherkeyorkey=valuesyntax.
options:
-dateโ (optional) adds a prefix with the current date (BOOLEAN,false) ๐
VM.version
Prints JVM version information. the classic "who even are you" check ๐
Impact: Low
...and that's the last little crumb of this entry โ it signs off with a permission requirement, so if your security manager is being a whole mood, here's exactly the thing it wants you to grant:
Permission: java.util.PropertyPermission(java.vm.version, read)
That's a java.util.PropertyPermission on the java.vm.version property, with read access โ ngl, if you're running under a security manager and something here is lowkey refusing to talk to you, this is the doorway it's stuck behind ๐ชโจ
๐ that's the whole page, bestie ๐
Okay so you made it to the very end and I'm so proud of you ๐ซถ You've got every command, every option, every flag, every gotcha โ the whole iconic lineup. Go forth and diagnose things like the main character you are ๐
Real talk though: with great jcmd power comes great "omg why did I just do that" energy. Read the flags twice before you fire off anything dramatic โ some of these options do exactly what they say, immediately, with zero chill ๐
And for the receipt-keepers among you, this page is filed under JDK 17, dated 2021 โ that's the version and date stamped on the footer, bestie, so now you know exactly which era of Unix wizardry you're reading ๐ธ
Now go close that terminal tab, hydrate, and slay the rest of your day ๐๐๐ฆ
๐ฆ where this page comes from
- arch rolling: jdk17-openjdk 17.0.21.0.3.u1-1 ยท LicenseRef-Java
- Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms