Chinaunix首页 | 论坛 | 博客
  • 博客访问: 47189
  • 博文数量: 17
  • 博客积分: 720
  • 博客等级: 军士长
  • 技术积分: 157
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-15 11:23
文章分类

全部博文(17)

文章存档

2011年(4)

2010年(13)

我的朋友

分类:

2011-03-01 17:17:52

Unix/Solaris Platform:

1、查看进程中的线程
   ps -Lfp
   #-f: Generates a full listing
   #-L: Prints information about each light weight process (lwp) in selected process.
   #-p

  查看各线程CPU占有情况
   prstat -L -p
   #-L: Report statistics for each light-weight process (LWP).

2、生成thread dump
   kill -QUIT
   or
   kill -3
   #输出结果一般在标准输出界面,如果的父进程重定向了标准输出则thread dump信息在相应的从定向文件中。

: http://blog.ragic.com/tw/java-thread-dump/

Common ways for Java

1. jvisualvm (Java 6u7 or later)
2. jps / jstack (Java 1.6 or later)
3. jconsole (Java 1.5 or later)

Complete method list please refer to following link:
阅读(2012) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~