Skip to content

Instantly share code, notes, and snippets.

@phdesign
Forked from warnergodfrey/Gemfile
Last active December 9, 2015 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phdesign/727e31c25a62bcdd4de6 to your computer and use it in GitHub Desktop.
Save phdesign/727e31c25a62bcdd4de6 to your computer and use it in GitHub Desktop.
Instructions for running remote JMeter

Instructions for running remote JMeter

Server

Create a AWS instance

aws ec2 run-instances --image-id ami-xxxxxxxx --count 1 --instance-type m1.medium --key-name MyKeyPair --security-groups MySecurityGroup

SSH to remote server

ssh -i <pem_file> <aws_instance_hostname>

Install JDK 1.7

sudo yum install java-1.8.0-openjdk.x86_64

Install JMeter

cd /tmp
wget http://mirror.mel.bkb.net.au/pub/apache//jmeter/binaries/apache-jmeter-2.10.tgz
cd /opt
tar -xvzf /tmp/apache-jmeter-2.10.tgz 
echo "export JMETER_HOME=/opt/apache-jmeter-2.10" >> $HOME/.bash_profile
source $HOME/.bash_profile

Create new jmeter.properties file

echo "server.rmi.localport=1099" >> user.properties

Run server

$JMETER_HOME/bin/jmeter-server -Djava.rmi.server.hostname=`<public_ip>` &

Open logs

tail -f jmeter-server.log

Client

Install JMeter (on a Mac)

brew install jmeter

Create new jmeter.properties file

echo "client.rmi.localport=60000" > jmeter.properties

Open reverse tunnel from AWS to your localhost

ssh -i <pem_file> -o ServerAliveInterval=60 -R 60000:localhost:60000 ec2-user@<aws_instance_hostname>

Run the test plan

export JVM_ARGS="-Djava.rmi.server.hostname=localhost"
./jmeter

OR, just use flood.io :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment