Skip to main content

Monitor metrics in a real-time time-series line-graph (a-la perfmon.exe)

Project description

grafmon

Monitor metrics in a real-time time-series line-graph

screenshot

Demonstration video

demo video

Features

  • Real-time time-series graph of metrics.
  • Provide your own metric command.
  • Several built-in metrics.
  • Polished graph interface.
  • Adjustable refresh rate.
  • Pausable updates.
  • Hide/show lines.
  • Clickable/hoverable lines.
  • Remembers window position/layout.

Install

pip install grafmon

Usage

usage: grafmon [-h] [-m MONITOR | -c COMMAND] [-r REFRESHRATE] [-t MAXTICKS]
               [-l MAXLABELS] [--list-monitors]

Monitor metrics in a real-time time-series graph

options:
  -h, --help            show this help message and exit
  -m MONITOR, --monitor MONITOR
                        Select from builtin monitors to feed data into monitor
                        [default: pcpu]
  -c COMMAND, --command COMMAND
                        User command to feed data into monitor [example: ps
                        -eo rss,pid,comm --no-headers]
  -r REFRESHRATE, --refreshrate REFRESHRATE
                        Refresh rate in milliseconds [default: 1000]
  -t TICKS, --ticks TICKS
                        Count of ticks on X axis [default: 60]
  -l LABELS, --labels LABELS
                        Count of labels on X axis [default: 10]
  --list-monitors       List available builtin monitors

Builtin monitors

avgpcpu    Average CPU% (using `ps`) over lifetime of all processes
cuc        CPU%, including dead children, in extended ##.### format of all processes
cuu        CPU% in extended ##.### format of all processes
drs        Data resident set size of all processes
pcpu       Immediate CPU% (using `top`) of all processes
pmem       Physical memory percentage of all processes
pss        Proportional share size of all processes
rbytes     Number of bytes really fetched from storage layer of all processes
rchars     Number of bytes read from storage of all processes
rops       Number of read I/O operations of all processes
rss        Resident set size (physical memory usage, in kilobytes) of all processes
sz         Physical pages used of all processes
thcount    Thread counts of all processes
trs        Text resident set (executable code memory usage) of all processes
vsz        Virtual memory usage of all processes
wbytes     Number of bytes really written to storage layer of all processes
wcbytes    Number of canceled write bytes of all processes
wchars     Number of bytes written to storage of all processes
wops       Number of write I/O operations of all processes

Custom monitor

Grafmon accepts user-provided commands for monitoring. The command must use output lines in the format of <float> <string> to STDIN. The <float> will be the value associated with <string>. The <string> may contain spaces. Grafmon will invoke the command every refresh-rate tick.

Example:

grafmon -c ps -eo pcpu,pid,comm --no-headers

Notes

I needed an easy-to-install app that can graph in real-time various system metrics, notably percentages of CPU usages for all active processes. The KDE and Gnome system monitors/task managers graphed overall CPU usage rather than per-process usage.

Grafmon is inspired in part by Windows' perfmon.exe. The graph does not scroll, but instead updates in a "wipe". A vertical line will move from left-to-right as the metrics are read each tick. When the line reaches the end, it resets back to the beginning. This allows easy hovering over of graph elements to inspect the data. A moving scrolling graph would be more difficult to hover over the lines and their peaks.

Lines may be clicked on to highlight them to more easily see them in the graph. Lines may be hovered-over to see a tooltip of their values. Their values will also appear in the status bar at the bottom of the window.

To zoom the graph in to inspect lower valued lines, you can untick the checkboxes in the list on the left. Unticking checkboxes for lines with the highest peaks will hide the lines and the graph will zoom in to fit the next highest peaks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grafmon-1.0.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

grafmon-1.0.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

grafmon-1.0.0-1-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file grafmon-1.0.0.tar.gz.

File metadata

  • Download URL: grafmon-1.0.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for grafmon-1.0.0.tar.gz
Algorithm Hash digest
SHA256 350d2e4b050988bcb98fe486a9b4a8bb7ef3ffd862755da5b80a29f31b3eeb9e
MD5 fe43d34b65be1f526a52f2eaefc9cc89
BLAKE2b-256 c1d847a324e2b3170c6bf41962deddc556d581bde088203473a9c8507a2947b3

See more details on using hashes here.

File details

Details for the file grafmon-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: grafmon-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for grafmon-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb44ff436738a65bc74a3daa59fccfbb8f0b744d0a3f3fe845b8f7b22af66400
MD5 c247f38a952da70e89493e8ce7805db5
BLAKE2b-256 90a4a804bfeb0eae6ec201d2b6030004c75fe6b231b77cbec1fee35360e650de

See more details on using hashes here.

File details

Details for the file grafmon-1.0.0-1-py3-none-any.whl.

File metadata

  • Download URL: grafmon-1.0.0-1-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for grafmon-1.0.0-1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2abfe74e8bfe6e6ecceb9af75e1fcf9661bd624e6b875304397e154df598044
MD5 78af078ba897240202ddaff7d24003b6
BLAKE2b-256 916cea35ffc0560bb255c29362c55ac9d4a8733b5b694932587b4a83e7817a95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page