How to see the usage percentage of different compo

2019-09-10 06:06发布

问题:

I am testing a website through Jmeter, but all its components say LMS CMS Mongodb and Mysql are all in the same single VM

How to view its individual usage stats? preferably in graph

回答1:

You need to monitor the processes for each service which you want to monitor on that VM. For example if you want to monitor and log top 10 CPU hungry processes to a log file in Linux use below command:

while true; do (echo "%CPU %MEM ARGS $(date)" && ps -e -o pcpu,pmem,args --sort=pcpu | cut -d" " -f1-5 | tail) >> ps.log; sleep 5; done

Then you can utilize the data in log file to plot graphs accordingly. Other option is to use third party APM tools like New Relic or App dynamics to monitor your VM and you can get automatic reports as well for all the monitored processes.



回答2:

You can nmon to capture resource utilization of each process. For details you can refer to : http://www.ibm.com/developerworks/aix/library/au-analyze_aix/

First save the nmon logs and then use nmon analyzer to plot the graphs.