Skip to main content

a package to graphically monitor per-process resource usage

Project description

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.

PyPI Downloads

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.

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

resitor-1.0.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

resitor-1.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file resitor-1.0.1.tar.gz.

File metadata

  • Download URL: resitor-1.0.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for resitor-1.0.1.tar.gz
Algorithm Hash digest
SHA256 534788a95c5e7213e604651847ebd6e7258a011997729c5ad9bd8d94c5944645
MD5 8fafabc0908266534abc0b9015b6ea4b
BLAKE2b-256 9e4200edca8e6eea63778cd4e3dd7ba59c93766072c8e964751734156fda8ee0

See more details on using hashes here.

File details

Details for the file resitor-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: resitor-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for resitor-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ff6fb0f5e06f05d30566d6280e1221b2a179f15c592625a7e8770ea6e4068d9
MD5 17e372407e52a79431922e40fc5f9b19
BLAKE2b-256 556e8fbe2eb1422778a7ad414d88a6b32b5dd322b98baeddaf199e24dd169a68

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