plot_and_log_memory_usage
Scripts for logging CPU and GPU memory usage and subsequently plotting for analysis and debugging
Installing
Install:
pip install plot_and_log_memory_usage
Usage
Log Memory Usage
Logs memory usage to a file at a given frequency and filepath
log_memory_usage --help
usage: log_memory_usage [-h] [--log-period-sec FLOAT] [--log-folderpath PATH] [--print-updates | --no-print-updates]
╭─ arguments ───────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
│ --log-period-sec FLOAT (default: 5.0) │
│ --log-folderpath PATH (default: /home/tylerlum/logged_memory_usage) │
│ --print-updates, --no-print-updates │
│ (default: True) │
╰───────────────────────────────────────────────────────────────────────╯
Example:
log_memory_usage
Logging to /home/tylerlum/logged_memory_usage/2024-01-13_02-24-22-299722.csv
2024-01-13_02-24-22-324923,7241.94140625,31747.50390625,784.0,4096.0
2024-01-13_02-24-27-381178,7046.80078125,31747.50390625,765.0,4096.0
2024-01-13_02-24-32-504417,7045.4765625,31747.50390625,765.0,4096.0
...
Plot Logged Memory Usage
Creates a plot of the memory usage from the log file for a given timerange
plot_logged_memory_usage --help
usage: plot_logged_memory_usage [-h] [OPTIONS]
╭─ options ─────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
│ --end-datetime-str STR (default: 2024-01-13_02-49-51-581943) │
│ --start-datetime-str {None}|STR │
│ (default: None) │
│ --lookback-seconds {None}|FLOAT │
│ (default: None) │
│ --log-folderpath PATH (default: /home/tylerlum/logged_memory_usage) │
│ --save-filepath {None}|PATH │
│ (default: None) │
╰───────────────────────────────────────────────────────────────────────╯
You must specify either a start datetime (in the above format) OR lookback seconds (seconds before end datetime)
Example:
plot_logged_memory_usage --lookback-seconds 60
plot_logged_memory_usage --start-datetime-str "2024-01-13_02-21-50-512677" --save-filepath "output.png"
Saving plot to output.png
Metadata
Release files for plot-and-log-memory-usage 0.0.1
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 | |
|---|---|---|---|---|
| plot_and_log_memory_usage-0.0.1.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plot_and_log_memory_usage-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / plot_and_log_memory_usage-0.0.1.tar.gz
| Download URL | plot_and_log_memory_usage-0.0.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a44d9254eff26a20ebd395c36779f26512fc047daf4b5655d6e99a34ce2f7bec
|
|
BLAKE2b-256 checksum How to use checksums |
16329827c3ef585a830e2dca29b069d0181cf63c85f27d21d9532ab23ce9252e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.12
|
Release files / plot_and_log_memory_usage-0.0.1-py3-none-any.whl
| Download URL | plot_and_log_memory_usage-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2a3e69e0111e2392853539648582ed0755b3acebd0220ddf2b57273d54b95fc
|
|
BLAKE2b-256 checksum How to use checksums |
fcdd9fc8ff6cae39aa793f3f50fca0a8b953619b4e3d39b27957d849718bbbf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.12
|
Security for plot-and-log-memory-usage 0.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.