incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From monte...@apache.org
Subject svn commit: r780039 - /incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/tomcat/TomcatThreadPoolsCommand.java
Date Fri, 29 May 2009 17:24:58 GMT
Author: monteith
Date: Fri May 29 17:24:58 2009
New Revision: 780039

URL: http://svn.apache.org/viewvc?rev=780039&view=rev
Log:
Update tomcat pools command.

Modified:
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/tomcat/TomcatThreadPoolsCommand.java

Modified: incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/tomcat/TomcatThreadPoolsCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/tomcat/TomcatThreadPoolsCommand.java?rev=780039&r1=780038&r2=780039&view=diff
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/tomcat/TomcatThreadPoolsCommand.java
(original)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/tomcat/TomcatThreadPoolsCommand.java
Fri May 29 17:24:58 2009
@@ -41,8 +41,8 @@
 	// Look for this class.
 	private static final String THREAD_POOL_CLASS="org/apache/tomcat/util/threads/ThreadPool";

 	private static final String POOL_NAME = "name",
-								SERVER_BUILT = "serverBuilt",
-								SERVER_INFO = "serverInfo";
+								CURRENT_BUSY = "currentThreadsBusy",
+								CURRENT_COUNT = "currentThreadCount";
 	
 	public TomcatThreadPoolsCommand(Output o) {
 		super(o, COMMAND_NAME, SHORT_DESCRIPTION, LONG_DESCRIPTION);
@@ -80,13 +80,18 @@
 			if (clazz.getName().equals(THREAD_POOL_CLASS)) {
 				found = true;
 				JavaField nameField = KatoSearch.getField(clazz, POOL_NAME);
+				JavaField busyField = KatoSearch.getField(clazz, CURRENT_BUSY);
+				JavaField countField = KatoSearch.getField(clazz, CURRENT_COUNT);
+				
 				
 				List<JavaObject> instances = KatoSearch.findInstances(runtime, clazz);
 				if (instances.size() >0) {
 					out.println("Found thread pools");
 					for (JavaObject obj : instances) {
 						try {
-							out.println("Pool name:" + nameField.getString(obj));
+							out.println("Pool name:" + nameField.getString(obj)+", threads: "
+									+ countField.getInt(obj) +
+									", busy: " + busyField.getInt(obj));
 						
 						}catch (KatoException e) {
 							e.printStackTrace();



Mime
View raw message