GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - iar747/cpuplot: Command Line profiler of CPU usage and Load Average

BranchesTags
Open more actions menu

Latest commit

 

History

76 Commits
76 Commits

Folders and files

NameName
Last commit message
Last commit date
screenshots
screenshots
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
cpuplot
cpuplot
 
 

Repository files navigation

cpuplot

Command Line Profiler of CPU Usage and Load Average.

Synopsis:

BASH script that shows the history of CPU usage, and what procces uses the most CPU at a given time.

Bar graphs represent the percentage of Total CPU Usage, and the percentage of Total 1 Minute Load Average.

Default wait interval between system readings is 5secs. But a different one can be set in the command line with the -i argument. Default output is formatted for the standard console width of 80 columns, and will show only the bar chart for the CPU usage. To change this, use the -w argument explained below in the "usage" section.

The script detects when the system is in SLEEP mode and shows the "ASLEEP" text.

Developer: Ismael Antadillas

BSD 3 License

Usage:

cpuplot -i [seconds] -w [small medium large xlarge]

Where:

-i interval time in seconds between CPU readings.

-w width of the output, "small", "medium", "large", "xlarge"

Example: cpuplot -i 9 -w xlarge

The command above will set the time intervals to 9 seconds and shows the plot bars for total % of CPU usage and total % of load average.

Acronyms:

%MEMp Percentage of RAM memory used by the process.

%MEMt Total percentage of RAM memory used.

%CPUp Percentage of CPU used by the process.

%CPUt Total percentage of CPU being used.

%LA1m Percentage of one minute Load Average.

Calculations:

As described in the man page for the "ps" command: "The CPU utilization of the process is a decaying average over up to a minute of previous (real) time. Because the time base over which this is computed varies (some processes may be very young), it is possible for the sum of all %cpu fields to exceed 100%."

Because of the above some values for the "Total CPU Usage" may be over 100%. When this happens, the bar plot will be truncated to 100%.

The 1 minute Load Average Percentage, is calculated dividing the 1 minute Load Average by the number of Cores in the system.

Writing output to a file:

The following command will have the output of cpuplot displayed to the console and also written to a file:

cpuplot 2>&1 | tee outputFilename

Other screenshots:

Using cpuplot with no arguments, will use the default arguments of -i 5 for 5 seconds intervals, and -w medium to show only the plot of cpu usage and fit in a standard 80 columns console.

About

Command Line profiler of CPU usage and Load Average

Topics

barchartcpucpu-utilizationloadload-averageplotprofiler

Resources

Readme
BSD-3-Clause license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.