JFR recording fails to start with "IllegalArgumentException: Unknown diagnostic command"

Solution Verified - Updated -

Issue

  • Trying to start the JDK Flight Recorder (JFR) recording fails:
$ jcmd 123456 JFR.start
123456:
java.lang.IllegalArgumentException: Unknown diagnostic command
  • The Java process does not support JFR recordings:
$ ./jcmd 123456 help
123456:
The following commands are available:
VM.native_memory
ManagementAgent.stop
ManagementAgent.start_local
ManagementAgent.start
VM.classloader_stats
GC.rotate_log
Thread.print
GC.class_stats
GC.class_histogram
GC.heap_dump
GC.finalizer_info
GC.heap_info
GC.run_finalization
GC.run
VM.uptime
VM.dynlibs
VM.flags
VM.system_properties
VM.command_line
VM.version
help

Environment

  • OpenJDK

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content