查看当前服务器线程状态

  • Post author:
  • Post category:其他


下面是使用jdk自带工具查看当前服务器线程状态

1)、进入jdk的bin,在目录框中输入cmd,回车,进入DOS操作窗口

2)、jps -v ,当前服务器上运行的java进程

C:\Program Files (x86)\Java\jdk1.7.0_45\bin>jps -v
14508  -Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -Xms256m -Xmx512m -Xmn128m -XX:PermSize=64m -XX:MaxPermSize=256m -Duser.name=liub
11332 Jps -Denv.class.path=.;C:\Program Files (x86)\Java\jdk1.7.0_45\lib\dt.jar;C:\Program Files (x86)\Java\jdk1.7.0_45\lib\tools.jar;   -Dapplication.home=C:\Program Files (x86)\Java\jdk1.7.0_45 -Xms8m

3)、jstack pid,查看进程中具体线程状态

C:\Program Files (x86)\Java\jdk1.7.0_45\bin>jstack 14508
2019-09-01 20:39:39
Full thread dump Java HotSpot(TM) Client VM (24.45-b08 mixed mode, sharing):

"Worker-72" prio=6 tid=0x057ef000 nid=0x1194 in Object.wait() [0x436ef000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)
        - locked <0x10f48db0> (a org.eclipse.core.internal.jobs.WorkerPool)
        at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)

"Worker-71" prio=6 tid=0x057f1800 nid=0x3044 in Object.wait() [0x43e5f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)
        - locked <0x10f48db0> (a org.eclipse.core.internal.jobs.WorkerPool)
        at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)

"Worker-66" prio=6 tid=0x057ef800 nid=0x3ab8 in Object.wait() [0x440df000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)
        - locked <0x10f48db0> (a org.eclipse.core.internal.jobs.WorkerPool)
        at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)
        at org.eclipse.core.internal.jobs.Worker.ru



版权声明:本文为suchenbin原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。