You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aleksander Kiryk 4966dbd52a Pack the code in graph.py and watch.py into functions 4 years ago
.ci.yml ci: hog 70MB of HDD 4 years ago
.gitignore Initial commit 7 years ago
LICENSE Initial commit 7 years ago
README.md Update date in Readme 4 years ago
common.py Make pid_running a common function 4 years ago
graph.png Update graph.png 4 years ago
graph.py Pack the code in graph.py and watch.py into functions 4 years ago
sargraph.py Pack the code in graph.py and watch.py into functions 4 years ago
watch.py Pack the code in graph.py and watch.py into functions 4 years ago

README.md

sargraph

Copyright (c) 2019-2022 Antmicro

This is a simple python tool that uses "sysstat" ("sar") and "gnuplot" to plot cpu and ram usage.

Usage

$ python sargraph.py [session_name] [command] [arg]

Background use (requires "screen" tool):

$ python3 sargraph.py chart start
$ sleep 1
$ python3 sargraph.py chart label "label1"
$ sleep 1
$ python3 sargraph.py chart label "label2"
$ sleep 1
$ python3 sargraph.py chart stop

Or just:

$ python3 sargraph.py
# wait 1 sec
# type label1\n
# wait 1 sec
# type label2\n
# wait 1 sec
# type q\n
# wait until sargraph generates plot.png

Example graph

graph