[jboss-svn-commits] JBL Code SVN: r33880 - labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jul 14 14:16:18 EDT 2010


Author: whitingjr
Date: 2010-07-14 14:16:17 -0400 (Wed, 14 Jul 2010)
New Revision: 33880

Modified:
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/CONFIGURATION.txt
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.properties
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.xml
Log:
Added task to start the jstat process to generate gc activity.

Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/CONFIGURATION.txt
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/CONFIGURATION.txt	2010-07-14 17:29:33 UTC (rev 33879)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/CONFIGURATION.txt	2010-07-14 18:16:17 UTC (rev 33880)
@@ -9,3 +9,7 @@
 
 Groovy
 http://groovy.codehaus.org/The+groovy+Ant+Task
+including dependencies: asm-3.2.jar, antlr-2.7.7.jar
+
+CommonsLang
+http://commons.apache.org/lang/

Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.properties	2010-07-14 17:29:33 UTC (rev 33879)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.properties	2010-07-14 18:16:17 UTC (rev 33880)
@@ -11,4 +11,15 @@
 
 hornetq.configuration.xml=${sever.home}/server/production/deploy/hornetq/hornetq-configuration.xml
 
-jps.output.file/tmp/jpsOutput.txt
+jps.output.file=/tmp/jpsProgram.pid
+
+# this is the EAP server process name
+process.name=Main
+
+jstat.command.arguments.1=-gcutil
+jstat.command.arguments.2=-t
+jstat.command.arguments.3=-h12
+jstat.command.arguments.5=5s
+jstat.command.arguments.6=>
+jstat.command.arguments.7=server/production/log/jstat-hornetq.txt
+jstat.command.arguments.8=&

Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.xml	2010-07-14 17:29:33 UTC (rev 33879)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.xml	2010-07-14 18:16:17 UTC (rev 33880)
@@ -56,24 +56,37 @@
       <delete dir="${large.messages.dir}"/>
    </target>
    
-   
-   
    <target name="start-jstat">
       <delete file="${jps.output.file}"/>
-      <exec executable="jps" outputproperty="jstat.output" output="${jps.output.file}"/>
+      <groovy>
+         import org.apache.commons.lang.StringUtils;
+         pid = "jps".execute().text.eachLine { it.contains("${properties['process.name']}") }.tokenize(" ").first()
+         if (StringUtils.isNotBlank(pid))
+         {
+            def pidFile = new File("${properties['jps.output.file']}")
+            pidFile.write("process.pid=")
+            pidFile.append(pid)
+            pidFile.append('\n')
+         }
+         println pid
+      </groovy>
       <condition property="server.isStarted">
-         <contains string="${jstat.output}" substring="Main" />
+         <available file="${jps.output.file}"/>
       </condition>
-      <antcall target="jstat" inheritall="true"/>
+      <antcall target="jstat"/>
    </target>
    
    <target name="jstat" if="server.isStarted">
-      
-      <!--groovy src="../../src/main/groovy/groovy-api.groovy">
-         <arg value="${jps.output.file}"/>
-      </groovy-->
-      
-      
+      <property file="${jps.output.file}" />
+      <exec executable="jstat" spawn="true">
+         <arg value="${jstat.command.arguments.1}"/>
+         <arg value="${jstat.command.arguments.2}"/>
+         <arg value="${jstat.command.arguments.3}"/>
+         <arg value="${process.pid}"/>
+         <arg value="${jstat.command.arguments.5}"/>
+         <arg value="${jstat.command.arguments.6}"/>
+         <arg value="${sever.home}/${jstat.command.arguments.7}"/>
+      </exec>
    </target>
    
    <target name="usage">



More information about the jboss-svn-commits mailing list