[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); } […]