1. jcmd (base) PS C:\Users\zishi> jcmd -h Usage: jcmd <pid | main class> <command …|PerfCounter.print|-f file> or: jcmd -l or: jcmd -h command must be a valid jcmd command for the selected jvm. Use the command “help” to see which commands are available. If the pid is 0, commands will be sent to all Java […]
Tag: jcmd
[Java executable commands] (16) Diagnostic command request sending tool jcmd: Provides a simple and powerful way to manage and monitor Java processes~
jcmd of Java executable command 1 concept 2 Advantages and disadvantages 3 use 3.1 Syntax format 3.2 jcmd -l: List running Java processes 3.3 jcmd help: list diagnostic commands for a specific process 3.4 jcmd : execute diagnostic command 4 Application scenarios Summarize 1 concept jcmd is a command-line tool in Java for interacting with […]
Linux troubleshooting java cpu too high problem, JPS, JMAP, JSTAT, JSTACK and JCMD
code: [root@localhost cpu]# cat Test.java public class Test { public static void main(String[] args) { new Thread(()->{ System.out.println(“11111″); while(true) { } },”thread1”).start(); new Thread(()->{ System.out.println(“2222″); try { Thread. sleep(100000L); } catch (InterruptedException e) { throw new RuntimeException(e); } },”thread2”).start(); new Thread(()->{ System.out.println(“33333”); try { Thread. sleep(100000L); } catch (InterruptedException e) { throw new RuntimeException(e); } […]