perfMon Metrics Collector is not generating the output file

710 views
Skip to first unread message

sha...@gmail.com

unread,
Aug 16, 2013, 10:08:06 PM8/16/13
to jmeter-...@googlegroups.com
Hi,

I'm unable to get the perfMon Metrics Collector running properly. I'm running a JMX that monitors two servers for CPU and Memory but the Metrics Collector fails to write a file. What am I doing wrong? 

jMeter was started on non-GUI mode with the following command:

# java -jar jakarta-jmeter-2.4/bin/ApacheJMeter.jar -n -t Performance_perfmon.jmx -J "load_profile=const(35,30s)" -J"summariser.interval=10" -l ~/jmeter_perfMon.jtl -j ~/jmeter_perfMon.log 2>&1 &>jmeter_run.log

The output I've got is as follows:

# cat perMon.jtl 
<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">


</testResults>


Running the debug log level, I do see that the metrics are being generated by the Agent:

#  ./startAgent.sh --udp-port 0 --interval 4 --loglevel DEBUG
DEBUG   2013-08-16 18:52:36.257 [kg.apc.p] (): Start accepting connections
INFO    2013-08-16 18:52:36.279 [kg.apc.p] (): Binding TCP to 4444
INFO    2013-08-16 18:52:36.287 [kg.apc.p] (): JP@GC Agent v2.2.0 started
INFO    2013-08-16 18:52:41.004 [kg.apc.p] (): Accepting new TCP connection
DEBUG   2013-08-16 18:52:41.006 [kg.apc.p] (): Creating new metric getter
DEBUG   2013-08-16 18:52:41.011 [kg.apc.p] (): Read: java.nio.DirectByteBuffer[pos=0 lim=5 cap=1024]
DEBUG   2013-08-16 18:52:41.011 [kg.apc.p] (): Command line is: test

DEBUG   2013-08-16 18:52:41.012 [kg.apc.p] (): Got command line: test
INFO    2013-08-16 18:52:41.012 [kg.apc.p] (): Yep, we received the 'test' command
DEBUG   2013-08-16 18:52:41.012 [kg.apc.p] (): Done executing command
DEBUG   2013-08-16 18:52:41.012 [kg.apc.p] (): Command line is: 
DEBUG   2013-08-16 18:52:41.014 [kg.apc.p] (): Read: java.nio.DirectByteBuffer[pos=0 lim=38 cap=1024]
DEBUG   2013-08-16 18:52:41.014 [kg.apc.p] (): Command line is: metrics:cpu:combined    memory:usedperc 

DEBUG   2013-08-16 18:52:41.014 [kg.apc.p] (): Got command line: metrics:cpu:combined   memory:usedperc 
INFO    2013-08-16 18:52:41.014 [kg.apc.p] (): Starting measures: cpu:combined  memory:usedperc
DEBUG   2013-08-16 18:52:41.024 [kg.apc.p] (): Creating metric: cpu with params: combined
DEBUG   2013-08-16 18:52:41.028 [kg.apc.p] (): Have metric object: kg.apc.perfmon.metrics.CPUTotalMetric@16fa474
DEBUG   2013-08-16 18:52:41.028 [kg.apc.p] (): Creating metric: memory with params: usedperc
DEBUG   2013-08-16 18:52:41.030 [kg.apc.p] (): Have metric object: kg.apc.perfmon.metrics.MemTotalMetric@2d9c06
DEBUG   2013-08-16 18:52:41.030 [kg.apc.p] (): Done executing command
DEBUG   2013-08-16 18:52:41.030 [kg.apc.p] (): Command line is: 
DEBUG   2013-08-16 18:52:44.301 [kg.apc.p] (): Building metrics
DEBUG   2013-08-16 18:52:44.807 [kg.apc.p] (): Metrics line: 4.260651629072681  28.733897733478468      

DEBUG   2013-08-16 18:52:48.311 [kg.apc.p] (): Building metrics
DEBUG   2013-08-16 18:52:48.312 [kg.apc.p] (): Metrics line: 4.661921708185053  28.74100270453823       

DEBUG   2013-08-16 18:52:52.321 [kg.apc.p] (): Building metrics
DEBUG   2013-08-16 18:52:52.322 [kg.apc.p] (): Metrics line: 4.3993759750390025 28.742194813776443      

DEBUG   2013-08-16 18:52:56.331 [kg.apc.p] (): Building metrics
DEBUG   2013-08-16 18:52:56.332 [kg.apc.p] (): Metrics line: 4.73667809286382   28.755546437244448      

DEBUG   2013-08-16 18:53:00.341 [kg.apc.p] (): Building metrics
DEBUG   2013-08-16 18:53:00.342 [kg.apc.p] (): Metrics line: 5.1713395638629285 28.762794461412795      

DEBUG   2013-08-16 18:53:04.351 [kg.apc.p] (): Building metrics
DEBUG   2013-08-16 18:53:04.352 [kg.apc.p] (): Metrics line: 4.77677177645957   28.769959037934466      

DEBUG   2013-08-16 18:53:08.361 [kg.apc.p] (): Building metrics
DEBUG   2013-08-16 18:53:08.362 [kg.apc.p] (): Metrics line: 4.675810473815462  28.777171298825664      

DEBUG   2013-08-16 18:53:12.015 [kg.apc.p] (): Read: java.nio.DirectByteBuffer[pos=0 lim=5 cap=1024]
DEBUG   2013-08-16 18:53:12.016 [kg.apc.p] (): Command line is: exit

DEBUG   2013-08-16 18:53:12.016 [kg.apc.p] (): Got command line: exit
INFO    2013-08-16 18:53:12.016 [kg.apc.p] (): Client disconnected
DEBUG   2013-08-16 18:53:12.016 [kg.apc.p] (): Done executing command
DEBUG   2013-08-16 18:53:12.016 [kg.apc.p] (): Command line is: 

The jmx snippet is as follows:

        <kg.apc.jmeter.perfmon.PerfMonCollector guiclass="kg.apc.jmeter.vizualizers.PerfMonGui" testclass="kg.apc.jmeter.perfmon.PerfMonCollector" testname="jp@gc - PerfMon Metrics Collector" enabled="true">
          <boolProp name="ResultCollector.error_logging">false</boolProp>
          <objProp>
            <name>saveConfig</name>
            <value class="SampleSaveConfiguration">
              <time>true</time>
              <latency>true</latency>
              <timestamp>true</timestamp>
              <success>true</success>
              <label>true</label>
              <code>true</code>
              <message>true</message>
              <threadName>true</threadName>
              <dataType>true</dataType>
              <encoding>false</encoding>
              <assertions>true</assertions>
              <subresults>true</subresults>
              <responseData>true</responseData>
              <samplerData>true</samplerData>
              <xml>true</xml>
              <fieldNames>false</fieldNames>
              <responseHeaders>false</responseHeaders>
              <requestHeaders>false</requestHeaders>
              <responseDataOnError>false</responseDataOnError>
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
              <assertionsResultsToSave>0</assertionsResultsToSave>
              <bytes>true</bytes>
              <fileName>true</fileName>
              <sampleCount>true</sampleCount>
            </value>
          </objProp>
          <stringProp name="filename">performance/perfMon.jtl</stringProp>
          <longProp name="interval_grouping">1000</longProp>
          <boolProp name="graph_aggregated">false</boolProp>
          <stringProp name="include_sample_labels"></stringProp>
          <stringProp name="exclude_sample_labels"></stringProp>
          <collectionProp name="metricConnections">
            <collectionProp name="-1817180271">
              <stringProp name="-1018488584">IP_address_1</stringProp>
              <stringProp name="1600768">4444</stringProp>
              <stringProp name="66952">CPU</stringProp>
              <stringProp name="-1995081339">label=oam cpu:combined</stringProp>
            </collectionProp>
            <collectionProp name="2098961627">
              <stringProp name="-1018488584">IP_address_1</stringProp>
              <stringProp name="1600768">4444</stringProp>
              <stringProp name="-1993889503">Memory</stringProp>
              <stringProp name="-38365490">label=oam memory:usedperc</stringProp>
            </collectionProp>
            <collectionProp name="1520680644">
              <stringProp name="-1018488586">IP_address_2</stringProp>
              <stringProp name="1600768">4444</stringProp>
              <stringProp name="66952">CPU</stringProp>
              <stringProp name="1293744259">label=fe cpu:combined</stringProp>
            </collectionProp>
            <collectionProp name="-592001377">
              <stringProp name="-1018488586">IP_address_2</stringProp>
              <stringProp name="1600768">4444</stringProp>
              <stringProp name="-1993889503">Memory</stringProp>
              <stringProp name="571068176">label=fe memory:usedperc</stringProp>
            </collectionProp>
          </collectionProp>
        </kg.apc.jmeter.perfmon.PerfMonCollector>
        <hashTree/>

Andrey Pohilko

unread,
Aug 17, 2013, 5:32:36 AM8/17/13
to jmeter-...@googlegroups.com, sha...@gmail.com
Perfmon JTL file must be configured separately from regular JTL results file. You should set filename in Metrics Collector GUI. 

суббота, 17 августа 2013 г., 6:08:06 UTC+4 пользователь sha...@gmail.com написал:

sha...@gmail.com

unread,
Aug 17, 2013, 9:39:41 PM8/17/13
to jmeter-...@googlegroups.com, sha...@gmail.com
Hi Andrey,

Thanks for replying. I did use a separate file for the output and it was configured via the GUI:

 <stringProp name="filename">performance/perfMon.jtl</stringProp>

The command line output was for my test summary result which is :

 -l ~/jmeter_perfMon.jtl 

The two files are in different locations although have a substring match. I know the agent is working as I was able to get metrics by running the metrics commands through a telnet session and I can see it has an output in the DEBUG logs. The plugin however, was unable to generate the output in the jtl file I had configured as an output as seen below. Only the header and footer of the xml was produced by the tool:

# cat perMon.jtl 
<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">


</testResults>

Does the tool have an issue writing the output file when jmeter is generating the Summary Report?

Regards
Shanim

Andrey Pohilko

unread,
Aug 18, 2013, 1:49:24 PM8/18/13
to jmeter-...@googlegroups.com, sha...@gmail.com
No, there seems to be no issue with file writing, because it have written XML header successfully. Metrics Collector use core JMeter file writing facility.

So the only reason might be that it haven't received any perfmon data during non-gui run. 

Can you try running the same JMX in GUI mode and checking if it writes resulting file?

воскресенье, 18 августа 2013 г., 5:39:41 UTC+4 пользователь sha...@gmail.com написал:

sha...@gmail.com

unread,
Aug 23, 2013, 1:04:21 AM8/23/13
to jmeter-...@googlegroups.com, sha...@gmail.com
I did try that and that didn't work either :( I'll try recreating my jmx file and attempt again later.
Reply all
Reply to author
Forward
0 new messages