Thursday, February 18, 2016

How to create stress on Linux VMs?
Using Stress tool:

cd /tmp
wget "http://download.opensuse.org/repositories/server:/monitoring/SLE_11_SP3/server:monitoring.repo"
zypper addrepo "server:monitoring.repo"
With CentOS 7, maybe the CentOS 6 repository from the same site will work? Try:
yum-config-manager --add-repo "http://download.opensuse.org/repositories/server:/monitoring/CentOS_CentOS-6/server:monitoring.repo"
Then try the zypper install or yum install again, e.g.
zypper refresh
zypper install stress


Example

Here is an example invocation: a load average of four is imposed on the system by specifying two CPU-bound processes, one I/O-bound process, and one memory allocator process.

   $ stress --cpu 2 --io 1 --vm 1 --vm-bytes 128M --timeout 10s --verbose
   stress: info: [9372] dispatching hogs: 2 cpu, 1 io, 1 vm, 0 hdd
   stress: dbug: [9372] (243) using backoff sleep of 12000us
   stress: dbug: [9372] (262) setting timeout to 10s
   stress: dbug: [9372] (285) --> hogcpu worker 9373 forked
   stress: dbug: [9372] (305) --> hogio worker 9374 forked
   stress: dbug: [9372] (325) --> hogvm worker 9375 forked
   stress: dbug: [9372] (243) using backoff sleep of 3000us
   stress: dbug: [9372] (262) setting timeout to 10s
   stress: dbug: [9372] (285) --> hogcpu worker 9376 forked
   stress: dbug: [9375] (466) hogvm worker malloced 134217728 bytes
   stress: dbug: [9372] (382) <-- worker 9374 signalled normally
   stress: dbug: [9372] (382) <-- worker 9373 signalled normally
   stress: dbug: [9372] (382) <-- worker 9375 signalled normally
   stress: dbug: [9372] (382) <-- worker 9376 signalled normally
   stress: info: [9372] successful run completed in 10s

No comments:

Post a Comment