then getting its thread group, and then enumerating the threads in that
group.
I tried writing this in pure CFML but since you can't cast to specific
object types I couldn't do it, but I wrote it in JSP, so if your running
enterprise/j2ee with jrun server this should work:
<%
Thread thread = Thread.currentThread();
ThreadGroup threadGroup = thread.getThreadGroup();
int count = threadGroup.activeCount();
Thread[] threads = new Thread[count];
count = threadGroup.enumerate(threads);
out.println("Thread Count: " + count + "<br>");
for (int i=0;i<count;i++) {
jrunx.scheduler.WorkerThread t =
(jrunx.scheduler.WorkerThread)threads[i];
jrun.servlet.http.WebEndpoint endPoint =
(jrun.servlet.http.WebEndpoint)t.getServletRequest();
out.println(endPoint.getServerName() + endPoint.getRequestURI()
+ "<br>");
}
%>
on my local machine it prints out:
Thread Count: 3
localhost/thread.jsp
localhost/thread.cfm
localhost/thread.jsp
amazing what you can find with reflection.
______________________________________
Pete Freitag
http://www.cfdev.com/
Author of the CFMX Developers Cookbook
http://www.petefreitag.com/bookshelf/
Mark W. Breneman wrote:
> Is there any way to get a list of the current running threads for CFMX and
> what .cfm is being run?
>
>
> What I am really after is to check and see what website on our shared
> server
> (we host about 70 very low traffic sites on one box) is maxing out the
> CPU.
> Or more specifically what .cfm is causing the problem.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

