jps命令(Java Virtual Machine Process Status Tool)
1.介绍
用来查看基于HotSpot JVM里面所有进程的具体状态, 包括进程ID,进程启动的路径等等。与unix上的ps类似,用来显示本地有权限的java进程,可以查看本地运行着几个java程序,并显示他们的进程号。使用jps时,不需要传递进程号做为参数。
Jps也可以显示远程系统上的JAVA进程,这需要远程服务上开启了jstat服务,以及RMI注及服务,不过常用都是对本对的JAVA进程的查看。
2.命令格式
jps [ options ] [ hostid ]
3.常用参数说明
-m 输出传递给main方法的参数,如果是内嵌的JVM则输出为null。
-l 输出应用程序主类的完整包名,或者是应用程序JAR文件的完整路径。
-v 输出传给JVM的参数。
4.使用示例
[root@diancai1 heapdump]# jps 25674 -- process information unavailable 7888 Bootstrap 7011 -- process information unavailable 4069 DiancaiMain 24044 Bootstrap 24356 Bootstrap 15639 Jps
[root@diancai1 heapdump]# jps -v 25674 -- process information unavailable 7888 Bootstrap -Djava.util.logging.config.file=/home/cms/tomcata/conf/logging.properties -Xms4096m -Xmx4096m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/java_dump/tomcata/ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/home/cms/tomcata/endorsed -Dcatalina.base=/home/cms/tomcata -Dcatalina.home=/home/cms/tomcata -Djava.io.tmpdir=/home/cms/tomcata/temp 7011 -- process information unavailable 4069 DiancaiMain 15737 Jps -Denv.class.path=.:/usr/java/lib/dt.jar:/usr/java/lib/tools.jar -Dapplication.home=/usr/java -Xms8m 24044 Bootstrap -Djava.util.logging.config.file=/home/cms/tomcatb/conf/logging.properties -Xms4096m -Xmx4096m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/java_dump/tomcatb/ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/home/cms/tomcatb/endorsed -Dcatalina.base=/home/cms/tomcatb -Dcatalina.home=/home/cms/tomcatb -Djava.io.tmpdir=/home/cms/tomcatb/temp 24356 Bootstrap -Djava.util.logging.config.file=/home/cms/tomcatc/conf/logging.properties -Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/java_dump/tomcatc/ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/home/cms/tomcatc/endorsed -Dcatalina.base=/home/cms/tomcatc -Dcatalina.home=/home/cms/tomcatc -Djava.io.tmpdir=/home/cms/tomcatc/temp
[root@diancai1 heapdump]# jps -l 25674 -- process information unavailable 7888 org.apache.catalina.startup.Bootstrap 7011 -- process information unavailable 15793 sun.tools.jps.Jps 4069 com.diancai.main.DiancaiMain 24044 org.apache.catalina.startup.Bootstrap 24356 org.apache.catalina.startup.Bootstrap
jstack命令(Java Stack Trace)
1.介绍
jstack用于打印出给定的java进程ID或core file或远程调试服务的Java堆栈信息,如果是在64位机器上,需要指定选项"-J-d64",Windows的jstack使用方式只支持以下的这种方式:jstack [-l] pid
如果java程序崩溃生成core文件,jstack工具可以用来获得core文件的java stack和native stack的信息,从而可以轻松地知道java程序是如何崩溃和在程序何处发生问题。另外,jstack工具还可以附属到正在运行的java程序中,看到当时运行的java程序的java stack和native stack的信息, 如果现在运行的java程序呈现hung的状态,jstack是非常有用的。
2.命令格式
jstack [ option ] pid jstack [ option ] executable core jstack [ option ] [server-id@]remote-hostname-or-IP
3常用参数说明
1) options:
executable Java executable from which the core dump was produced.
(可能是产生core dump的java可执行程序)
core 将被打印信息的core dump文件
remote-hostname-or-IP 远程debug服务的主机名或ip
server-id 唯一id,假如一台主机上多个远程debug服务
2) 基本参数:
-F当’jstack [-l] pid’没有相应的时候强制打印栈信息
-l长列表. 打印关于锁的附加信息,例如属于java.util.concurrent的ownable synchronizers列表.
-m打印java和native c/c++框架的所有栈信息.
-h | -help打印帮助信息
pid 需要被打印配置信息的java进程id,可以用jps查询.
4.使用示例:
[root@diancai1 heapdump]# jstack -l 7888 .... "http-8080-2" daemon prio=10 tid=0x0000000053d5f000 nid=0x1f0d in Object.wait() [0x0000000044a00000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:458) - locked <0x00002aaabe442260> (a org.apache.tomcat.util.net.JIoEndpoint$Worker) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:484) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None "http-8080-1" daemon prio=10 tid=0x0000000053d5d000 nid=0x1f0c in Object.wait() [0x0000000041b10000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:458) - locked <0x00002aaabe43e9c0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:484) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None "http-8080-Acceptor-0" daemon prio=10 tid=0x00002aabc860b000 nid=0x1f0b runnable [0x0000000041a0f000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390) - locked <0x00002aaabe484e70> (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:352) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon prio=10 tid=0x00002aabc8879800 nid=0x1f0a waiting on condition [0x0000000040bda000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1631) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None "Memcached IO over {MemcachedConnection to /172.16.3.2:11211}" prio=10 tid=0x00002aabc895a800 nid=0x1f09 runnable [0x000000004190e000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:215) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69) - locked <0x00002aaabe427390> (a sun.nio.ch.Util$1) - locked <0x00002aaabe4273a8> (a java.util.Collections$UnmodifiableSet) - locked <0x00002aaabe427318> (a sun.nio.ch.EPollSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80) at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:217) at net.spy.memcached.MemcachedConnection.run(MemcachedConnection.java:833) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#19" daemon prio=10 tid=0x00002aabc891d800 nid=0x1f08 in Object.wait() [0x00000000448ff000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#18" daemon prio=10 tid=0x00002aabc891b800 nid=0x1f07 in Object.wait() [0x00000000447fe000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#17" daemon prio=10 tid=0x00002aabc8919800 nid=0x1f06 in Object.wait() [0x00000000446fd000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#16" daemon prio=10 tid=0x00002aabc8917800 nid=0x1f05 in Object.wait() [0x00000000445fc000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#15" daemon prio=10 tid=0x00002aabc88be800 nid=0x1f04 in Object.wait() [0x00000000444fb000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#14" daemon prio=10 tid=0x00002aabc88bc800 nid=0x1f03 in Object.wait() [0x00000000443fa000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#13" daemon prio=10 tid=0x00002aabc88ba800 nid=0x1f02 in Object.wait() [0x00000000442f9000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#12" daemon prio=10 tid=0x00002aabc88b8800 nid=0x1f01 in Object.wait() [0x00000000441f8000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#11" daemon prio=10 tid=0x00002aabc88b6800 nid=0x1f00 in Object.wait() [0x00000000440f7000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#10" daemon prio=10 tid=0x00002aabc88b4800 nid=0x1eff in Object.wait() [0x0000000043ff6000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#9" daemon prio=10 tid=0x00002aabc84de800 nid=0x1efe in Object.wait() [0x0000000043ef5000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#8" daemon prio=10 tid=0x00002aabc837f800 nid=0x1efd in Object.wait() [0x0000000043df4000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#7" daemon prio=10 tid=0x00002aabc84a6800 nid=0x1efc in Object.wait() [0x0000000043cf3000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#6" daemon prio=10 tid=0x00002aabc875c800 nid=0x1efb in Object.wait() [0x0000000043bf2000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#5" daemon prio=10 tid=0x00002aabc88cb800 nid=0x1efa in Object.wait() [0x0000000043af1000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#4" daemon prio=10 tid=0x00002aabc8905000 nid=0x1ef9 in Object.wait() [0x00000000439f0000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#3" daemon prio=10 tid=0x00002aabc878b800 nid=0x1ef8 in Object.wait() [0x00000000438ef000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" daemon prio=10 tid=0x00002aabc88ed000 nid=0x1ef7 in Object.wait() [0x00000000437ee000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" daemon prio=10 tid=0x000000005590b000 nid=0x1ef6 in Object.wait() [0x00000000436ed000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" daemon prio=10 tid=0x0000000054356800 nid=0x1ef5 in Object.wait() [0x00000000435ec000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534) - locked <0x00002aaabe452d10> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) Locked ownable synchronizers: - None "Timer-0" daemon prio=10 tid=0x0000000053a64800 nid=0x1ef4 in Object.wait() [0x00000000434eb000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.util.TimerThread.mainLoop(Timer.java:509) - locked <0x00002aaabe47a160> (a java.util.TaskQueue) at java.util.TimerThread.run(Timer.java:462) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_QuartzSchedulerThread" prio=10 tid=0x00002aabc8398000 nid=0x1ef3 in Object.wait() [0x00000000433ea000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:297) - locked <0x00002aaabe4305a8> (a java.lang.Object) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-10" prio=10 tid=0x00002aabc86ac800 nid=0x1ef2 in Object.wait() [0x00000000432e9000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe5024c0> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-9" prio=10 tid=0x00002aabc809a800 nid=0x1ef1 in Object.wait() [0x00000000431e8000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe458048> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-8" prio=10 tid=0x00002aabc86fb000 nid=0x1ef0 in Object.wait() [0x00000000430e7000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe458520> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-7" prio=10 tid=0x00002aabc86fa800 nid=0x1eef in Object.wait() [0x0000000042fe6000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe504a58> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-6" prio=10 tid=0x00002aabc83a2800 nid=0x1eee in Object.wait() [0x0000000042ee5000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe504558> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-5" prio=10 tid=0x00002aabc84cd000 nid=0x1eed in Object.wait() [0x0000000042de4000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe504058> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-4" prio=10 tid=0x00002aabc84f5800 nid=0x1eec in Object.wait() [0x0000000042ce3000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe503b58> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-3" prio=10 tid=0x00002aabc8220800 nid=0x1eeb in Object.wait() [0x0000000042be2000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe503658> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-2" prio=10 tid=0x00002aabc8799000 nid=0x1eea in Object.wait() [0x0000000042ae1000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe503158> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1" prio=10 tid=0x00002aabc8683800 nid=0x1ee9 in Object.wait() [0x00000000429e0000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:519) - locked <0x00002aaabe502a78> (a org.quartz.simpl.SimpleThreadPool$WorkerThread) Locked ownable synchronizers: - None "Memcached IO over {MemcachedConnection to /172.16.3.2:11211}" prio=10 tid=0x00002aabc880b000 nid=0x1ee8 runnable [0x000000004162c000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:215) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69) - locked <0x00002aaabe458bd0> (a sun.nio.ch.Util$1) - locked <0x00002aaabe458be8> (a java.util.Collections$UnmodifiableSet) - locked <0x00002aaabe458b58> (a sun.nio.ch.EPollSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80) at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:217) at net.spy.memcached.MemcachedConnection.run(MemcachedConnection.java:833) Locked ownable synchronizers: - None "GC Daemon" daemon prio=10 tid=0x00002aabc8001800 nid=0x1ee7 in Object.wait() [0x0000000040209000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at sun.misc.GC$Daemon.run(GC.java:100) - locked <0x00002aaabe2101d0> (a sun.misc.GC$LatencyLock) Locked ownable synchronizers: - None "Low Memory Detector" daemon prio=10 tid=0x00002aabc0003800 nid=0x1ee5 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "CompilerThread1" daemon prio=10 tid=0x0000000053681000 nid=0x1ee4 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "CompilerThread0" daemon prio=10 tid=0x000000005367e800 nid=0x1ee3 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "Signal Dispatcher" daemon prio=10 tid=0x000000005367c800 nid=0x1ee2 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "Finalizer" daemon prio=10 tid=0x000000005365f800 nid=0x1ee1 in Object.wait() [0x0000000041329000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118) - locked <0x00002aaabe210ac0> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) Locked ownable synchronizers: - None "Reference Handler" daemon prio=10 tid=0x0000000053658800 nid=0x1ee0 in Object.wait() [0x0000000041228000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) - locked <0x00002aaabe2101b0> (a java.lang.ref.Reference$Lock) Locked ownable synchronizers: - None "main" prio=10 tid=0x00000000535e4000 nid=0x1ed1 runnable [0x00000000403f4000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390) - locked <0x00002aaabe6469c8> (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.apache.catalina.core.StandardServer.await(StandardServer.java:431) at org.apache.catalina.startup.Catalina.await(Catalina.java:676) at org.apache.catalina.startup.Catalina.start(Catalina.java:628) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Locked ownable synchronizers: - None "VM Thread" prio=10 tid=0x0000000053651800 nid=0x1edf runnable "GC task thread#0 (ParallelGC)" prio=10 tid=0x00000000535ee000 nid=0x1ed2 runnable "GC task thread#1 (ParallelGC)" prio=10 tid=0x00000000535f0000 nid=0x1ed3 runnable "GC task thread#2 (ParallelGC)" prio=10 tid=0x00000000535f2000 nid=0x1ed4 runnable "GC task thread#3 (ParallelGC)" prio=10 tid=0x00000000535f3800 nid=0x1ed5 runnable "GC task thread#4 (ParallelGC)" prio=10 tid=0x00000000535f5800 nid=0x1ed6 runnable "GC task thread#5 (ParallelGC)" prio=10 tid=0x00000000535f7800 nid=0x1ed7 runnable "GC task thread#6 (ParallelGC)" prio=10 tid=0x00000000535f9000 nid=0x1ed8 runnable "GC task thread#7 (ParallelGC)" prio=10 tid=0x00000000535fb000 nid=0x1ed9 runnable "GC task thread#8 (ParallelGC)" prio=10 tid=0x00000000535fd000 nid=0x1eda runnable "GC task thread#9 (ParallelGC)" prio=10 tid=0x00000000535fe800 nid=0x1edb runnable "GC task thread#10 (ParallelGC)" prio=10 tid=0x0000000053600800 nid=0x1edc runnable "GC task thread#11 (ParallelGC)" prio=10 tid=0x0000000053602800 nid=0x1edd runnable "GC task thread#12 (ParallelGC)" prio=10 tid=0x0000000053604000 nid=0x1ede runnable "VM Periodic Task Thread" prio=10 tid=0x00002aabc0006800 nid=0x1ee6 waiting on condition JNI global references: 851
相关推荐
JVM监控工具是Java开发者和运维人员不可或缺的工具,通过这些工具可以监控和诊断Java应用程序的性能和资源使用情况。本文将介绍五种JVM监控工具:jstack、jconsole、jinfo、jmap和jdb。 jstack jstack是一款命令行...
JVM性能调优监控工具jps、jstack、jmap、jhat、jstat使用详解 本文将对一些常用的 JVM 性能调优监控工具进行介绍,包括 jps、jstack、jmap、jhat、jstat 等工具的使用详解。这些工具对于 Java 程序员来说是必备的,...
为了获取这些信息,我们可以使用jstack工具,它是Java开发工具包(JDK)的一部分,能够输出Java进程的线程堆栈跟踪信息。 jstack命令通常可以输出以下类型的信息: 1. 线程的完整堆栈跟踪,包括本地方法。 2. 显示...
本文将详细介绍`JStack`的使用方法及其在分析Java线程堆栈中的应用。 #### 二、JStack简介 `JStack`是Java Development Kit (JDK)的一部分,用于生成正在运行的Java应用程序的线程快照。这些快照提供了关于每个...
4. **剪枝策略**:JPS使用了一些剪枝策略,例如,如果一条路径的代价已经超过了已知的最短路径,那么就可以立即停止对该路径的探索,进一步减少了计算量。 在"JumpPointSearch-master"这个项目中,作者实现了一个...
This code is used to calculate the relationship modeling in space communications (JPS)
本文将深入探讨如何使用Java提供的工具——`jps`和`jstack`,以及如何通过Shell脚本来定时收集Java进程的线程信息。 首先,`jps`(JVM Process Status)是Java虚拟机进程状况工具,它能够列出正在运行的Java进程ID...
【标题】:“Java小工具”通常指的是用于辅助Java开发或者处理Java相关问题的一系列小巧而实用的程序。这些工具可能包括代码分析、反编译、性能监控等方面,可以帮助开发者更高效地工作。 【描述】:根据提供的博文...
此外,jstack工具还可以附属到正在运行的Java程序中,看到当前运行的Java程序的Java栈和native栈的信息,如果现在运行的Java程序呈现hung的状态,jstack是非常有用的。 二、jconsole命令 jconsole是一个基于Java ...
在"jps1.1.2(java petstore)"中,我们主要会遇到以下的知识点: 1. **J2EE架构**:J2EE是Java企业版的早期版本,它包含了一系列的API和服务,如Servlet、JSP、EJB(Enterprise JavaBeans)、JMS(Java Message ...
`jconsole` 是基于Java Management Extensions (JMX) 的实时图形化监控工具,它能够展示JVM的实时性能数据和资源使用情况。通过`jconsole`,用户可以监控Java应用的内存使用、Heap大小、线程状态、类加载状态等信息...
`jps`命令是Java的一个实用工具,类似于Linux的`ps`命令,用于查看当前系统中运行的Java进程。它会显示进程ID以及对应的主类名称。例如,`jps`会显示所有由Java虚拟机启动的进程。 2. **jinfo(Java Configuration...
使用 jstack 工具可以帮助我们快速定位 CPU 消耗问题的根源。本文将详细介绍使用 jstack 工具定位分析 CPU 消耗问题的步骤和方法。 问题现象描述 在本例中,个人银行用户开户调用短信验证接口时,当大于 20 用户...
总之,OpenJDK 1.8.0在Linux x86_64上的部署和使用为开发者提供了强大且可靠的Java开发环境,而JPS命令则作为管理和监控Java进程的有力工具,帮助开发者更好地管理和调试应用程序。确保正确安装和配置OpenJDK,将极...
本文主要介绍了四个Java命令行工具:jps、jmap、jstack和jstat,它们是Java性能分析和故障排查的基础。 1. **jps (Java Process Status)**: 用于查看运行在本地机器上的Java进程ID,这对于其他命令来说是必需的输入...
- **功能**:jstack 是一个用于打印 Java 进程或核心转储文件中的线程堆栈信息的工具。它能够帮助开发者识别 Java 应用程序中的死锁问题。 - **使用场景**:当遇到应用程序响应缓慢或挂起时,可以使用 jstack 来检查...
JPS(Java Process Status Tool)是 Java 虚拟机的进程状态工具,用于显示当前 Java 进程的信息。然而,在某些情况下,JPS 命令可能不可用,导致无法查看 Java 进程的信息。 导致 JPS 不可用的原因可能是因为环境...
`jps_stat` 是一个基于Bash脚本的工具,专为Linux系统设计,用于实时监控当前系统上所有运行的Java程序的内存和CPU使用情况。它结合了`jps`(Java进程状态)和`jstat`(Java统计监测工具)命令的功能,提供了更详细...
5. **jps**: jps(Java Virtual Machine Process Status Tool)是另一个实用工具,用于列出当前系统中正在运行的Java进程ID。这对于监视和管理Java应用程序的生命周期很有帮助。 6. **jcmd**: jcmd是Java诊断命令...
以上工具的使用通常需要与相应的帮助文档配合,如`java.chm`可能包含了JDK的综合帮助文档,而`jstat - Java Virtual Machine Statistics Monitoring Tool.htm`、`jps - Java Virtual Machine Process Status Tool....