Anonymous Ubuntu host-level CPU/GPU resource and power monitor.
Project description
Anonymous System Resource Monitor
This is a host-level Ubuntu monitor for group servers. It samples aggregate CPU, memory, load, GPU power/utilization/memory/temperature, and best-effort CPU package power. It does not record PID, username, command line, Docker container, image, or compose service information.
Install from PyPI
Recommended with pipx:
sudo apt update
sudo apt install -y pipx
pipx ensurepath
pipx install system-resource-monitor
sudo "$(command -v system-resource-monitor)" install-systemd
Upgrade an existing install:
pipx upgrade system-resource-monitor
Then check the timer:
systemctl list-timers system-resource-monitor.timer
sudo "$(command -v system-resource-monitor)" status
Safety Contract
The collect, watch, and report commands are read-only with respect to
running workloads:
-
They do not call
docker,kill,pkill,os.kill, signal APIs,terminate(), orkill(). -
They do not enumerate
/proc/<pid>and do not inspect per-process metadata. -
The only external command used by
collectandwatchis:nvidia-smi --query-gpu=index,uuid,name,power.draw,utilization.gpu,utilization.memory,memory.used,memory.total,temperature.gpu --format=csv,noheader,nounits
-
The
install-systemd,uninstall-systemd, andstatuscommands may callsystemctl, but only to managesystem-resource-monitor.serviceandsystem-resource-monitor.timer. -
The systemd unit also drops
CAP_KILLand denies common signal-sending syscalls, so even accidental future signal-sending code should fail under the timer service.
Install from Source
cd system-resource-monitor
sudo mkdir -p /opt/system-resource-monitor /var/lib/system-resource-monitor
sudo install -m 0755 system_resource_monitor.py /opt/system-resource-monitor/system_resource_monitor.py
sudo install -m 0644 README.md /opt/system-resource-monitor/README.md
sudo install -m 0644 system-resource-monitor.service /etc/systemd/system/system-resource-monitor.service
sudo install -m 0644 system-resource-monitor.timer /etc/systemd/system/system-resource-monitor.timer
sudo chmod 0750 /var/lib/system-resource-monitor
sudo systemctl daemon-reload
sudo systemctl enable --now system-resource-monitor.timer
If installed as a Python package, prefer:
sudo "$(command -v system-resource-monitor)" install-systemd
Check Status
systemctl list-timers system-resource-monitor.timer
sudo systemctl status system-resource-monitor.service
journalctl -u system-resource-monitor.service -n 50
Collect Once
sudo "$(command -v system-resource-monitor)" collect
Watch Live Metrics
Refresh the terminal every 5 seconds and automatically save samples from this
watch session to /tmp/system_resource_watch_<timestamp>.csv:
sudo "$(command -v system-resource-monitor)" watch
Use a custom interval and CSV path:
sudo "$(command -v system-resource-monitor)" watch \
--interval-sec 2 \
--csv /tmp/locus_gpu_watch.csv
Stop with Ctrl-C. The CSV contains one host row per sample and one gpu
row per GPU per sample. It does not contain PID, username, command line, Docker
container, image, or compose service information.
Export Reports
Recent 24 hours:
sudo "$(command -v system-resource-monitor)" report \
--since-hours 24 \
--out /tmp/system_resource_report_24h.csv
Recent 7 days:
sudo "$(command -v system-resource-monitor)" report \
--since-hours 168 \
--out /tmp/system_resource_report_7d.csv
Notes
- GPU metrics use
nvidia-smi --query-gpu, so NVIDIA drivers must be installed for GPU rows to appear. - CPU package power is read from
/sys/class/powercap/intel-rapl:*when the kernel exposes it. If unavailable, it is stored as empty/NULL. - Energy estimates use
power_w * interval_sec; first samples and samples after long gaps are not counted toward kWh estimates. - Data older than 90 days is deleted during each collection.
Project details
Release history Release notifications | RSS feed
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 system_resource_monitor-0.2.0.tar.gz.
File metadata
- Download URL: system_resource_monitor-0.2.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da17ec3b2f6d99611812e04088ee502d245eddc80b01484b7aab71cb838ba8ff
|
|
| MD5 |
2d69324472204e6e12f5ef6a48a44fd3
|
|
| BLAKE2b-256 |
ff84291e217f54268e9e553c8fe65c543690910031cdc96d52c549ec54f9c8a8
|
File details
Details for the file system_resource_monitor-0.2.0-py3-none-any.whl.
File metadata
- Download URL: system_resource_monitor-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43119d9998e07f28806bfbf48c199aefa25f9920388c3d826fbc4695e43419f5
|
|
| MD5 |
6f6550fb9a6ce1e1e2563a2ba245b495
|
|
| BLAKE2b-256 |
a34a264f12cb6f63bea00b127788e9675675ac293f056d2265b0b768969987bf
|