When jmeter is used for performance testing, nmon can be used for server monitoring.
I. nmon description
Nmon is divided into toolkit and analysis package (nmonanalyser)
The installation of nmon is very simple. Download the corresponding version based on the server version and install it.
Ii. nmon listening
1. Real-time Monitoring
Run./nmon to start the nmon tool in the nmon installation directory.
After the startup is successful, enter different commands to monitor different information.
C --- displays CPU information;
M --- displays memory information;
N --- displays network information;
D --- Displays disk information;
T --- view the process information of the system.
2. collect monitoring data
In actual performance tests, more often than not, it accumulates various types of data for analysis.
Collect data
Nmon-Sn-CN-F-M address
Note:
SN: Indicates sampling every n seconds;
CN: N sample data, for example, S1, c300 --- indicates that one sample data is sampled every 1 second. Sampling stops after 300 samples (1*300/60 = 5 minutes: it will run for 5 minutes)
-F: output file in standard output format (hostname_yyyymmdd_hhmm.nmon)
-M address: the storage location of the monitoring file generated by-f.
(In the process of nmon monitoring, if you need to manually stop data collection, you can first find the process ID, and then kill: PS-Ef | grep nmon (find the nmon process ID ), kill-9 ID (ID value)
3. Generate chart analysis data
After data collection is complete, generate and analyze data images in the nmon analyser tool.
Open nmon analyser, click the analyse nmon data button, select the files collected before, and wait for the chart to be generated
Use nmon to monitor server performance during performance testing