PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND ........... 22111 userWLS 9 0 86616 84M 26780 S 0.0 40.1 0:00 java
Thread Dump output sample Thread as per the above search criteria nid=0x565F
"ExecuteThread: '0' for queue: 'default'" daemon prio=1 tid=0x83da550 nid=0x565F waiting on monitor [0x56138000..0x56138870] at java.util.zip.ZipFile.getEntry(Native Method) at java.util.zip.ZipFile.getEntry(ZipFile.java:172) at java.util.jar.JarFile.getEntry(JarFile.java:269) at java.util.jar.JarFile.getJarEntry(JarFile.java:252) at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:989) at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:967) at sun.misc.URLClassPath.findResource(URLClassPath.java:262) at java.net.URLClassLoader$4.run(URLClassLoader.java:763) at java.security.AccessController.doPrivileged(AccessController.java:224) at java.net.URLClassLoader.findResource(URLClassLoader.java:760) at java.lang.ClassLoader.getResource(ClassLoader.java:444) at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:504) ............................................
pidstat -T CHILD -r 2 5 //表示所有子进程在2到5秒内,内存的使用状况,只有minflt/s或majflt/s非零的进程才会被列出来。
-T 后边跟 CHILD 表示全局统计所选进程以及其子进程占用cpu或内存的情况; 如果跟TASK 表示,所有独立进程,默认选项就是TASK, 还可以跟ALL是CHILD和TASK加起来的结果. 值得注意的是,全局统计进程以及子进程并不是pidstat所有选项都可用的,并且也不适用于某个时间段:当进程运行完毕或者进程被中止后才会收集到相关的统计数据。