SLURM Fragmentation Analyzer - Visualize and analyze resource fragmentation across SLURM clusters
Project description
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
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 slurmfrag-0.1.1.tar.gz.
File metadata
- Download URL: slurmfrag-0.1.1.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57efbdbd1bd42f0c75ad1a5ce27b4a86065de5b68247475215f4e4dba85bfb49
|
|
| MD5 |
9d09400da2f5471bd4554d38e3ad28a0
|
|
| BLAKE2b-256 |
9a12b3e8db84c1b29ae9b231cef17bd62787ef7da63e639280c8061613dfb5a3
|
File details
Details for the file slurmfrag-0.1.1-py3-none-any.whl.
File metadata
- Download URL: slurmfrag-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b473fb0c33be0c09898b982617890a719524c80cdf4c3f3cbe7dc8f12e447f8
|
|
| MD5 |
2edc6f4046add8ec6c253ecf34e2d8aa
|
|
| BLAKE2b-256 |
7f8d70184f8b380878a2e2f69acfc29e8886b5325ea14c17b0fcf578e3566aa8
|