There is abundant material available on the net on setting up and using JMeter; but sometimes the sought bit of information gets lost amidst too much information. Hence, listing out the basic steps of setting up JMeter in master-slave mode.
- Have Java 1.6 or higher installed on your system
- Download Apache JMeter Download Link
- Just unzip the downloaded file and place it at two suitable locations, say C:/Software/Tools/JMeterRoot/Slave and C:/Software/Tools/JMeterRoot/Master (two locations because remember, we need two instances of JMeter one running in Master and the other in Slave mode)
- Some other miscellaneous requirements can be found at the Apache Site
Steps for setting up the Slave:
- Go to the 'bin' directory where JMeter is placed, say C:/Software/Tools/JMeterRoot/Slave/bin)
- Open the 'jmeter.properties' file (and update some properties)
- Choose a port number at which the Slave is to run locally, say 6000 and then set this as the port number by updating: server.rmi.localport=6000
- Then pick another port number at which the Master would connect to the Slave, say 1664 and update the following two properties, server.rmi.port=1664 AND server_port=1664
- And update the 'rmi create' attribute to true, that is; server.rmi.create=true
- Next, pull up a console and go to this 'bin' directory and type 'jmeter-server.bat' (in case of a Windows System) or just 'jmeter-server' (in case of a *NIX System)
Steps for setting up the Master:
- Go to the 'bin' directory where JMeter is placed, say C:/Software/Tools/JMeterRoot/Master/bin
- Open the 'jmeter.properties' file
- Modify the property 'remote_hosts' and add the <hostname>:<port number> of all the Slaves that were set-up above, that is, remote_hosts=202.202.202.202:1664
- Note: The port-number set in remote_hosts should be the same as the one set in server.rmi.port in the Slave(s)
- Next, again bring up a console and go to this 'bin' directory and type 'jmeter.bat' (in case of a Windows System) or just 'jmeter' (in case of a *NIX System)
- Run -> Remote Start -> Choosing the desired Slave OR
- Run -> Remote Start All
And that's it, different loads maybe set on each Slave from the Master GUI. :)
No comments:
Post a Comment