ubuntuでjmeterを使ったときのメモ
便利なものでaptitudeやapt-getで依存するパッケージも一緒に入る
$ sudo apt-get install jmeter
これでコンソールからjmeterが使えるようになる
$ which jmeter /usr/bin/jmeter $ dpkg -s jmeter Package: jmeter Status: install ok installed Priority: optional Section: net Installed-Size: 1720 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: all Source: jakarta-jmeter Version: 2.5.1-1 Depends: default-jre | java2-runtime, java-wrappers (>= 0.1.14), libavalon-framework-java, libbcmail-java, libbcprov-java, libbsf-java, libcommons-collections3-java, libcommons-httpclient-java, libcommons-io-java, libcommons-jexl-java, libcommons-lang-java, libexcalibur-logger-java, libexcalibur-logkit-java, libgeronimo-javamail-1.4-spec-java, libjcharts-java, libjdom1-java, libjtidy-java, liboro-java, librhino-java, libxalan2-java, libxmlgraphics-commons-java, libxstream-java Recommends: jmeter-http (= 2.5.1-1), jmeter-help (= 2.5.1-1) Description: Load testing and performance measurement application (main application) Apache JMeter is a 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. . This package contains the main application. Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Homepage: http://jmeter.apache.org/ $ dpkg -L jmeter /. /usr /usr/bin /usr/share /usr/share/jmeter /usr/share/jmeter/bin /usr/share/jmeter/bin/jmeter /usr/share/jmeter/bin/user.properties /usr/share/jmeter/bin/ApacheJMeter.jar /usr/share/jmeter/bin/jmeter.properties /usr/share/jmeter/bin/jmeter-server /usr/share/jmeter/bin/upgrade.properties /usr/share/jmeter/bin/saveservice.properties /usr/share/jmeter/bin/system.properties /usr/share/jmeter/lib /usr/share/jmeter/lib/ext /usr/share/jmeter/lib/ext/ApacheJMeter_monitors.jar /usr/share/jmeter/lib/ext/ApacheJMeter_report.jar /usr/share/jmeter/lib/ext/ApacheJMeter_components.jar /usr/share/jmeter/lib/ext/ApacheJMeter_functions.jar /usr/share/jmeter/lib/ext/ApacheJMeter_core.jar /usr/share/jmeter/lib/jorphan.jar /usr/share/jmeter/lib/bshclient.jar /usr/share/pixmaps /usr/share/pixmaps/jmeter.jpg /usr/share/doc /usr/share/doc/jmeter /usr/share/doc/jmeter/README.Debian /usr/share/doc/jmeter/copyright /usr/share/doc/jmeter/README.gz /usr/share/doc/jmeter/changelog.Debian.gz /usr/share/applications /usr/share/applications/jmeter.desktop /usr/bin/jmeter /usr/bin/jmeter-server
コマンドラインからCUIで実行する場合は-nオプションをつける。
(jmxファイルはGUIが使える環境で作成する。)
$ jmeter -n -t sample.jmx -l result.jtl
テスト結果は-lオプションで指定したファイルに保存される。
中身はxmlファイルなので、スクリプト組むなりして修正するか、GUIのjmeterのリスナーに食わせれば集計して表示してくれるのでそれで確認する。