Re: Currently running page requests
I wonder if its only a problem on J2EE installs? I ran both versions on enterprise edition, but I don't have a J2EE install to test. Has anyone got this to work on a J2EE install? Wish I could help more, but I don't know what's going on internally with jrun. - Original Message - From: Joe Gooch <[EMAIL PROTECTED]> Date: Wed, 15 Sep 2004 15:10:22 -0400 Subject: RE: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> I concur. I've modified the code to show the exception, it seems endPoint.getRequestURI(),endPoint.getRemoteHost(), and endPoint.getServerName() all return nulls. I get a java.lang.NullPointerException. Ideas? Joe -Original Message- From: Douglas Knudsen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 9:14 PM To: CF-Talk Subject: Re: Currently running page requests When this part of the JSP runs for (int i=0;i out.println("i: " + i + ""); try { 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() + ""); } catch (Exception e) { } } I get i:1 i:2 . . . that's it. The try/catch is catching an exception. When I remove the try/catch I get this in the cfusion-event log java.lang.ClassCastException at jrun__admintools__cfthreads2ejsp19._jspService(jrun__admintools__cfthrea ds2ejsp19.java:59) at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at jrun.jsp.JSPServlet.service(JSPServlet.java:119) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java :447) at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.j ava:417) at jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:61) at coldfusion.license.JspLicenseServlet.service(JspLicenseServlet.java:31) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:249 ) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527 ) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java: 192) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java :451) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) looks like its this line that is having issue with the caste jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; Doug - Original Message - From: Lee Howard <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 18:26:04 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> If you are using jrun for your J2EE server I don't know what the problem could be. What kind of error message are you getting? Can you compile the code I posted? - Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 16:12:23 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> hmmm, I am using the enterprise version, J2EE install, and I can not see the script names. This part bombs. jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); maybe there is something missing in my classpath or maybe a differnet JVM Doug - Original Message - From: Lee Howard <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 15:24:51 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> I like that. It worked great for me, but if you are not using enterprise it will not work. For those people you can also do the same thing with a servlet. Here is the java code. import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class threads extends HttpServlet{ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{ resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); 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 + ""); for (int i=0;i try { jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); out.println("i: " + i + ": "); out.println(endPoint.getServerName() + endPoint.getRequestURI() + " :" + endPoint.getRemoteHost() + ""); }
RE: Currently running page requests
I concur. I've modified the code to show the exception, it seems endPoint.getRequestURI(),endPoint.getRemoteHost(), and endPoint.getServerName() all return nulls. I get a java.lang.NullPointerException. Ideas? Joe -Original Message- From: Douglas Knudsen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 9:14 PM To: CF-Talk Subject: Re: Currently running page requests When this part of the JSP runs for (int i=0;i out.println("i: " + i + ""); try { 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() + ""); } catch (Exception e) { } } I get i:1 i:2 . . . that's it. The try/catch is catching an exception. When I remove the try/catch I get this in the cfusion-event log java.lang.ClassCastException at jrun__admintools__cfthreads2ejsp19._jspService(jrun__admintools__cfthrea ds2ejsp19.java:59) at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at jrun.jsp.JSPServlet.service(JSPServlet.java:119) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java :447) at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.j ava:417) at jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:61) at coldfusion.license.JspLicenseServlet.service(JspLicenseServlet.java:31) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:249 ) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527 ) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java: 192) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java :451) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) looks like its this line that is having issue with the caste jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; Doug - Original Message - From: Lee Howard <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 18:26:04 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> If you are using jrun for your J2EE server I don't know what the problem could be. What kind of error message are you getting? Can you compile the code I posted? - Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 16:12:23 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> hmmm, I am using the enterprise version, J2EE install, and I can not see the script names. This part bombs. jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); maybe there is something missing in my classpath or maybe a differnet JVM Doug - Original Message - From: Lee Howard <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 15:24:51 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> I like that. It worked great for me, but if you are not using enterprise it will not work. For those people you can also do the same thing with a servlet. Here is the java code. import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class threads extends HttpServlet{ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{ resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); 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 + ""); for (int i=0;i try { jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); out.println("i: " + i + ": "); out.println(endPoint.getServerName() + endPoint.getRequestURI() + " :" + endPoint.getRemoteHost() + ""); } catch (Exception e) { } } } } compile and put in the WEB-INF/classes folder. I compiled using javac thread.java -classpath c:\cfusionmx\runtime\lib\jrun.jar call it using http://webserver.com/servlet/thread ----- Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 11:54:05 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> there was some JSP code for this floating around abit ago. IIRC,
Re: Currently running page requests
When this part of the JSP runs for (int i=0;i out.println("i: " + i + ""); try { 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() + ""); } catch (Exception e) { } } I get i:1 i:2 . . . that's it. The try/catch is catching an exception. When I remove the try/catch I get this in the cfusion-event log java.lang.ClassCastException at jrun__admintools__cfthreads2ejsp19._jspService(jrun__admintools__cfthreads2ejsp19.java:59) at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at jrun.jsp.JSPServlet.service(JSPServlet.java:119) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:447) at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:417) at jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:61) at coldfusion.license.JspLicenseServlet.service(JspLicenseServlet.java:31) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:249) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) looks like its this line that is having issue with the caste jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; Doug - Original Message - From: Lee Howard <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 18:26:04 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> If you are using jrun for your J2EE server I don't know what the problem could be. What kind of error message are you getting? Can you compile the code I posted? - Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 16:12:23 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> hmmm, I am using the enterprise version, J2EE install, and I can not see the script names. This part bombs. jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); maybe there is something missing in my classpath or maybe a differnet JVM Doug - Original Message - From: Lee Howard <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 15:24:51 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> I like that. It worked great for me, but if you are not using enterprise it will not work. For those people you can also do the same thing with a servlet. Here is the java code. import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class threads extends HttpServlet{ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{ resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); 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 + ""); for (int i=0;i try { jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); out.println("i: " + i + ": "); out.println(endPoint.getServerName() + endPoint.getRequestURI() + " :" + endPoint.getRemoteHost() + ""); } catch (Exception e) { } } } } compile and put in the WEB-INF/classes folder. I compiled using javac thread.java -classpath c:\cfusionmx\runtime\lib\jrun.jar call it using http://webserver.com/servlet/thread - Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 11:54:05 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> there was some JSP code for this floating around abit ago. IIRC, credit goes to Pete Frietag. I never got this to work for me though. Some sort of caste error and I'm far from a Java guru. Anyone get this to work? <% Thread thread = Thread.currentThread(); ThreadGroup threadGroup = thread.getThreadGroup(); int count = threadGroup.activeCount(); Thread[] threads = new Thread[count]; count = threadGroup.enumerate(threads); ou
Re: Currently running page requests
If you are using jrun for your J2EE server I don't know what the problem could be. What kind of error message are you getting? Can you compile the code I posted? - Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 16:12:23 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> hmmm, I am using the enterprise version, J2EE install, and I can not see the script names. This part bombs. jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); maybe there is something missing in my classpath or maybe a differnet JVM Doug - Original Message - From: Lee Howard <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 15:24:51 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> I like that. It worked great for me, but if you are not using enterprise it will not work. For those people you can also do the same thing with a servlet. Here is the java code. import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class threads extends HttpServlet{ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{ resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); 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 + ""); for (int i=0;i try { jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); out.println("i: " + i + ": "); out.println(endPoint.getServerName() + endPoint.getRequestURI() + " :" + endPoint.getRemoteHost() + ""); } catch (Exception e) { } } } } compile and put in the WEB-INF/classes folder. I compiled using javac thread.java -classpath c:\cfusionmx\runtime\lib\jrun.jar call it using http://webserver.com/servlet/thread - Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 11:54:05 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> there was some JSP code for this floating around abit ago. IIRC, credit goes to Pete Frietag. I never got this to work for me though. Some sort of caste error and I'm far from a Java guru. Anyone get this to 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 + ""); for (int i=0;i out.println("i: " + i + ""); try { 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() + ""); } catch (Exception e) { } } %> - Original Message - From: Adrocknaphobia <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 09:34:27 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> Well I've found the stack trace invaluable in terms of information. But the fact that you have to have your server running through command prompt makes its pretty useless. For example in a production app, you have to shut down the server. (not cool) Then restart it in a command window (not cool), then you cannot log off! (not cool) Although I'm told this is a windows only issue. Still, its great insight into problems... but you cant really get it when you need it. -Adam - Original Message - From: Robertson-Ravo, Neil (RX) <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 14:26:01 +0100 Subject: RE: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> And its nigh on useless in my opinion. _ From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: 14 September 2004 14:23 To: CF-Talk Subject: RE: Currently running page requests > Is there any way to get a list of currently running > page requests on the server so I can keep track or them? You can perform a dump of the current stack trace, which will list (amongst a big pile of other stuff) what's requests are currently being processed by CF. See the MM technote about it: http://www.macromedia.com/support/coldfusion/ts/documents/tn18339.htm Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - Internet, New Media a
Re: Currently running page requests
hmmm, I am using the enterprise version, J2EE install, and I can not see the script names. This part bombs. jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); maybe there is something missing in my classpath or maybe a differnet JVM Doug - Original Message - From: Lee Howard <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 15:24:51 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> I like that. It worked great for me, but if you are not using enterprise it will not work. For those people you can also do the same thing with a servlet. Here is the java code. import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class threads extends HttpServlet{ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{ resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); 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 + ""); for (int i=0;i try { jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); out.println("i: " + i + ": "); out.println(endPoint.getServerName() + endPoint.getRequestURI() + " :" + endPoint.getRemoteHost() + ""); } catch (Exception e) { } } } } compile and put in the WEB-INF/classes folder. I compiled using javac thread.java -classpath c:\cfusionmx\runtime\lib\jrun.jar call it using http://webserver.com/servlet/thread - Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 11:54:05 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> there was some JSP code for this floating around abit ago. IIRC, credit goes to Pete Frietag. I never got this to work for me though. Some sort of caste error and I'm far from a Java guru. Anyone get this to 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 + ""); for (int i=0;i out.println("i: " + i + ""); try { 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() + ""); } catch (Exception e) { } } %> - Original Message - From: Adrocknaphobia <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 09:34:27 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> Well I've found the stack trace invaluable in terms of information. But the fact that you have to have your server running through command prompt makes its pretty useless. For example in a production app, you have to shut down the server. (not cool) Then restart it in a command window (not cool), then you cannot log off! (not cool) Although I'm told this is a windows only issue. Still, its great insight into problems... but you cant really get it when you need it. -Adam - Original Message - From: Robertson-Ravo, Neil (RX) <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 14:26:01 +0100 Subject: RE: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> And its nigh on useless in my opinion. _ From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: 14 September 2004 14:23 To: CF-Talk Subject: RE: Currently running page requests > Is there any way to get a list of currently running > page requests on the server so I can keep track or them? You can perform a dump of the current stack trace, which will list (amongst a big pile of other stuff) what's requests are currently being processed by CF. See the MM technote about it: http://www.macromedia.com/support/coldfusion/ts/documents/tn18339.htm Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - Internet, New Media and ebusiness Gurus. WE'VE MOVED - for our new address, please visit our website at http://www.rawnet.com/ or call us any time on 0800 294 24 24. --- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unau
Re: Currently running page requests
I like that. It worked great for me, but if you are not using enterprise it will not work. For those people you can also do the same thing with a servlet. Here is the java code. import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class threads extends HttpServlet{ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{ resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); 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 + ""); for (int i=0;i try { jrunx.scheduler.WorkerThread t = (jrunx.scheduler.WorkerThread)threads[i]; jrun.servlet.http.WebEndpoint endPoint = (jrun.servlet.http.WebEndpoint)t.getServletRequest(); out.println("i: " + i + ": "); out.println(endPoint.getServerName() + endPoint.getRequestURI() + " :" + endPoint.getRemoteHost() + ""); } catch (Exception e) { } } } } compile and put in the WEB-INF/classes folder. I compiled using javac thread.java -classpath c:\cfusionmx\runtime\lib\jrun.jar call it using http://webserver.com/servlet/thread - Original Message - From: Douglas Knudsen <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 11:54:05 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> there was some JSP code for this floating around abit ago. IIRC, credit goes to Pete Frietag. I never got this to work for me though. Some sort of caste error and I'm far from a Java guru. Anyone get this to 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 + ""); for (int i=0;i out.println("i: " + i + ""); try { 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() + ""); } catch (Exception e) { } } %> - Original Message - From: Adrocknaphobia <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 09:34:27 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> Well I've found the stack trace invaluable in terms of information. But the fact that you have to have your server running through command prompt makes its pretty useless. For example in a production app, you have to shut down the server. (not cool) Then restart it in a command window (not cool), then you cannot log off! (not cool) Although I'm told this is a windows only issue. Still, its great insight into problems... but you cant really get it when you need it. -Adam - Original Message - From: Robertson-Ravo, Neil (RX) <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 14:26:01 +0100 Subject: RE: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> And its nigh on useless in my opinion. _ From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: 14 September 2004 14:23 To: CF-Talk Subject: RE: Currently running page requests > Is there any way to get a list of currently running > page requests on the server so I can keep track or them? You can perform a dump of the current stack trace, which will list (amongst a big pile of other stuff) what's requests are currently being processed by CF. See the MM technote about it: http://www.macromedia.com/support/coldfusion/ts/documents/tn18339.htm Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - Internet, New Media and ebusiness Gurus. WE'VE MOVED - for our new address, please visit our website at http://www.rawnet.com/ or call us any time on 0800 294 24 24. --- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Currently running page requests
there was some JSP code for this floating around abit ago. IIRC, credit goes to Pete Frietag. I never got this to work for me though. Some sort of caste error and I'm far from a Java guru. Anyone get this to 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 + ""); for (int i=0;i out.println("i: " + i + ""); try { 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() + ""); } catch (Exception e) { } } %> - Original Message - From: Adrocknaphobia <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 09:34:27 -0400 Subject: Re: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> Well I've found the stack trace invaluable in terms of information. But the fact that you have to have your server running through command prompt makes its pretty useless. For example in a production app, you have to shut down the server. (not cool) Then restart it in a command window (not cool), then you cannot log off! (not cool) Although I'm told this is a windows only issue. Still, its great insight into problems... but you cant really get it when you need it. -Adam - Original Message - From: Robertson-Ravo, Neil (RX) <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 14:26:01 +0100 Subject: RE: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> And its nigh on useless in my opinion. _ From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: 14 September 2004 14:23 To: CF-Talk Subject: RE: Currently running page requests > Is there any way to get a list of currently running > page requests on the server so I can keep track or them? You can perform a dump of the current stack trace, which will list (amongst a big pile of other stuff) what's requests are currently being processed by CF. See the MM technote about it: http://www.macromedia.com/support/coldfusion/ts/documents/tn18339.htm Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - Internet, New Media and ebusiness Gurus. WE'VE MOVED - for our new address, please visit our website at http://www.rawnet.com/ or call us any time on 0800 294 24 24. --- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Currently running page requests
Well I've found the stack trace invaluable in terms of information. But the fact that you have to have your server running through command prompt makes its pretty useless. For example in a production app, you have to shut down the server. (not cool) Then restart it in a command window (not cool), then you cannot log off! (not cool) Although I'm told this is a windows only issue. Still, its great insight into problems... but you cant really get it when you need it. -Adam - Original Message - From: Robertson-Ravo, Neil (RX) <[EMAIL PROTECTED]> Date: Tue, 14 Sep 2004 14:26:01 +0100 Subject: RE: Currently running page requests To: CF-Talk <[EMAIL PROTECTED]> And its nigh on useless in my opinion. _ From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: 14 September 2004 14:23 To: CF-Talk Subject: RE: Currently running page requests > Is there any way to get a list of currently running > page requests on the server so I can keep track or them? You can perform a dump of the current stack trace, which will list (amongst a big pile of other stuff) what's requests are currently being processed by CF. See the MM technote about it: http://www.macromedia.com/support/coldfusion/ts/documents/tn18339.htm Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - Internet, New Media and ebusiness Gurus. WE'VE MOVED - for our new address, please visit our website at http://www.rawnet.com/ or call us any time on 0800 294 24 24. --- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. --- _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Currently running page requests
And its nigh on useless in my opinion. _ From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: 14 September 2004 14:23 To: CF-Talk Subject: RE: Currently running page requests > Is there any way to get a list of currently running > page requests on the server so I can keep track or them? You can perform a dump of the current stack trace, which will list (amongst a big pile of other stuff) what's requests are currently being processed by CF. See the MM technote about it: http://www.macromedia.com/support/coldfusion/ts/documents/tn18339.htm Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - Internet, New Media and ebusiness Gurus. WE'VE MOVED - for our new address, please visit our website at http://www.rawnet.com/ or call us any time on 0800 294 24 24. --- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. --- _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Currently running page requests
> Is there any way to get a list of currently running > page requests on the server so I can keep track or them? You can perform a dump of the current stack trace, which will list (amongst a big pile of other stuff) what's requests are currently being processed by CF. See the MM technote about it: http://www.macromedia.com/support/coldfusion/ts/documents/tn18339.htm Tim. -- --- Badpen Tech - CF and web-tech: http://tech.badpen.com/ --- RAWNET LTD - Internet, New Media and ebusiness Gurus. WE'VE MOVED - for our new address, please visit our website at http://www.rawnet.com/ or call us any time on 0800 294 24 24. --- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Currently running page requests
This is a fairly rudimentary idea but you could have each process log its beginning and its termination. A quick check of the log (maybe a DB table) would tell you what is currently running. - Original Message - From: James Smith To: CF-Talk Sent: Tuesday, September 14, 2004 6:59 AM Subject: Currently running page requests There are a couple of automated tasks on our server here that run periodically but take between 10-30 minutes to execute while they look up several hundred other web pages from other servers. Is there any way to get a list of currently running page requests on the server so I can keep track or them? -- James Smith [EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]