http://linuxdrops.com/how-to-produce-high-cpu-load-memory-io-or-stress-test-a-linux-server
On CentOS/RHEL
On Debian, Ubuntu
Download the latest tarball and run configure, make, make install
The binary gets installed under /usr/local/bin
To start stress run stress followed by the -c flag for load stress, -m for memory stress, -i for io and -d for HDD. For example to stress cpu execute
Execution of the command above will hog all available cpu power and
create a load five times a single core would happily handle.
Similarly to stress some memory you can execute
To know about all available flags execute
Overview
There are times when you have to stress test your linux/unix box to see how the proxy, database, memcache or other applications running on top would perform under stress or resource crunch. Enter stress which is a deliberately simple workload generator for POSIX systems. It imposes a configurable amount of CPU, memory, I/O, and disk stress on the system. It is written in C, and is free software licensed under the GPLv2.How to produce high CPU load, memory, I/O or stress test Linux server
Install some prerequisitesOn CentOS/RHEL
# yum install gcc gcc-c++ autoconf automake
$ sudo su -
# apt-get update
# apt-get install build-essential
# wget http://weather.ou.edu/~apw/projects/stress/stress-1.0.4.tar.gz
# tar zxvf stress-1.0.4.tar.gz
# cd stress-1.0.4
# ./configure
# make
# make install
To start stress run stress followed by the -c flag for load stress, -m for memory stress, -i for io and -d for HDD. For example to stress cpu execute
# stress -c 5
Similarly to stress some memory you can execute
# stress -m 512M
# stress --help
No comments:
Post a Comment