42

I've searched the net and came across the Ubuntu wiki saying

stress-ng --matrix 0

is supposed the best. But there are dedicated stressors for CPU and RAM (looking at man).

Any ideas which one is the best to use? Thank you

mrjayviper
  • 1,535
  • 6
  • 22
  • 42

1 Answers1

63

You can install stress with:

sudo apt install stress

Then call it with:

stress --cpu 8 --io 4 --vm 4 --vm-bytes 1024M --timeout 10s

On my conky display notice how:

  • In the top section CPU utilization spikes from 3% to 100%
  • In the middle the temperature spikes from 60C to 80C
  • At the bottom memory spikes from normal 2.75 GiB to 6.25 GiB

stress test.gif

Type stress --help for a full list of options.


A commentator requested posting the entire conky script which I did here: conky transparent

WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
  • 3
    `stress` is not installed by default, at least not on 16.04. – muru Aug 23 '17 at 03:40
  • @muru Once again you are right: `$ apt list stress Listing... Done stress/xenial,now 1.0.4-1 amd64 [installed]` I just don't remember installing it I guess. I'll revise the answer. – WinEunuuchs2Unix Aug 23 '17 at 03:54
  • 5
    @mrjayviper It is called `conky` it's a light weight system monitor that is highly configurable and very popular in Linux world. You can google `conky` for more information. You can also search here in ***Ask Ubuntu*** and in Ubuntu Forums. – WinEunuuchs2Unix Aug 23 '17 at 03:58
  • @WinEunuuchs2Unix can you please share the conky theme? thank you – mrjayviper Aug 23 '17 at 05:21
  • 2
    @mrjayviper Had to search a bit to find the old post but here it is: [Ubuntu Forums share your .conkyrc](https://ubuntuforums.org/showthread.php?t=281865&page=2327&p=13629343#post13629343) There are many other .conkyrc themes in the forum better than my own. – WinEunuuchs2Unix Aug 23 '17 at 10:13
  • @mrjayviper I posted the script for another commentor which you'll find easier to access here: https://askubuntu.com/questions/941701/conky-transparent/941705#941705 – WinEunuuchs2Unix Sep 05 '17 at 22:11
  • 2
    It might be worth mentioning that in order to install stress and /or conky as outlined in your answer and comments you must first [enable the universe repository](https://askubuntu.com/questions/148638/how-do-i-enable-the-universe-repository) – Elder Geek Sep 21 '17 at 15:21