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...
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...
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...
"Bitter Java" is a comprehensive guide that delves into the intricacies of Java development, focusing on common pitfalls and antipatterns that developers often encounter. The title itself suggests a ...
根据提供的文件信息,本文将深入探讨由Maksim Kitsak等人于2011年在预印本服务器arXiv上发表的研究成果,该成果题为《在复杂网络中识别有影响力的传播者》(Identifying influential spreaders in complex networks...
### SSD7 Unit1 Skill Builder: Identifying Keys and Integrity Constraints B #### 客户表 (Customer) **主键(Primary Key, PK):** - **ID**: 每个客户都有一个唯一的标识符,用于区分不同的客户。这个字段是...
性能测试 CPU 指标分析报告 性能测试的 CPU 指标是性能测试的一个非常重要的体现。通过分析 CPU 指标,可以了解系统的性能瓶颈,优化系统性能,提高系统的响应速度和处理能力。 在性能测试中,CPU 指标是指 CPU 的...
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-...
The implementation of the system leverages Java Web technologies, which offer scalability, security, and platform independence. Java's object-oriented nature makes it ideal for developing complex ...
Identifying viruses from metag.emmx
The system described in this paper is based on the SSM (Spring, SpringMVC, and MyBatis) framework, which is a popular choice for developing web applications in Java. Spring provides the core ...
本文献《Identifying Encrypted Malware Traffic with Contextual Flow Data》由Cisco公司的Blake Anderson和David McGrew联合撰写,旨在探讨如何在不破坏加密完整性的前提下,识别加密网络流量中的恶意软件。...
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 ...
- Identifying hotspots where most of the CPU time is consumed. **Hotspots and Filters (A.3.2)** Hotspots are areas of the code that consume a disproportionate amount of CPU resources. Key aspects ...