Hi all, It's just typo level. The jcmd help messages include non-existent option as below.
If no options are given, lists Java processes (same as -p). I confirmed the jcmd implementation, but could not find "-p". I think "-l" is correct. I write a patch from jdk9/dev/jdk (13406:f9919c0e0a18). Please review it. diff --git a/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java b/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java --- a/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java +++ b/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java @@ -119,7 +119,7 @@ System.out.println(" If the pid is 0, commands will be sent to all Java processes. "); System.out.println(" The main class argument will be used to match (either partially "); System.out.println(" or fully) the class used to start Java. "); - System.out.println(" If no options are given, lists Java processes (same as -p). "); + System.out.println(" If no options are given, lists Java processes (same as -l). "); System.out.println(" "); System.out.println(" PerfCounter.print display the counters exposed by this process "); System.out.println(" -f read and execute commands from the file "); diff --git a/test/sun/tools/jcmd/usage.out b/test/sun/tools/jcmd/usage.out --- a/test/sun/tools/jcmd/usage.out +++ b/test/sun/tools/jcmd/usage.out @@ -7,7 +7,7 @@ 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, lists Java processes (same as -p). + If no options are given, lists Java processes (same as -l). PerfCounter.print display the counters exposed by this process -f read and execute commands from the file Thanks, Yuji