CPU stress testing with "stress"
Solution 1
As the author of stress-ng, I'd personally recommend it as it has a wide range of stress tests that can be used to exercise the CPU in many different ways.
There are many ways to exercise the CPU, with stress-ng one can tell it to run all the stressors that can stress a CPU using:
stress-ng --class cpu --sequential 0 -t 60 -v
..and to check the temperatures from the thermal zone information, one can use:
stress-ng --class cpu --sequential 4 -t 60 -v --tz
The above will run the cpu class of stressors one by one (sequentially) for 60 seconds with verbose mode enabled and with thermal zone stats on 4 CPUs
Or one can run specific stressors, such as:
stress-ng --matrix 0 -t 2m
..this will run the matrix stressor for 2 minutes on all the CPUs (0 = all CPUs).
The manual with stress-ng details all the options. There are over 170 stressors to play with. To see all the stressors, use:
stress-ng --help | less
Solution 2
If you want to try using stress in TUI format, you try using s-tui. It is a terminal UI app we have created exactly for the purpose of stressing and monitoring temps.
It is available on github and on PyPi. https://amanusk.github.io/s-tui/
Installation with pip is:
sudo pip install s-tui
You still need to install stress or stress-ng, but you can change the parameters from inside s-tui. The default is to run on all cores for infinite time.
Related videos on Youtube
H3R3T1K
Updated on September 18, 2022Comments
-
H3R3T1K almost 2 years
I'm planning to stress test my OCed AMD Athlon X4 880K from a live session. I've heard about the "stress" tool. How is it used for CPU stress testing? I plan to monitor temps with lm_sensors. Do you know of the correct syntax to make "sensors" run in sensible intervals?
-
H3R3T1K over 7 yearsSo I would use "stress -c 4" to test my 4 cores? Is there an option to have it run a certain time i.e. 6 hours?
-
H3R3T1K over 7 yearsI rephrased my question. Could you provide an answer? I plan to run it for 4-6 hours as I would Prime95 on a Windows machine. Do I have to use 14400 for 4 hours?.
-
d1bro about 7 yearsthe proper command for 4 hours would be:
stress -c 4 -t 4h
- but hey it was just a littlestress --help
away; -
Tooniis over 4 years
watch sensors
will refresh the temperatures every 2 seconds. If you want a different interval then use-n <interval>
(something likewatch -n 0.5 sensors
for intervals of half a second)
-
-
Sandu Ursu about 4 yearsI use
stress-ng
to test my undervolting offset. It seems to be exploiting my CPU at higher clock speeds compared to Linpack Xtreme which claims to be the most aggressive stress testing software available 'today'.