2015. június 30., kedd

Create Jmeter tests on Linux VPS and measure system resource usage with dstat

To run jmeter test from the command line:
http://forraskod.blogspot.hu/2015/06/jmeter-futtatasa-linux-parancssorbol-es.html
  • Prepare for test - stop all other services
sudo service hue stop
sudo service sqoop-metastore stop
sudo service flume-master stop
sudo service flume-ng-agent stop
sudo service oozie stop
sudo service hiveserver2 stop
sudo service hive-metastore stop
sudo service hbase-thrift stop
sudo service hbase-master stop
sudo service hadoop-hbase-regionserver stop
sudo service hadoop-0.20-mapreduce-jobtracker stop
sudo service hadoop-0.20-mapreduce-tasktracker stop
sudo service hadoop-mapreduce-historyserver stop
sudo service hadoop-yarn-nodemanager stop
sudo service hadoop-httpfs stop
sudo service hadoop-hdfs-namenode stop
sudo service hadoop-hdfs-secondarynamenode stop
sudo service hadoop-hdfs-datanode stop
sudo service zookeeper-server stop
sudo service zookeeper stop
sudo pkill -f python
sudo pkill -f java
sudo service munin-node stop
sudo service cloudera-scm-agent stop

  • Running dstat to measure CPU, RAM and disk usage
 dstat -d -c -m 3 | tee out/dstat25users.txt
  •  Running Jmeter 20 seconds later from the load tester VM:
 ./jmeter -n -t addevent.jmx -Jusers=25 -Jrampup=30 -Jduration=600 -Jgraphcsv=~/out/test25gra.csv -l ~/out/test25.csv
  • Stop dstat 20+ seconds after the Jmeter test has finished
  • Repeat the test with other settings (e.g. 50 and 100 users)
  • Upload results to an FTP server and download to local computer
tar -cvzf out.tar.gz out/ 
wput out.tar.gz ftp://USERNAME:PASSWORD@HOSTNAME/FOLDERNAME/
  •  Open the results in the local Jmeter GUI and create the graphs


Nincsenek megjegyzések:

Megjegyzés küldése