How to measure CPU and memory during load test

2019-03-12 06:23发布

We are using JMeter in a heterogeneous environment and we would like to measure CPU and memory while we are producing heavy load on a server where our service or web application is running. What would you recommend to use? Is there any software solution (open source or commercial) available which records CPU and memory usage in a file or to a database?

Thank you!

5条回答
【Aperson】
2楼-- · 2019-03-12 06:59

Perhaps you can take a look to collectd if you run in some unix/linux flavour. It will bring you not only CPU but also memory, Disk IO, network and a good number of plugins available.

查看更多
对你真心纯属浪费
3楼-- · 2019-03-12 07:14

One you install the Perfmon plugin, I also had to install the server agent, and open the firewall port 4444.

Here's a link which I found super useful.

http://grosan.co.uk/web-application-performance-testing-using-apache-jmeter-part-2-monitor-server-resources/

查看更多
乱世女痞
4楼-- · 2019-03-12 07:20
仙女界的扛把子
5楼-- · 2019-03-12 07:21

From the java perspective, you can use jconsole or write your own code to monitor the memory usage.

  1. Measure CPU and memory consumption of a Java application
  2. javasysmon on github
  3. dstat for linux and perfmon for windows. Read more
查看更多
放荡不羁爱自由
6楼-- · 2019-03-12 07:21

You could take a look at Cacti.

It could collect resource usages like CPU, MEM easily with built-in templates and display them in nice graphics. Both Windows and Uni* are supported.

查看更多
登录 后发表回答