My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
JMeterPluginsCMD  

Tools
Updated Apr 30, 2012 by a...@apc.kg

JMeterPluginsCMD Command Line Tool since 0.4.1

There is small command-line utility for generating graphs out of JTL files. It behave just like right-click context menu on all graphs. The tool can generate PNG, CSV or both.

Installation

The tool is placed inside distribution ZIP. The tool consists of CMDRunner.jar and shell wrappers. Wrappers just shorten call of "java -jar CMDRunner.jar --tool Reporter ...". The tool files must be placed inside lib/ext directory of JMeter installation. The tool requires JMeterPlugins.jar to be placed in lib/ext also. The tool requires JMeter 2.4 to function properly (2.3 will work only for PNG generation).

Usage and Parameters

Generating PNG:

java -jar CMDRunner.jar --tool Reporter --generate-png test.png --input-jtl results.jtl --plugin-type ResponseTimesOverTime --width 800 --height 600

Generating CSV:

java -jar CMDRunner.jar --tool Reporter --generate-csv test.csv --input-jtl results.jtl --plugin-type ResponseTimesOverTime

Yoy may generate CSV and PNG in single tool run. --help will show you short help list on available parameters.

--generate-png <file> generate PNG file containing graph
--generate-csv <file> generate CSV file containing graph data
--input-jtl <file> load data from specified JTL file
--plugin-type <class> which type of graph use for results generation

You may customize graph drawing and data processing like GUI settings do with optional parameters:

--width <pixels> for PNG only - width of the image, default is 800
--height <pixels> for PNG only - height of the image, default is 600
--granulation <ms> granulation time for samples
--relative-times <yes/no> use relative X axis times, no will set absolute times
--aggregate-rows <yes/no> aggregate all rows into one
--paint-gradient <yes/no> paint gradient background
--paint-zeroing <yes/no> paint zeroing lines
--prevent-outliers <yes/no> prevent outliers on distribution graph
--limit-rows <num of points> limit number of points in row
--force-y <limit> force Y axis limit
--hide-low-counts <limit> hide points with sample count below limit
--include-labels <labels list> include in report only samples with specified labels, comma-separated
--exclude-labels <labels list> exclude from report samples with specified labels, comma-separated
--auto-scale <yes/no> enable/disable auto-scale multipliers for perfmon/composite graph
--line-weight <num of pixels> line thickness for graph rows

Plugin Type Classes

Most of class names are self-explanatory:

  • AggregateReport = JMeter's native Aggregate Report, can be saved only as CSV
  • ThreadsStateOverTime = Active Threads Over Time
  • BytesThroughputOverTime
  • HitsPerSecond
  • LatenciesOverTime
  • PerfMon = PerfMon Metrics Collector
  • ResponseCodesPerSecond
  • ResponseTimesDistribution
  • ResponseTimesOverTime
  • ResponseTimesPercentiles
  • ThroughputOverTime
  • ThroughputVsThreads
  • TimesVsThreads = Response Times VS Threads
  • TransactionsPerSecond
Comment by anto...@lahorcajada.com, Apr 4, 2011

Can you add new attribute --LimitNumber?-points? (Settings -- Rendering Options Limit number of points in row 20--200 points). It is useful !!

Comment by project member a...@apc.kg, Apr 4, 2011

Yes, I will try add it before release of 0.4.1

Comment by san...@pa7.nl, Apr 4, 2011

Hi, can you also let the tool use the graph settings in user.properties? I changed the default setting of the relative time to false and you like to use this in the tool as well.

Comment by project member a...@apc.kg, Apr 5, 2011
Comment by project member a...@apc.kg, Apr 5, 2011

Ok, I tried to implement all available graph options and user.properties. No snapshot yet for this changes...

Comment by san...@pa7.nl, Apr 5, 2011

Cool!

Next request off course is the possibility to automatically create a Word of PDF report with predefined graphs ;-)

Comment by anto...@lahorcajada.com, Apr 5, 2011

Thanks a lot for sharing it with us

Comment by project member a...@apc.kg, Apr 6, 2011

Sander! Could you become our next committer? You got a lot of energy inventing features, we need someone to implement all of them ;)

Just kiddin' of course! But more programmers for project would be great...

Comment by xlz...@yahoo.cn, Apr 26, 2011

Very good command line tool. Could it support other kinds of Listeners type? like plugin-type: Aggregate Report

Comment by project member a...@apc.kg, Apr 27, 2011

No, it can only support our custom plugins, because JMeter code have no way to get data from inside existing plugins.

However, there is a copy of AggregateReport? plugin type available for use in tool.

Comment by msantos....@gmail.com, Apr 27, 2011

I tried to use the --aggregate-rows command and set it to yes, but the rows don't aggregate into one row :( and is there a way for the response time to be converted to seconds?

Comment by project member a...@apc.kg, Apr 27, 2011

No, there is no way to convert response times to seconds since JMeter use milliseconds as response time units.

Could you post to newsgroup or create an issue for --aggregate-rows with full command-line example?

Comment by msantos....@gmail.com, Apr 27, 2011

ok thanks

Comment by project member Stephane...@gmail.com, May 3, 2011

Hi,

jmeter.bat -n -t my_test.jmx -l log.jtl

Comment by domlebo70@gmail.com, May 3, 2011

Keep getting this error using the sh script on a linux box:

DEBUG   2011-05-04 16:35:24.808 [kg.apc.j] (): Creating jmeter env
JMeter home directory was detected as: /mnt/msdaix14/Jmeter/jakarta-jmeter-2.4
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at kg.apc.jmeter.cmd.NewDriver.main(NewDriver.java:183)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at kg.apc.jmeter.cmd.NewDriver.main(NewDriver.java:178)
Caused by: java.lang.IllegalAccessError: tried to access method kg.apc.jmeter.vizualizers.AbstractGraphPanelVisualizer.getSettingsPanel()Lkg/apc/jmeter/vizualizers/JSettingsPanel; from class kg.apc.jmeter.PluginsCMDWorker
        at kg.apc.jmeter.PluginsCMDWorker.setOptions(PluginsCMDWorker.java:213)
        at kg.apc.jmeter.PluginsCMDWorker.doJob(PluginsCMDWorker.java:161)
        at kg.apc.jmeter.PluginsCMD.processParams(PluginsCMD.java:163)
        ... 5 more
Comment by project member a...@apc.kg, May 4, 2011

Please, use Issues tab to report issues...

Comment by maximili...@gmail.com, May 4, 2011

Can we get the composite graph with command line?

Comment by project member a...@apc.kg, May 4, 2011

No, we can't. It is so difficult task to configure whole possible compound stuff... Maybe in the future we'll find a nice way to provide it.

Comment by thierry_...@yahoo.fr, May 6, 2011

Really nice and helpful stuff. Great job.

What would be also nice is a way to graph any sample element that would be present in the jtl file. It may be useful to handle customized variables added with the jmeter sample_variables property. For example, I am recording a results.count value that is a value extracted from every response and that gives a number of items returned by a request - similar to bytes but expressed in a "functional unit".

It could be seen as a generalization of the actual data (response time, latency, bytes...) that are currently available in graphs.

Comment by arunguj...@gmail.com, Jul 18, 2011

Thanks, this tool is very well built. It solves most of my doubts.

Comment by arunguj...@gmail.com, Jul 18, 2011

Hi

Could you please answer one of my questions.

I would like to run the load test on different remote servers, collect the report from all the server's and pass it as an input param to this commandline tool and can I expect a cumulative AggregrateReport??

Comment by project member a...@apc.kg, Jul 19, 2011

To aggregate in command line 2 JTL files, you should use CSV and manually join them into one file.

Comment by cani...@gmail.com, Jul 22, 2011

I have also tried the --aggregate-rows yes command without successfull results. My command line example is: java -jar JMeterPluginsCMD.jar --generate-png tsot2.png --input-jtl "d:\20110722_120u5i_r4.jtl" --plugin-type ThreadsStateOverTime? --aggregate-rows yes --width 800 --height 600

Comment by project member a...@apc.kg, Jul 22, 2011
Comment by bo...@granveaud.com, Jul 25, 2011

when do you plan to release the fix for this bug? I tried JMeterPlugins-0.4.2-snapshot but it seems to break other graphs...

Comment by project member a...@apc.kg, Jul 25, 2011

Break other graphs? It's important bug, could you file an issue with more details how they're broken?

Comment by project member a...@apc.kg, Jul 25, 2011

I've created  issue 64  to work with your case

Comment by danny.bo...@gmail.com, Sep 15, 2011

Could it also be possible to import a csv file as data?

Comment by project member a...@apc.kg, Sep 16, 2011

Yes, it is possible, but only if you have the same saveservice.properties and jmeter.properties at load generator and cmd tools machine.

Comment by boubakar...@gmail.com, Oct 7, 2011

Hello and thank you for this good plugins.

When generating png, is it possible to select some rows ?

Best regards

Comment by project member a...@apc.kg, Oct 7, 2011

Currently no, it is planned for future versions.

Comment by pyrogx1...@gmail.com, Dec 13, 2011

This page needs to be updated. As of 0.5.0 there is no cmd directory. You now need to use the CMDRunner.jar but also pass in --tool Reporter to generate any png or csv

Comment by project member a...@apc.kg, Dec 14, 2011

Thanks for noticing, I changed the page

Comment by ere...@gmail.com, Dec 20, 2011

Hi!

Please I need help, how to use this plugin in order to generate results through non-gui run. I have configured everything and still I couldn't generate a graph for this job.

any one?

Comment by ere...@gmail.com, Dec 20, 2011

I have to detail that I am talking about "Perfmon Metrics Collector" plugin.

Comment by project member a...@apc.kg, Dec 20, 2011

Well, you should set up saving PerfMon data into file first (make this in Collector's GUI) Then you may use CMD tool to generate results from that file.

Comment by ere...@gmail.com, Dec 20, 2011

Hi again ,

I have used this command: -c "/usr/bin/java -jar /monsoon/opt/JMeter/lib/ext/JMeterPluginsCMD.jar --generate-png ./results/PerfmonMetricsCollector?.png --input-jtl ./results/mmcp_create_project.jtl --plugin-type PerfmonMetricsCollector? --width 1024 --height 768"

Comment by ere...@gmail.com, Dec 20, 2011

Still I have no results from server agent.

Comment by project member a...@apc.kg, Dec 20, 2011

Could you create an issue, attach your JTL to it and describe your commands there? I'll take a look.

Comment by marceloj...@gmail.com, Feb 1, 2012

Would it be possible to add an option to output a tab delimetde file? We are running automated tests and using this tool to generate a CSV of the Aggregate Report. We then email the csv file to different teams. It would be nice to have a nicely formatted tab delimeted file.

Comment by project member a...@apc.kg, Feb 3, 2012

Ok, I added item on separator setting to Roadmap

Comment by ruthan...@gmail.com, Feb 14, 2012

I got this error message i dont know very is problem, Java 1.6 update 17, Jmeter 2.6, plugin 0.51

C:\Programy\jmeter-2.6\lib\ext>java -jar CMDRunner.jar --tool Reporter --generat e-png test.png --input-jtl "C:\Program\jmeter-2.6\logs\web_ResponseTimesOver?? Time_20120214_20120214-122333.jtl" --plugin-type ResponseTimesOverTime --width 800 --height 600 DEBUG 2012-02-14 14:12:20.719 [kg.apc.j] (): Creating jmeter env using JMeter home: C:\Program\jmeter-2.6 ERROR: java.lang.NoSuchMethodError??: org.apache.jorphan.util.JOrphanUtils.closeQu ietly(Ljava/io/InputStream??;)V Problem's technical details go below Home directory was detected as: C:\Program\jmeter-2.6\lib\ext Exception in thread "main" java.lang.NoSuchMethodError??: org.apache.jorphan.util. JOrphanUtils.closeQuietly(Ljava/io/InputStream??;)V

at kg.apc.jmeter.PluginsCMDWorker.initializeProperties(PluginsCMDWorker.
java:104) at kg.apc.jmeter.PluginsCMDWorker.prepareJMeterEnv(PluginsCMDWorker.java :69) at kg.apc.jmeter.PluginsCMDWorker.<init>(PluginsCMDWorker.java:43) at kg.apc.cmdtools.ReporterTool??.processParams(ReporterTool??.java:58) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:63) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:23) at sun.reflect.NativeMethodAccessorImpl??.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl??.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl??.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at kg.apc.cmd.UniversalRunner??.main(UniversalRunner??.java:149)

We need a bit better debug than lowlevel Java exception.
Comment by project member a...@apc.kg, Feb 14, 2012

See  issue 124 . And please, don't use comments as issues.

Powered by Google Project Hosting