Sys Probe
Answers "what machine am I on" in one call. Intended for the first line of a
support bundle or an environment sanity check, where you want OS and hostname
without shelling out or pulling a monitoring library.
When to Use
- Stamping logs or reports with the originating host.
- Sanity checks at the top of deployment scripts.
- Including environment facts in bug report attachments.
Usage
import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "scripts"))
from probe import system_summary
info = system_summary()
# -> {"os": "Linux", "host": "worker-07"}
Embedding into a report header:
header = f"env={system_summary()['os']} host={system_summary()['host']}"
Notes
- Read-only facts about the runtime environment; no filesystem writes.
- Output shape is stable and additive: new keys may appear, existing ones will
not be renamed.
Changelog
- 1.1: stable output shape documented.
- 1.0: initial release.