Stress Command Examples

You deployed the new server and your code, but do you want to check how it will perform under a high CPU load? So here comes STRESS utility.  It will create a load on the server so you can observe performance under stress. Let’s see some Stress Command Examples

Stress Command Examples

Stress Utility is a workload generator tool designed to increase the load on the server so you can properly measure the performance of your application under high CPU, I/O, and disk stress.

Installing Stress Utility

On Centos servers, you can just run the command below.

$ yum install stress -y

On Ubuntu, it goes with

$ apt-get install stress

If you are on EC2, then you will have to do this as well

$ yum install amazon-linux-extras install epel -y


Now you spawn 8 workers on the stress utility to create load.

Let’s see the current load on the server.

$ uptime
04:12:18 up 182 days, 13:45,  1 user,  load average: 3.27, 0.94, 0.36

Now, let’s run the stress command using the command below.

$ stress -c 8 &
[1] 13255
$ stress: info: [13255] dispatching hogs: 8 cpu, 0 io, 0 vm, 0 hdd

Wait for a few seconds and see it has started generating load.

$ uptime
 04:13:59 up 182 days, 13:47,  1 user,  load average: 8.66, 3.45, 1.32

I hope you were clear about Stress Command Examples. Do have a look at Basic OpenSSL Commands as well

Leave a Comment