CLI tool to manage SLURM jobs via sacct/squeue/sbatch/scancel
Project description
jobmanager
A command-line tool to manage SLURM jobs via sacct, squeue, sbatch, and scancel.
Requirements
- Python 3
- SLURM (
sacct,squeue,scontrol,scancel)
Installation
chmod +x jobmanager
# Optionally, add to PATH
cp jobmanager ~/.local/bin/
Intended workflow
Each job lives in its own directory containing a metadata.json file (generated via sacct -j <jobid> --json > metadata.json). The typical usage pattern is:
jobs/
├── run_001/
│ ├── metadata.json
│ └── slurm-12345.out
├── run_002/
│ ├── metadata.json
│ └── slurm-12346.out
Navigate to the job directory and run commands without extra flags — jobmanager picks up metadata.json automatically:
cd jobs/run_001
jobmanager status
jobmanager watch
Job identification
All job-specific commands resolve the target job in this order:
--jobid ID— fetch metadata from SLURM on the fly--metadata FILE— use an explicit metadata file- (default) — use
metadata.jsonin the current directory
Commands
list
List your active jobs (wraps squeue).
jobmanager list
jobmanager list --user alice
status
Print the current state of a job (RUNNING, PENDING, COMPLETED, …).
jobmanager status
summary
Print a full summary: partition, CPUs, memory, elapsed time, state, working directory, etc.
jobmanager summary
elapsed
Print the elapsed wall-clock time of a job.
jobmanager elapsed
watch
Stream the job's stdout in real time until it reaches a terminal state.
jobmanager watch
jobmanager watch --interval 10 # poll every 10 s (default: 5)
stop
Cancel a job (scancel). Prompts for confirmation unless --yes is passed.
jobmanager stop
jobmanager stop --yes
print-request
Print a SLURM batch script header reproducing the resource requests of the job. Redirect to a file to reuse it.
jobmanager print-request > job.sh
resubmit
Resubmit a job using the original submission command recovered from sacct.
jobmanager resubmit
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
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 slurm_jobmanager-0.1.0.tar.gz.
File metadata
- Download URL: slurm_jobmanager-0.1.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d922ab8c55fc23ce558ea78ce93845bc9fe84552842701e4c6f475d000d25ef2
|
|
| MD5 |
af098014739af56513fd23c628617117
|
|
| BLAKE2b-256 |
7b3464cd1647ed892a9aded87ab05746eb6bf0bc6cccd279d16c6556398f6033
|
File details
Details for the file slurm_jobmanager-0.1.0-py3-none-any.whl.
File metadata
- Download URL: slurm_jobmanager-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c260185abe596c73f765db3fe5e918bbfaaeae1f0abebcbab8f4fdf343de2a0f
|
|
| MD5 |
7ef8ad956c2a4a4974385334ac8981ca
|
|
| BLAKE2b-256 |
8674a28b66c6b64b18ea026e41058fd17c43bd237e2ce1a7b34f29a12fe13d6e
|