Git Product home page Git Product logo

cpu-load-generator's Introduction

cpu-load-generator โ€“ a tool for generating a set of subsequent CPU utilization levels

This tools takes a file as an argument, which lists a set of CPU utilization levels as numbers in the [0, 100] range representing percentages. The numbers in the file should be separated by new lines. The tool accepts another parameter specifying the required time interval between two subsequent CPU utilization levels. Then, cpu-load-generator goes through the sequence of the CPU utilization levels and generates each CPU utilization level for the specified time interval. The tool also accepts an optional parameter that sets the number of CPU cores to utilizes, which defaults to 1.

Internally, to create each CPU utilization level cpu-load-generator calls the lookbusy synthetic load generator developed by Devin Carraway, released under the GPL license, and available from http://www.devin.com/lookbusy/

Installation

To use the tool, it is necessary to install the lookbusy program first. This can be done using the included install-lookbusy.sh script as follows (the installation requires the sudo password):

./install-lookbusy.sh

Usage

Usage: python cpu-load-generator.py [options] INTERVAL SOURCE

  Generates a set of subsequent CPU utilization levels read from a file.
  Copyright (C) 2012 Anton Beloglazov. Released under Apache 2.0 license.

  Options:
    -h, --help          show this help message and exit
    -n NCPUS, --ncpus=NCPUS
                        number of CPU cores to utilize [default: 1]

Positional Arguments:
  INTERVAL  interval between subsequent CPU utilization levels in seconds
  SOURCE    source file containing a new line separated list of CPU
              utilization levels specified as numbers in the [0, 100] range

Examples

To generate a sequence of 20%, 90%, and 50% CPU utilization for 20 seconds each on 2 cores using the test.data file, please run:

python cpu-load-generator.py -n 2 20 test.data

License

The tool is released under the Apache 2.0 license

Copyright (C) 2012 Anton Beloglazov

cpu-load-generator's People

Contributors

beloglazov avatar datawolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.