First, stress tool installation:
1. Get Stress Source installation package (stress-1.0.4.tar.gz)
3. Unzip and install
[[email protected]/] #cd/tmp/[[email protected] tmp]#tar –zxvf stress-1.0. 4. tar. gz
4. Enter the stress-1.0.4 folder, compile and install the stress
[[email protected] tmp] #cd/tmp/stress-1.0. 4/[[email protected] stress-1.0. 4]#./Configure[[email protected] Stress-1.0. 4make[email protected] stress-1.0. 4]#makeinstall
Installed by default on:/usr/local/bin/stress
Second, the use of stress tools:
Command: Taskset–c logical CPU Index number stress--timeout duration--CPU 1
Parameter description:
-C Server Logical CPU index number
--timeout duration of pressure on the CPU
--CPU Stress Process Number, if the value is 2, each stress process consumes all the logical CPU resources equally
For example: Pressure on the logical CPU with index 0 for 30 seconds
0 - 1
With top 1 You can see the utilization of the CPU indexed to 0
Testing methods for Linux stress CPUs