In top press Shift-H which turns on Threads. The man page for top says:
-H : Threads toggle
Starts top with the last remembered 'H' state reversed. When
this toggle is On, all individual threads will be displayed.
Otherwise, top displays a summation of all threads in a
process.
From my top I see that the PID of the top thread is: 28938. And 28938 in HEX is 0x710A. Notice that in the stack dump, each thread has an nid which is in HEX. And it just so happens that 0x710A is the id of the thread:
"Thread-0" prio=10 tid=0x00007f9a98020000 nid=0x710a runnable [0x00007f9a9d846000]
java.lang.Thread.State: RUNNABLE
at sun.security.provider.DigestBase.engineReset(DigestBase.java:139)
at sun.security.provider.DigestBase.engineUpdate(DigestBase.java:104)
at java.security.MessageDigest$Delegate.engineUpdate(MessageDigest.java:538)
at java.security.MessageDigest.update(MessageDigest.java:293)
at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:197)
- locked <0x00007f9aa457e400> (a sun.security.provider.SecureRandom)
at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:257)
- locked <0x00007f9aa457e708> (a java.lang.Object)
at sun.security.provider.NativePRNG$RandomIO.access$200(NativePRNG.java:108)
at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:97)
at java.security.SecureRandom.nextBytes(SecureRandom.java:433)
- locked <0x00007f9aa4582fc8> (a java.security.SecureRandom)
at java.util.UUID.randomUUID(UUID.java:162)
at HeavyThread.run(HeavyThread.java:27)
at java.lang.Thread.run(Thread.java:619)
And so you can confirm that the Thread which is running the HeavyThread class is consuming most cpu.
In read world situations, it will probably be a bunch of threads that consume some portion of CPU and these threads put together will lead to the java process using 100% CPU.
http://code.nomad-labs.com/2010/11/18/identifying-which-java-thread-is-consuming-most-cpu/
分享到:
相关推荐
The goal is to differentiate the most dense regions from lower density regions, with spatial contiguity as the secondary goal. The original DBSCAN fails to discover the clusters with variable density...
Identifying High CPU Usage Pattern and Describing Resolution Steps Identifying High CPU Usage Pattern Review: Processes and Threads Investigating High CPU Usage: On Solaris, Linux, and Windows OS ...
What is an identifying owner in an ER model? (a) The entity upon which a weak entity's existence depends (b) The relationship that identifies a weak entity's owner (c) The entity upon which a ...
Java® Performance Companion shows how to systematically and proactively improve Java performance with today’s advanced multicore hardware and complex operating system environments. The authors, who...
Java® Performance Companion shows how to systematically and proactively improve Java performance with today’s advanced multicore hardware and complex operating system environments. The authors, who...
POP is the mechanism most people on the Internet use to get their mail. It defines support for a single mailbox for each user. That is all it does, and that is also the source of a lot of confusion...
A study is presented which aims to establish the most signi"cant internal obstacles for productivity improvement in small industrial "rms on the basis of two di!erent sets of regional data. ( 2001 ...
Identifying Encrypted Malware Traffic with Contextual Flow Data, ETA
ssd7 unit1 Skill Builder Identifying Keys and Integrity Constraints B 有点简略。无分下载仅供参考
by profiles, which are also automatically built without the need for thresholding or manual calibration. Diagnosis is based on reports of previous fault cases by identifying and learning their ...
Hot Topic Propagation Model and Opinion Leader Identifying Model in Micro-blog Network
natrue上发表的一篇付费论文,文章有30多页,内容详细
which are the principles underlying most privacy laws and privacy best practices. PII should be protected from inappropriate access, use, and disclosure. This document provides practical, context-...
一篇关于如何识别多实例数据中的异常点的技术论文。
Identifying viruses from metag.emmx
the effective methods to analyze binaries for identifying vulnerabilities. The book first discusses the assembly language. The chapter not only provides the fundamentals of assembly language. It ...
Process Tamer is a tiny (140k) and efficient utility for Microsoft Windows XP/2K/NT that runs in your system tray and constantly monitors the cpu usage of other processes. When it sees a process that ...
At present, one of the most popular techniques in biometrics is face recognition and face detection, which is a hot topic in the field of image processing. It is suitable for public security organs ...
An inverse geometry problem in identifying irregular
This book is for Java and other JVM-based language developers who want to use Gradle or are already using Gradle on their projects. No prior knowledge of Gradle is required, but some familiarity with...