Run a fixed CPU load in docker
4.3K
This is basically the containerized version of GaetanoCarlucci/CPULoadGenerator. It allows you to generate a load on the CPU for a certain amount of time.
docker pull furiousgeorge/cpuload
docker run --rm furiousgeorge/cpuload
The output should look something like this:
Usage: CPULoadGenerator.py [options]
Options:
-l, --cpuLoad= Cpu Target Load [default: 0.2]
-d, --duration= Duration [default: 10]
-p, --plot= Enable Plot [default: 0]
-c, --cpu_core= Select the CPU on which generate the load [default: 0]
--version Display Twisted version and exit.
--help Display this help and exit.
For example, to run an 30% load for 30 seconds on the 1st core:
docker run --rm furiousgeorge/cpuload CPULoadGenerator.py -c 0 -l 0.3 -d 30
Another example, to run on 80% load for 10 seconds on 4 cores:
docker run --rm furiousgeorge/cpuload bash -c "CPULoadGenerator.py -c 3 -l 0.8 -d 10 | CPULoadGenerator.py -c 2 -l 0.8 -d 10 | CPULoadGenerator.py -c 1 -l 0.8 -d 10 | CPULoadGenerator.py -c 0 -l 0.8 -d 10"
See the source repository (GaetanoCarlucci/CPULoadGenerator) for more details.
Content type
Image
Digest
Size
358.3 MB
Last updated
over 5 years ago
docker pull furiousgeorge/cpuload