resitor
resitor is a package to graphically monitor per-process resource usage.
While many systems have built-in functionality for graphical analysis, it only is available for system-wide usage. Users cannot analyze individual resource usage with other tools. Resitor changes this by providing capabilities to analyze one (or more) processes for their individual memory, CPU, and disk (Windows / Linux) usage.
- HomePage: https://github.com/kzhu2099/Resource-Monitor
- Issues: https://github.com/kzhu2099/Resource-Monitor/issues
Author: Kevin Zhu
Features
- graphical per-process monitoring of CPU and memory
- last-frame saving
- customization
- multiple PIDs
- CLI or Python
Research Usage
With the increasing usage of artificial intelligence, machine learning, and generally computationally expensive tools, it is more important than ever to monitor different processes for overall efficiency. resitor introduces a new perspective with a visual graph of individual processes. Its CLI allows full integration for any process, extending its capabilities past Python. The novelty of resitor is its independant graph where users are able to interactively identify when a problem happens--as opposed to retrospective analysis found in other software. The closest software that allows users to visualize memory usage is memory_profiler, but it only generates a plot after the data is collected. Others that show live memory usage by-process include the built-in top, but it lacks visualization.
Installation
To install resitor, use pip: pip install resitor.
However, many prefer to use a virtual environment.
macOS / Linux:
# make your desired directory
mkdir /path/to/your/directory
cd /path/to/your/directory
# setup the .venv (or whatever you want to name it)
pip install virtualenv
python3 -m venv .venv
# install resitor
source .venv/bin/activate
pip install resitor
deactivate # when you are completely done
Windows CMD:
# make your desired directory
mkdir C:path\to\your\directory
cd C:path\to\your\directory
# setup the .venv (or whatever you want to name it)
pip install virtualenv
python3 -m venv .venv
# install resitor
.venv\Scripts\activate
pip install resitor
deactivate # when you are completely done
Usage
First, start a process (a python script). In the Tests/ folder, there is an existing long_program.py (be careful, it takes resources so you must manually end it when you are done).
It will print the PID of that process, through os.getpid(). Then, use python3 -m resitor <pid> to monitor the resource usage.
Or, you may use the start_monitor(<pid>, ...) function and input your desired parameters.
You may enter a list of PIDs through python3 -m resitor <pid1> <pid2> .... A list of PIDs can be inputed to start_monitor() as well.
If you don't want to watch CPU or memory, simply add the -noc or nom flags.
For Windows / Linux users, you may also watch the disk usage through the -dsk flag.
Limitations
Currently, psutil (what this is built on) does not have per-process network monitoring.
Furthermore, macOS users do not have access to per-process disk monitoring.
CPU granularity is only limited to 1 / 10th of a percent.
License
The License is an MIT License found in the LICENSE file.
Metadata
Release files for resitor 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| resitor-1.0.2.tar.gz | 10.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| resitor-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.5 kB
Release files / resitor-1.0.2.tar.gz
| Download URL | resitor-1.0.2.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cf3a70e7c4c3e70d90d19f3e4d0a00f58b78585df8dad8b220600824efd1c94
|
|
BLAKE2b-256 checksum How to use checksums |
ff703a02411a7565b419be0844e81a1861d39a7d3a0c892f01f692ef193f6196
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Release files / resitor-1.0.2-py3-none-any.whl
| Download URL | resitor-1.0.2-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25c0a058162926e56fdd0e32fa60ca835b2f57012a13a04d6d11c139eac068e8
|
|
BLAKE2b-256 checksum How to use checksums |
0de5fb8f68dd22dd3733bcd694239d0e7246d513a09b6d6b1032b4edc2e8681b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|