RE: Dead threads

2003-11-21 Thread Shapira, Yoav

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:[EMAIL PROTECTED]
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;icount;i++)
out.println(Thread.currentThread().getName() +  :array[+i+] =  +
array[i].toString()+BR);

hope this helps.

Antony Paul.

- Original Message -
From: Laurent Michenaud [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Dead threads

2003-11-20 Thread Shapira, Yoav

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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE : Dead threads

2003-11-20 Thread Laurent Michenaud
I can't find it.

Could u or anybody else post the code ?

Thanks

-Message d'origine-
De : Shapira, Yoav [mailto:[EMAIL PROTECTED] 
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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dead threads

2003-11-20 Thread Antony Paul
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;icount;i++)
out.println(Thread.currentThread().getName() +  :array[+i+] =  +
array[i].toString()+BR);

hope this helps.

Antony Paul.

- Original Message -
From: Laurent Michenaud [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]