<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: &#8220;top threads&#8221; plugin for JConsole</title>
	<atom:link href="http://lsd.luminis.nl/en/top-threads-plugin-for-jconsole/feed/" rel="self" type="application/rss+xml" />
	<link>http://lsd.luminis.nl/en/top-threads-plugin-for-jconsole/</link>
	<description></description>
	<lastBuildDate>Mon, 28 Jun 2010 20:17:45 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Aravindhan</title>
		<link>http://lsd.luminis.nl/en/top-threads-plugin-for-jconsole/comment-page-1/#comment-8102</link>
		<dc:creator>Aravindhan</dc:creator>
		<pubDate>Fri, 25 Jun 2010 06:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://lsd.luminis.net/?p=153#comment-8102</guid>
		<description>The Java thread id is available in the java.lang.management.ThreadInfo but there seems to be no way to get the nid (Native Thread ID ) for a Java thread - is there any way to do this from Java code?

Following are my use case,

When CPU utilization of a m/c is too high due to a java application, I can get the exact problematic thread by using following command in linux,

top -b -H -n1 -d1 &#124; head -n 20

The PID listed in the above command is directly mapped to native id. I can easily identify the problematic trace which causing high cpu by converting PID to HEX and match it in the thread dump. For easy debugging, I would like to high light the problematic thread trace which taken using JMX.

Is there any way to get native ID from JMX ? or any other work around to get native ID....

I greatly appreciate your help on the above requirement.</description>
		<content:encoded><![CDATA[<p>The Java thread id is available in the java.lang.management.ThreadInfo but there seems to be no way to get the nid (Native Thread ID ) for a Java thread &#8211; is there any way to do this from Java code?</p>
<p>Following are my use case,</p>
<p>When CPU utilization of a m/c is too high due to a java application, I can get the exact problematic thread by using following command in linux,</p>
<p>top -b -H -n1 -d1 | head -n 20</p>
<p>The PID listed in the above command is directly mapped to native id. I can easily identify the problematic trace which causing high cpu by converting PID to HEX and match it in the thread dump. For easy debugging, I would like to high light the problematic thread trace which taken using JMX.</p>
<p>Is there any way to get native ID from JMX ? or any other work around to get native ID&#8230;.</p>
<p>I greatly appreciate your help on the above requirement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Mulligan</title>
		<link>http://lsd.luminis.nl/en/top-threads-plugin-for-jconsole/comment-page-1/#comment-3830</link>
		<dc:creator>David Mulligan</dc:creator>
		<pubDate>Tue, 16 Mar 2010 17:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://lsd.luminis.net/?p=153#comment-3830</guid>
		<description>Thank you very much for this invaluable plugin Peter.  It is amazing the number of times that I&#039;ve been able to get some clue as to what a long running process is up to or stuck doing using this!  I&#039;ve used your Topthreads plugin to see which threads are using up a whole cpu as well as to see where a long running thread currently is.  Basically to give me a view into the VM when I&#039;d rather not slow down the app with a profiler.

I have a request though.  Please make it possible to keep the stack trace pane scrolled to the top when the page is refreshed.

It might also be interesting to see which lines of the stack trace have not changed since the last refresh.  Perhaps a slightly different font colour or some other relatively unobtrusive indicator like that.</description>
		<content:encoded><![CDATA[<p>Thank you very much for this invaluable plugin Peter.  It is amazing the number of times that I&#8217;ve been able to get some clue as to what a long running process is up to or stuck doing using this!  I&#8217;ve used your Topthreads plugin to see which threads are using up a whole cpu as well as to see where a long running thread currently is.  Basically to give me a view into the VM when I&#8217;d rather not slow down the app with a profiler.</p>
<p>I have a request though.  Please make it possible to keep the stack trace pane scrolled to the top when the page is refreshed.</p>
<p>It might also be interesting to see which lines of the stack trace have not changed since the last refresh.  Perhaps a slightly different font colour or some other relatively unobtrusive indicator like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Doornbosch</title>
		<link>http://lsd.luminis.nl/en/top-threads-plugin-for-jconsole/comment-page-1/#comment-2</link>
		<dc:creator>Peter Doornbosch</dc:creator>
		<pubDate>Mon, 03 Mar 2008 18:35:08 +0000</pubDate>
		<guid isPermaLink="false">http://lsd.luminis.net/?p=153#comment-2</guid>
		<description>Thanks for all the feedback!

Alexander: you can simply copy-and-paste from the stacktrace panel, can&#039;t you?  
Why would you need (or want) a copy-to-clipboard button?

Mike: i&#039;ve tested all kinds of scenario&#039;s, but i never got a hanging JConsole.  
Could you please provide me with more details? E.g. what Java version is used   
for JConsole
and what for the application that is monitored?

Mike: i&#039;ve noticed a small memory leak in the non-heap memory too. As you       
suggest, this might be related to &lt;a                               
href=&quot;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434648&quot;&gt;bug 6434648&lt;/a&gt; or &lt;a                                                   
href=&quot;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469701&quot;&gt;bug 6469701&lt;/a&gt;, although those seem to be fixed in the JKD you are using. 
Anyway, a leak in the monitored app is out of our (JConsole&#039;s) control....

Peter Paz: good point. I made a &lt;a                                           
href=&quot;http://blog.luminis.nl/luminis/resource/peter/topthreads.jar&quot;  onClick=&quot;javascript:pageTracker._trackPageview(&#039;/downloads/topthreads-1.0.4c&#039;); &quot;&gt;new version&lt;/a&gt; that is Java 5 compatible (and fixes a bug in the computation of the average, and has a new color scheme). 

Additionally: i like the suggestion of adding thread priority, but this is not  
trivial as the &lt;a                                                       
href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/ThreadIn
fo.html&quot;&gt;&lt;code&gt;ThreadInfo&lt;/code&gt;&lt;/a&gt; returned by the  
&lt;code&gt;ThreadMXBean&lt;/code&gt; does not contain thread priority (see     
&lt;a href=&quot;http://bugs.sun.com/view_bug.do?bug_id=6588467&quot; rel=&quot;nofollow&quot;&gt;bug 6588467&lt;/a&gt;). I&#039;m working on a solution with a separate &quot;thread-priority-mbean&quot;... more on that later.</description>
		<content:encoded><![CDATA[<p>Thanks for all the feedback!</p>
<p>Alexander: you can simply copy-and-paste from the stacktrace panel, can&#8217;t you?<br />
Why would you need (or want) a copy-to-clipboard button?</p>
<p>Mike: i&#8217;ve tested all kinds of scenario&#8217;s, but i never got a hanging JConsole.<br />
Could you please provide me with more details? E.g. what Java version is used<br />
for JConsole<br />
and what for the application that is monitored?</p>
<p>Mike: i&#8217;ve noticed a small memory leak in the non-heap memory too. As you<br />
suggest, this might be related to <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434648">bug 6434648</a> or <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469701">bug 6469701</a>, although those seem to be fixed in the JKD you are using.<br />
Anyway, a leak in the monitored app is out of our (JConsole&#8217;s) control&#8230;.</p>
<p>Peter Paz: good point. I made a <a href="http://blog.luminis.nl/luminis/resource/peter/topthreads.jar"  onClick="javascript:pageTracker._trackPageview('/downloads/topthreads-1.0.4c'); ">new version</a> that is Java 5 compatible (and fixes a bug in the computation of the average, and has a new color scheme). </p>
<p>Additionally: i like the suggestion of adding thread priority, but this is not<br />
trivial as the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/ThreadIn<br />
fo.html"><code>ThreadInfo</code></a> returned by the<br />
<code>ThreadMXBean</code> does not contain thread priority (see<br />
<a href="http://bugs.sun.com/view_bug.do?bug_id=6588467" rel="nofollow">bug 6588467</a>). I&#8217;m working on a solution with a separate &#8220;thread-priority-mbean&#8221;&#8230; more on that later.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
