Giter VIP home page Giter VIP logo

cpu-usage-logger's Introduction

CPU Usage Logger

CPU Usage Logger is a simple utility program that logs high CPU usage and tracks the CPU usage of processes on your system. The program was created by Rubin Raithel (@Coronon) and can be downloaded from the GitHub repository.

Features

  • Logs spikes in total CPU usage and CPU usage of individual processes
  • Supports both CLI and logging to a file
  • Allows customization of thresholds and measurement parameters

Usage

The program can be run using the following command:

cpu-usage-logger [OPTIONS]

The available options are:

  • -b, --time-between-measurements: How long to wait between measurements in seconds (default: 5)
  • -m, --measurement-time: How long to measure for in seconds (CPU usage is an average over this time) (default: 1)
  • -t, --total-log-threshold: Threshold of total CPU usage to start logging at in percent (default: 30)
  • -p, --process-log-threshold: Threshold of single process CPU usage to start logging at in percent (default: 15)
  • -n, --number-of-processes-to-show: Number of top CPU consuming processes to log when total_log_threshold is exceeded and to show in the CLI (default: 5)
  • -c, --cli: CLI mode - periodically write stats to stdout
  • -l, --log-file: Path to log file
  • -h, --help: Print help
  • -V, --version: Print version

Example

To start logging CPU usage with the default settings, simply run the following command:

cpu-usage-logger

To log CPU usage to a file, use the following command:

cpu-usage-logger -l mylog.txt

To run the program in CLI mode, use the following command:

cpu-usage-logger -c

Contributions

Contributions to the program are welcome. If you encounter any issues or have suggestions for improvement, please submit them to the GitHub repository.

License

The program is licensed under the MIT License.

cpu-usage-logger's People

Contributors

coronon avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 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.