Metadata-Version: 2.4
Name: resitor
Version: 0.0.1
Summary: a package to graphically monitor per-process resource usage
Author: Kevin Zhu
Author-email: kzhu2099@gmail.com
Maintainer: Kevin Zhu
Maintainer-email: kzhu2099@gmail.com
License: MIT License
        
        Copyright (c) 2025 Kevin Zhu
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/kzhu2099/Resource-Monitor
Project-URL: Issues, https://github.com/kzhu2099/Resource-Monitor/issues
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: psutil
Requires-Dist: matplotlib

# resitor

- HomePage: https://github.com/kzhu2099/Resource-Monitor
- Issues: https://github.com/kzhu2099/Resource-Monitor/issues

[![PyPI Downloads](https://static.pepy.tech/badge/resitor)](https://pepy.tech/projects/resitor)

Author: Kevin Zhu

## Features

- graphical per-process monitoring of CPU and memory
- last-frame saving
- customization
- multiple PIDs
- CLI or Python

## Installation

To install resitor, use pip: ```pip install resitor```.

However, many prefer to use a virtual environment.

macOS / Linux:

```sh
# 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:

```sh
# 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.

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.

## License

The License is an MIT License found in the LICENSE file.
