6

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
  • 2,303
  • 9
  • 39
  • 68
  • 1
    I like the package `stress` for such tasks – dufte Oct 11 '16 at 07:38
  • So 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 Oct 11 '16 at 11:39
  • 1
    Almost ...you can use `stress -c 4 -n 60` for a 60 second stress on 4 cores. If that is a working solution for you i can modificate that hint/comment to an answer .... – dufte Oct 11 '16 at 11:44
  • I 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?. – H3R3T1K Oct 12 '16 at 07:35
  • the proper command for 4 hours would be: `stress -c 4 -t 4h` - but hey it was just a little `stress --help` away; – d1bro Apr 20 '17 at 16:41
  • `watch sensors` will refresh the temperatures every 2 seconds. If you want a different interval then use `-n ` (something like `watch -n 0.5 sensors` for intervals of half a second) – Tooniis Nov 12 '19 at 08:46

2 Answers2

11

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
Colin Ian King
  • 18,370
  • 3
  • 59
  • 70
  • 2
    I use `stress-ng` to test my undervolting offset. It seems to be exploiting my CPU at higher clock speeds compared to [Linpack Xtreme](https://www.techpowerup.com/download/linpack-xtreme/) which claims to be the most aggressive stress testing software available 'today'. – Sandu Ursu Jun 16 '20 at 20:57
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.

amanusk
  • 1,536
  • 2
  • 16
  • 20