Skip to main content

A Terminal User Interface for the Slurm workload manager

Project description

SlurmTerm

A keyboard-driven Terminal User Interface for the Slurm workload manager, built with Textual.

Monitor jobs, compose batch scripts or interactive sessions, explore cluster hardware, and inspect running jobs with real-time metrics, all without leaving your terminal.

Installation

pip install slurm-term

Requires Python 3.10+ and a working Slurm installation on the target machine.

Quick Start

slurm-term                     # on a Slurm login node
slurm-term --demo              # simulated cluster (no Slurm required)
slurm-term --since now-3days   # set initial history window

Launch slurm-term on any Slurm login or compute node. The interface opens with five tabs accessible via number keys 15.

Features

Monitor

Auto-refreshing job queue with color-coded states. Cancel, hold, and release jobs directly from the table. Supports multi-select (Space / Ctrl+A) for bulk actions, searchable filter bar (/), and quick-peek output (o). Press Enter on any job to open the Inspector.

Composer

Unified job submission form supporting both sbatch (batch) and srun (interactive) modes:

  • Live script preview that updates as you type
  • Core resource fields with inline partition summary: partition, time limit, nodes, tasks, CPUs, memory, GPUs
  • Searchable catalog of 30+ additional Slurm parameters with built-in documentation
  • Inline validation for time formats, memory specs, and GPU configurations
  • Save and load job templates for repeated workflows
  • Import existing .sbatch files (Ctrl+I) — parses directives, modules, env vars, and commands
  • Five built-in default templates seeded on first run
  • Auto-switch to Monitor tab after successful submission

Hardware

Cluster overview with two sub-tabs:

  • Partitions: availability, time limits, node counts, CPUs, memory, GRES
  • Nodes: per-node state, CPU count, memory, free memory, GRES, load

History

Completed job accounting from sacct with configurable time window (1–30 days). Displays elapsed time, CPU usage, peak memory, and exit codes. Press s to resubmit a completed job.

Inspector

Visual job inspector with three sub-tabs:

  • Overview: status badge, metadata grid (partition, user, submit time, working directory, nodes), resource summary, time remaining progress bar
  • Output & Error Logs: live stdout/stderr tailing with toggle (e), log file paths display
  • Live Metrics: real-time CPU, memory, and GPU utilization charts

Press s to resubmit the current job — parameters are extracted and loaded into the Composer.

Key Bindings

Key Action
q Quit
15 Switch tab
Ctrl+R Reload configuration
/ Search / filter jobs (Monitor)
Space Toggle select (Monitor)
Ctrl+A Select all (Monitor)
r Refresh current view
k Cancel selected job(s)
h / u Hold / release selected job(s)
o Peek output (Monitor)
i or Enter Inspect selected job
s Resubmit job (Inspector / History)
e Toggle stdout/stderr (Inspector)
Escape Back / clear selection
Ctrl+S Submit job or launch interactive session
Ctrl+T Save template
Ctrl+L Load template
Ctrl+I Import .sbatch file
Ctrl+Y Copy script preview

Safety

All Slurm commands use subprocess.run with list arguments — no shell interpolation. Job IDs, parameter keys, parameter values, and job names are validated before use. User-controlled strings are escaped before rendering. Template names are sanitized to prevent path traversal.

Requirements

  • Python >= 3.10
  • Textual >= 0.90.0
  • textual-plotext >= 1.0.0
  • A Slurm cluster (commands: squeue, scontrol, sbatch, srun, sacct, sinfo, sstat)

Links

License

MIT

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

slurm_term-0.1.2.tar.gz (66.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slurm_term-0.1.2-py3-none-any.whl (62.7 kB view details)

Uploaded Python 3

File details

Details for the file slurm_term-0.1.2.tar.gz.

File metadata

  • Download URL: slurm_term-0.1.2.tar.gz
  • Upload date:
  • Size: 66.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for slurm_term-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4eece85654ce25519e8ae283490ddbb22f5187b57b3ade87087b2c6d140b8518
MD5 91e908e44c4ba2f8518fc786287b158d
BLAKE2b-256 41ab6483ab4dd770388afed3ca9a7632cfd731bc951b2fc5bf04758a0e2d4a7e

See more details on using hashes here.

File details

Details for the file slurm_term-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: slurm_term-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 62.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for slurm_term-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d2aadd2292d0e92a640b716ac23a509ab7972344e5335c5788695bc3a47fbacb
MD5 c24fdafefcddd878fd7af96b455c7cf3
BLAKE2b-256 c7dc60d6af35151c87e041c3a1fc91f47730bad2c6ca55be5567b79095c96fec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page