Misleading output from jcmd JFR.check

David Holmes david.holmes at oracle.com
Wed Sep 6 07:14:58 UTC 2017


On 6/09/2017 5:13 PM, Martin Skarsaune wrote:
> Martins-MacBook-Pro-2:Downloads marska$ java -version
> 
> java version "9"
> 
> Java(TM) SE Runtime Environment (build 9+181)
> 
> Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
> 
> 
> Also included in the first message ;-)

It wasn't clear that process 11700 was running the exact same JVM.

Thanks,
David

> 
> ons. 6. sep. 2017 kl. 09:10 skrev David Holmes <david.holmes at oracle.com 
> <mailto:david.holmes at oracle.com>>:
> 
>     Hi Martin,
> 
>     On 6/09/2017 5:00 PM, Martin Skarsaune wrote:
>      > Hi David
>      >
>      > Details below.
> 
>     What does "java -version" show for that JVM please.
> 
>     Thanks,
>     David
> 
>      > Cheers
>      >
>      > Martin
>      >
>      > Martins-MacBook-Pro-2:Downloads marska$
>      > /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/*jcmd
>      > 11700 VM.command_line*
>      >
>      > 11700:
>      >
>      > VM Arguments:
>      >
>      > java_command: hawtio-app-1.5.3.jar
>      >
>      > java_class_path (initial): hawtio-app-1.5.3.jar
>      >
>      > Launcher Type: SUN_STANDARD
>      >
>      > Martins-MacBook-Pro-2:Downloads marska$
>      > /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/*jcmd
>      > 11700 help*
>      >
>      > 11700:
>      >
>      > The following commands are available:
>      >
>      > JFR.configure
>      >
>      > JFR.stop
>      >
>      > JFR.start
>      >
>      > JFR.dump
>      >
>      > JFR.check
>      >
>      > VM.log
>      >
>      > VM.native_memory
>      >
>      > ManagementAgent.status
>      >
>      > ManagementAgent.stop
>      >
>      > ManagementAgent.start_local
>      >
>      > ManagementAgent.start
>      >
>      > Compiler.directives_clear
>      >
>      > Compiler.directives_remove
>      >
>      > Compiler.directives_add
>      >
>      > Compiler.directives_print
>      >
>      > VM.print_touched_methods
>      >
>      > Compiler.codecache
>      >
>      > Compiler.codelist
>      >
>      > Compiler.queue
>      >
>      > VM.classloader_stats
>      >
>      > Thread.print
>      >
>      > JVMTI.data_dump
>      >
>      > JVMTI.agent_load
>      >
>      > VM.stringtable
>      >
>      > VM.symboltable
>      >
>      > VM.class_hierarchy
>      >
>      > GC.class_stats
>      >
>      > GC.class_histogram
>      >
>      > GC.heap_dump
>      >
>      > GC.finalizer_info
>      >
>      > GC.heap_info
>      >
>      > GC.run_finalization
>      >
>      > GC.run
>      >
>      > VM.info
>      >
>      > VM.uptime
>      >
>      > VM.dynlibs
>      >
>      > VM.set_flag
>      >
>      > VM.flags
>      >
>      > VM.system_properties
>      >
>      > VM.command_line
>      >
>      > VM.version
>      >
>      > help
>      >
>      >
>      > For more information about a specific command use 'help <command>'.
>      >
>      > Martins-MacBook-Pro-2:Downloads marska$
>      >
>      >
>      > ons. 6. sep. 2017 kl. 08:53 skrev David Holmes
>     <david.holmes at oracle.com <mailto:david.holmes at oracle.com>
>      > <mailto:david.holmes at oracle.com <mailto:david.holmes at oracle.com>>>:
>      >
>      >     Hi Martin,
>      >
>      >     On 6/09/2017 4:38 PM, Martin Skarsaune wrote:
>      >      > Hi
>      >      >
>      >      > If I run *JFR.check* in build 9+181 , the response
>     indicates that
>      >     I can
>      >      > invoke *VM.unlock_commercial_features*.
>      >      > This command is not available in the given VM.
>      >      >
>      >      > The output should not refer to this command i VM where it
>     is not
>      >     available.
>      >      >
>      >      > Cheers
>      >      >
>      >      > Martin Skarsaune
>      >      >
>      >      >
>      >      > Example:
>      >      >
>      >      > Martins-MacBook-Pro-2:Downloads marska$ java -version
>      >      >
>      >      > java version "9"
>      >      >
>      >      > Java(TM) SE Runtime Environment (build 9+181)
>      >      >
>      >      > Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
>      >      >
>      >      > Martins-MacBook-Pro-2:Downloads marska$
>      >      >
>      >   
>       /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/jcmd
>     11700
>      >      > JFR.check
>      >      >
>      >      > 11700:
>      >
>      >     What JVM is process 11700? What does "jcmd 11700 help" show?
>      >
>      >     Thanks,
>      >     David
>      >     -----
>      >
>      >      > Java Flight Recorder not enabled.
>      >      >
>      >      >
>      >      > Use VM.unlock_commercial_features to enable.
>      >      >
>      >      >
>      >
> 


More information about the serviceability-dev mailing list