System resource info, processor usage logging, RAM limit — standalone module from the SciTeX ecosystem
Project description
scitex-resource
System resource info, processor usage logging, and RAM limiting helpers, extracted from the SciTeX ecosystem as a standalone package.
Install
pip install scitex-resource
API
import scitex_resource as r
# Snapshot of CPU / RAM / disk / GPU / monitor info
specs = r.get_specs()
# CPU/RAM samples (one-shot)
usage = r.get_processor_usages()
# Continuous logging (CSV)
r.log_processor_usages("/tmp/usage.csv", limit_min=30, interval_s=1)
# Cap process RAM
r.limit_ram(0.5)
Status
Standalone fork of scitex.resource. Deps: pandas, psutil, PyYAML, matplotlib.
Decoupling notes:
scitex.str.readable_bytes/scitex.gen.fmt_size/scitex.str.printc→ vendored as 3 small helpers in_compat.py.scitex.io._load.load/scitex.io._save.save→ usepandas.read_csv/to_csvdirectly for the CSV log files; defer to scitex.io only if a non-CSV path is requested (raises ImportError without scitex installed).scitex.sh.sh→ preferscitex_shif installed, fall back to plainsubprocess.run(list-only).scitex.session.start/close__main__block → simplified to plainmain().
The umbrella package's scitex.resource import path is preserved via a
sys.modules-alias bridge. 65/65 tests pass.
License
AGPL-3.0-only (see LICENSE).
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scitex_resource-0.1.0.tar.gz.
File metadata
- Download URL: scitex_resource-0.1.0.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0012c475ba992fc6be43a056471a34cb3aa032ef806c10376fb717688f904506
|
|
| MD5 |
c0b6b510b0d0e6e60473676b0db2fa94
|
|
| BLAKE2b-256 |
757731a049f143c1764c679adaf107694475af00f797c1359cd665fb75160796
|
File details
Details for the file scitex_resource-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scitex_resource-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da1f9644262b6e09012b01306164905dfbce9a342ec4254e7ed0a6c2a2aa1bd
|
|
| MD5 |
58a1c06bc6058e402bfb28b83d702613
|
|
| BLAKE2b-256 |
c5d0671e2416868830a8111cc5e9d260cd2c15837cb19ec87a5ba65473448e12
|