Skip to content

Very simple bash and gnuplot script to monitor cpu and memory usage in graph

Notifications You must be signed in to change notification settings

honza-kasik/cpu-mem-usage-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cpu-mem-usage-monitor

Very simple bash and gnuplot (>=5.0) script to monitor cpu and memory usage of given process in graph

How to use

Clone repo, mark monitor.sh as an executable running chmod +x monitor.sh and run it by

./monitor.sh [OPTIONS]... -p PID | [OPTIONS]... -c COMMAND

Options

  • -p PID PID which will be monitored
  • [-g] The graph will be created
  • [-l FILE] Log file path
  • [-d FILE] Graph file path
  • [-s NUMBER] Time after the values will be added to log in seconds

Tracking by command name options

  • -c COMMAND Command name will be tracked in system instead of PID
  • [-F NUMBER] How long it will be waited for first occurrence of command in ps output.
  • [-N NUMBER] How long it will be waited for next instance to appear in ps output.

Example

./monitor.sh -c firefox will track different instances of Firefox browser in system one at a time (always the newest instance if previously watched was killed).

Notes

Logged raw values will be placed in usage.log files and graph will be placed in usage.png by default. Graph will not be created by default.

Resources

About

Very simple bash and gnuplot script to monitor cpu and memory usage in graph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published