Skip to main content

Clear Slurm resource views for nodes, GPUs, memory, CPUs, and queued jobs.

Project description

slmtop

slmtop is a small Python CLI for day-to-day Slurm resource inspection. It focuses on the views people usually need before submitting or debugging jobs:

  • nvitop-like top view: node resources above current job requests
  • free GPU model/count per node
  • current queue resource requests, including GPU, CPU, memory, nodes, and time limit
  • node GPU and CPU allocation/free capacity

It uses Slurm's own commands (scontrol, squeue, sinfo) and has no runtime Python dependencies.

Install

From PyPI:

python3 -m pip install slmtop

From this directory:

python3 -m pip install .

For editable development:

python3 -m pip install -e .

Usage

Show node resources above current job requests:

slmtop

The output is split into a compact resource dashboard and a job table:

slmtop  nodes 2  |  gpu free 9/16  |  cpu free 144/256

NODE    PARTITION  GPU_USE               CPU_FREE  CPU_USE           STATE
------  ---------  --------------------  --------  ----------------  -----
gpu001  gpu        [########..] 6/8 75%  32/128    [########..] 75%  MIXED
gpu002  gpu        [#.........] 1/8 12%  112/128   [#.........] 12%  IDLE

------------------------------------------------------------------------

JOBID  USER   STATE    GPU  MEM   CPU  NODE    PARTITION  TIME  NAME
-----  -----  -------  ---  ----  ---  ------  ---------  ----  -----
123    alice  RUNNING  4    128G  32   gpu001  gpu        2:31  train

Only show nodes with at least one free GPU in the top section:

slmtop --free

Notes

Slurm clusters differ in how precisely they report allocated GPU types. If a node has multiple GPU models but AllocTRES only says gres/gpu=2, Slurm does not expose which model is allocated in that field. In that case slmtop prints ? for typed free GPU counts and adds a note.

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

slmtop-0.1.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

slmtop-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file slmtop-0.1.0.tar.gz.

File metadata

  • Download URL: slmtop-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for slmtop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef87615de194bbaeedc91d000e91b1a937900902efe5a9fa843cd78e57d132ea
MD5 3c47b5d57af873f6b10be93a4b016e88
BLAKE2b-256 1b979ba7609cecc9b9cbaa65bf2dd0d768e4561ae60b47f75f3c4d49ea9e20ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for slmtop-0.1.0.tar.gz:

Publisher: release.yml on ml-stat-Sustech/slmtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file slmtop-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: slmtop-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for slmtop-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88dd8a42257283376b226073354490f3c3bbf3cf2e5154d40786021227bd3c68
MD5 6385fe9ce308237bafebac98f5d61fa0
BLAKE2b-256 9331f489199fef4551c51e1dc824f1cdb3749404b863f805f33fc03a00e6151f

See more details on using hashes here.

Provenance

The following attestation bundles were made for slmtop-0.1.0-py3-none-any.whl:

Publisher: release.yml on ml-stat-Sustech/slmtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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