tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Dead threads
Date Fri, 21 Nov 2003 13:44:41 GMT

Howdy,
That's a version of my stuff ;)  I already sent Laurent a link to it.  But thanks anyways,

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Antony Paul [mailto:antonypaul24@hotmail.com]
>Sent: Friday, November 21, 2003 1:01 AM
>To: Tomcat Users List
>Subject: Re: Dead threads
>
>I got this code by searching one list (I think it is tomcat-dev). code is
>given below.
>// to print the number of threads in tomcat.
>ThreadGroup systemthreadgroup;
>ThreadGroup parentthreadgroup;
>systemthreadgroup = Thread.currentThread().getThreadGroup();
>while ((parentthreadgroup = systemthreadgroup.getParent()) != null)
>systemthreadgroup = parentthreadgroup;
>out.println(Thread.currentThread().getName() + " : activeCount = " +
>systemthreadgroup.activeCount()+"<BR>");
>Thread[] array = new Thread[systemthreadgroup.activeCount()];
>int count = systemthreadgroup.enumerate(array);
>for(int i=0;i<count;i++)
>out.println(Thread.currentThread().getName() + " :    array["+i+"] = " +
>array[i].toString()+"<BR>");
>
>hope this helps.
>
>Antony Paul.
>
>----- Original Message -----
>From: "Laurent Michenaud" <lmichenaud@adeuza.fr>
>To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>Sent: Thursday, November 20, 2003 9:16 PM
>Subject: RE : Dead threads
>
>
>I can't find it.
>
>Could u or anybody else post the code ?
>
>Thanks
>
>-----Message d'origine-----
>De : Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
>Envoyé : jeudi 20 novembre 2003 14:42
>À : Tomcat Users List
>Objet : RE: Dead threads
>
>
>Howdy,
>If a thread is dead it will have been GCed.  Use a thread dump (kill -s
>QUIT <processId>) to get the current list of threads and what they're
>doing on stdout.  There are also programmatic ways to go about this:
>I've posted at least three times in the past the complete code for a
>thread-crawler type of class that will display all the threads in the
>JVM, what they're doing, their state, etc: you can search the list
>archives for it.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-----Original Message-----
>>From: Walter do Valle [mailto:walter@softplan.com.br]
>>Sent: Thursday, November 20, 2003 6:52 AM
>>To: Tomcat Users List
>>Subject: Dead threads
>>
>>How to know what Tomcat threads are dead (or hanged, os blocked, or
>>inoperative, or... ) in an Tomcat running on Linux?
>>Any help is welcome.
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary
>and/or privileged.  This e-mail is intended only for the individual(s) to
>whom it is addressed, and may not be saved, copied, printed, disclosed or
>used by anyone else.  If you are not the(an) intended recipient, please
>immediately delete this e-mail from your computer system and notify the
>sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message