slurmfrag 🧩
┌─────────────────────────────────────────────────────────────────────────┐
│ GPU: 25/32 used (78.1%) │
├─────────────────────────────────────────────────────────────────────────┤
│ NODE USED TOTAL USE% FRAGMENTATION │
│ gpunode01 7 8 87.5% [██████████████████░░] │
│ gpunode02 8 8 100.0% [████████████████████] │
│ gpunode03 4 8 50.0% [██████████░░░░░░░░░░] │
├─────────────────────────────────────────────────────────────────────────┤
│ CPU: 374/1536 used (24.3%) │
├─────────────────────────────────────────────────────────────────────────┤
│ gpunode01 124 384 32.3% [██████░░░░░░░░░░░░░░] │
│ gpunode02 98 384 25.5% [█████░░░░░░░░░░░░░░░] │
│ gpunode03 108 384 28.1% [██████░░░░░░░░░░░░░░] │
├─────────────────────────────────────────────────────────────────────────┤
│ Memory: 4.3/6.0 TB used (71.5%) │
├─────────────────────────────────────────────────────────────────────────┤
│ gpunode01 1091 1500 72.7% [███████████████░░░░░] │
│ gpunode02 1070 1500 71.3% [██████████████░░░░░░] │
│ gpunode03 1074 1500 71.6% [██████████████░░░░░░] │
└─────────────────────────────────────────────────────────────────────────┘
Visualize SLURM cluster fragmentation — GPU, CPU, and memory usage per node, plus queue depth and pending requests. Created with the help of Claude Code (Opus 4.5).
Features
- All-in-one — GPU, CPU, memory fragmentation per node in a single view
- Queue status — see pending jobs and total resource requests waiting
- JSON export — for automation and historical analysis
- Logging daemon — run
slurmfrag --logto periodically capture JSON snapshots for trend analysis - Configurable — YAML config for cluster-specific GRES patterns
Quick start
From PyPI:
pip install slurmfrag
slurmfrag
From source:
git clone https://github.com/ferreirafabio/slurmfrag
cd slurmfrag
python -m slurmfrag
Usage
slurmfrag # interactive partition picker
slurmfrag -p gpu-partition # direct analysis
slurmfrag -p gpu-partition --json
slurmfrag --log # logging daemon mode
Config
Optional ~/.config/slurmfrag/config.yaml:
gres_patterns:
gpu:
pattern: "gpu[^:]*:(\\d+)" # adjust for your cluster
logging:
output_dir: "./slurmfrag_logs"
interval_minutes: 5
Requirements
- Python 3.8+
- SLURM (
sinfo,squeuecommands) - PyYAML
License
Apache-2.0
Metadata
Release files for slurmfrag 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| slurmfrag-0.1.1.tar.gz | 18.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slurmfrag-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.0 kB
Release files / slurmfrag-0.1.1.tar.gz
| Download URL | slurmfrag-0.1.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57efbdbd1bd42f0c75ad1a5ce27b4a86065de5b68247475215f4e4dba85bfb49
|
|
BLAKE2b-256 checksum How to use checksums |
9a12b3e8db84c1b29ae9b231cef17bd62787ef7da63e639280c8061613dfb5a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / slurmfrag-0.1.1-py3-none-any.whl
| Download URL | slurmfrag-0.1.1-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b473fb0c33be0c09898b982617890a719524c80cdf4c3f3cbe7dc8f12e447f8
|
|
BLAKE2b-256 checksum How to use checksums |
7f8d70184f8b380878a2e2f69acfc29e8886b5325ea14c17b0fcf578e3566aa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for slurmfrag 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.