Resource Monitor
This package contains utilities to monitor system resource utilization (CPU, memory, disk, network).
Here are the ways you can use it:
- Monitor resource utilization for a compute node for a given set of resource types and process IDs.
- Start a process and monitor its resource utilization.
- Monitor resource utilization for a compute node asynchronously with the ability to dynamically change the resource types and process IDs being monitored.
- Produce JSON reports of aggregated metrics.
- Produce interactive HTML plots of the statistics.
Installation
- Create a Python virtual environment and activate it. Adjust as necessary if using Windows.
$ python -m venv ~/python-envs/rmon
$ source ~/python-envs/rmon/bin/activate
- Install the package.
$ pip install rmon
- Optionally, install
jqby following instructions at https://jqlang.github.io/jq/download/.
Usage
CLI tool to monitor resource utilization
This command will monitor CPU, memory, and disk utilization every second and then plot the results whenever the user terminates the application.
$ rmon collect --cpu --memory --disk -i1 --plots -n run1
View the results in a table:
$ sqlite3 -table stats-output/run1.sqlite "select * from cpu"
$ sqlite3 -table stats-output/run1.sqlite "select * from memory"
$ sqlite3 -table stats-output/run1.sqlite "select * from disk"
This command will monitor CPU and memory utilization for specific process IDs and then plot the results whenever the user terminates the application.
rmon collect -i1 --plots -n run1 PID1 PID2 ...
View the results in a table:
$ sqlite3 -table stats-output/run1.sqlite "select * from process"
View min/max/avg metrics:
$ jq -s . stats-output/run1_results.json
Refer to rmon collect --help to see all options.
CLI tool to start a process and monitor its resource utilization
$ rmon monitor-process -i1 --plots -- python my_script.py ARGS [OPTIONS]
Use the same steps above to view results.
CLI tool to monitor resource utilization with dynamic changes
This command will monitor CPU, memory, and disk utilization every second. It will present user prompts that allow you to change what is being monitored. It will plot the results when you select the exit command.
rmon collect -i1 --plots -n run1 --interactive PID1 PID2 ...
You can use this asynchronous functionality in your own application if you are controlling the
processes being monitored. Refer to resource_monitor/cli/collect.py for example code. Search for
run_monitor_async.
Collect stats for all compute nodes in an HPC job
The directory contains some example scripts that can be deployed in a Slurm job to collect stats for your compute nodes.
-
Copy collect_stats.sh and wait_for_stats.sh to your HPC runtime directory.
-
Modify
collect_stats.shsuch that it loads the environment containingrmon. -
Modify
collect_stats.shwith your desired options forrmon collect. -
Modify your
sbatchscript with relevant lines from batch_job.sh.
The following will occur when Slurm runs your job:
- Ensure that the file
shutdowndoes not exist. - Start
rmon collectas a background operation. - Run your job.
- Create the file
shutdown. That will triggercollect_stats.shto stop. - Gracefully shut down
rmonand generate plots.
Code timings
Refer to this page for instructions on how to collect timing statistics of targeted functions.
License
rmon is released under a BSD 3-Clause license.
Software Record
This package is developed under NREL Software Record SWR-24-128.
Metadata
Release files for rmon 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rmon-0.6.0.tar.gz | 39.6 kB | With provenance | Details for rmon-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rmon-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for rmon-0.6.0-py3-none-any.whl |
Total release size: 66.6 kB
Release files / rmon-0.6.0.tar.gz
| Download URL | rmon-0.6.0.tar.gz |
|---|---|
| Size | 39.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2e83df8b31ec2339f51f2d97d76321ccfe055210e2a84e32784577190c60b1f
|
|
BLAKE2b-256 checksum How to use checksums |
276b4dbeea91c9b3711e474fc3380f89fbd049405854819b48929d8f603271df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.
Transparency logRelease files / rmon-0.6.0-py3-none-any.whl
| Download URL | rmon-0.6.0-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2de7104e513069c684884bfe226be56e6c2781782c7a903ed3c49e1cdc52f68d
|
|
BLAKE2b-256 checksum How to use checksums |
db8e53a93dad01cab4a4ce75dd2e6616e497f6db567058dbd42f0cbd292a56a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.
Transparency logSecurity for rmon 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for rmon-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.