Metadata-Version: 2.5
Name: rampgate-psutil
Version: 0.1.0
Summary: Host RAM/CPU probe for rampgate (psutil).
Project-URL: Homepage, https://github.com/KebanFiru/rampgate
Project-URL: Documentation, https://kebanfiru.github.io/rampgate/
Project-URL: Source, https://github.com/KebanFiru/rampgate
Project-URL: Changelog, https://github.com/KebanFiru/rampgate/blob/main/packages/rampgate-psutil/CHANGELOG.md
Project-URL: Issues, https://github.com/KebanFiru/rampgate/issues
Author: Hakan Bağıç
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: psutil,rampgate,scheduler
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Distributed Computing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: psutil>=5.9
Requires-Dist: rampgate<0.2,>=0.1
Description-Content-Type: text/markdown

# rampgate-psutil

Host RAM/CPU probe for rampgate (psutil).

Part of the [rampgate](https://github.com/KebanFiru/rampgate) monorepo.

```python
from rampgate_psutil import HostProbe

probe = HostProbe("cpu", {"ram": "GiB", "cpu": "cores"})
engine.add_device(probe.device())           # capacity: total RAM, logical cores
engine.observe(probe.sample(t))             # DeviceObserved: total - available RAM, busy cores
usage = probe.process_tree_usage(pid)       # RSS sum and cores of pid and its descendants
```

CPU usage is measured between two calls, so the first sample of the host or of a process reports 0 cores.
