Skip to main content

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 → use pandas.read_csv / to_csv directly 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 → prefer scitex_sh if installed, fall back to plain subprocess.run (list-only).
  • scitex.session.start/close __main__ block → simplified to plain main().

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

scitex_resource-0.1.1.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_resource-0.1.1-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file scitex_resource-0.1.1.tar.gz.

File metadata

  • Download URL: scitex_resource-0.1.1.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

Hashes for scitex_resource-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c088e7197e79a623d6c799a3049b59d2f4db25bc42b331fb05d0291395b3bddf
MD5 0a638f128bad628386667ec75063b633
BLAKE2b-256 600784e001c3e9fb9f22dda0600d8b69de02956cdfe888e71dd173dc5fc7127f

See more details on using hashes here.

File details

Details for the file scitex_resource-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for scitex_resource-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec76d83add57cb094cfd4fd184aac1b59997a6b221fc5019d64e1f82d4c6db8
MD5 0130e3dc258a2f0484a4127c40d52b04
BLAKE2b-256 f552b26b4506b96fa83d1b7224c2be7a006b18579f58352697ba917ad0ed692d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page