Skip to content

This simple script allows you to generate a fixed configurable CPU load for a finite time. To the purpose, a PI controller is employed.

Notifications You must be signed in to change notification settings

boris-penev/CPULoadGenerator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

CPULoadGenerator

This simple script allows to generate a fixed CPU load for a finite time period. To the purpose, a PI controller is employed. The script takes the desired CPU load and the duration of the load generation as input. The process is forced to run only on CPU 0. The controller and the CPU monitor are implemented in two different threads.

Usage

Install matplotlib: it allows to monitor the status of CPU 0:

sudo apt-get install python-matplotlib

To run the script that generates CPU load run:

./CpuLoadGenerator.py -l <setpoint> -d <duration>

where duration sets the time duration of the script in seconds and setpoint sets the percentage of CPU load to generate.

About

This simple script allows you to generate a fixed configurable CPU load for a finite time. To the purpose, a PI controller is employed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%