Friday, July 1, 2011

How to monitor server,s system performance while running Jmeter

This is the big question , when you are putting load on webserver from your computer or using distributed load testing, what is behaviour of server's computer..Server's computer behaviour means at the time of load what is cpu performane, network performance, i/o. So we need to monitor thise things also. But as i have practiced i was not be able to do distributed load testing and also monitoring the cpu performane of server's computer. For that what you can do?I will tell you waht i have tried. I open two jmeter windows. In one window i did distributed load testing, and in another i used the same script but with single thread (user), and check on forever, and added the server performance monitor listners. What it will do? It will run one user in loop till you will not stop the test and also provide you the server's computer performance. Because one user will create that much diffreence according to me.
First i will tell you have to add plugins in jmeter for listners.
For that you have to download  jmeter plugin.jar for the jmeter version you are using. Now extract jmeter plugin and copy jmeter plugin.jar file to c:/jmeter/lib/ext. And from the extracted file you will also get the server agent folder. Copy the server agent folder to the web server's computer and past it in c: drive. Explore server agent folder at server's end and start start agent.bat file.

















Now you should know the server's computer ip. Like we have the server ip is 192.168.45.89.

Now from your computer start jmeter and add-:


After clicking server performance monitor you will see the window like:-

















In this window you will be able to see add row,copy row and delete row.And clickig on add row the window will be like:-
















Here below Host/Ip where local host is written you have to type the ip of server's computer.And the port will be by default set to 4444 till no changes done at the server end.
Also you will be able to see cpu,memory,swap,disksI/O,NetworksI/O.From here you can select single object at a time.If you want to see all the details at the same time,so you can add server performance monitor from thread group-add-listners,and then can select another object.
Remember first you have to record or open the test then add the listners.
Now when you will start the test you will be able to see the server's performance selecting server performance monitor.
I think this blog may helpful to you for this senario..
Thank you

HOW TO DO DISTRIBUTED LOAD TESTING

Distributed load is referred with putting load on server by using another machine. In this you will send the request from your own computer which is called "Master" computer,to other computers which are called "slave" computer to web-server  With this you will be able to put max load on web-server with the different CPU usage.
The prerequisite for this:
  • You should turned off the firewalls of your computer.
  • All the clients should be the same Sub-net.
  • Make sure jmeter can access the server.
  • Make sure you use the same version of Jmeter on all the systems.
How to configure-In this in the master computer in which you are running Jmeter,first go to the C:/ drive where the jmeter folder is-Then explore the jmeter folder,go to jmeter properties/configure file,and edit it.
You will see the line after scrolling down remote Host-127.0.0.1
















Just add the ip of slave computer threw which you want to put the load on web-server.
Like I the ip’s are-192.168.34.78,192.168.34.89 etc..
But make sure that the IP should be of same domain.After adding the ip this line will look like-:















 


After editing the line press ctrl+s.This is what should be done in Master computer.
Now go to slave computers and on that –
Go to jmeter/bin directory and execute jmeter-server.bat (jmeter-
server). On windows, you should see a dos window appear with “jre\[version]
\bin\rmiregistry.exe”. If this doesn't happen, it means either the environment settings are
not right, or there are multiple JRE installed on the system.
1. Open jmeter-server.bat in a notepad or edit-plus.
2. Follow till line-44 and find “:setCP”
3. Edit “START rmiregistry” to the full path. Example: “START
C:\jre\bin\rmiregistry.exe”
















When you are putting the distributed load, you should execute the jmeter-server.bat file first.
Now when you will start Jmeter from master computer,on the run tab you will see the option remote start-















So as you can in the above figure in the remote start option you will be able to see all the ip’s. From here you can select the ip from which computer you want to put the load on web-server. Or u can click on Remote Start All to put load threw all the slave systems on web-server.
After configuring this you can record the test or open the save tests.

This will may helpful to you.for more information refer this link- http://jakarta.apache.org/jmeter/usermanual/remote-test.html