Skip to main content

Textual TUI dashboard for monitoring PBS Pro schedulers

Project description

PBS Pro Textual TUI

A terminal user interface built with Textual for monitoring PBS Pro schedulers at the Argonne Leadership Computing Facility.

The dashboard surfaces job, queue, and node activity in a single view and refreshes itself automatically so operators can track workload health in real time.

Cluster Grid Jobs Table
Cluster grid (dark) Jobs table (dark)
Cluster grid (light) Jobs table (light)
More themes
Catppuccin One Dark
Cluster grid (catppuccin) Cluster grid (onedark)
  • Try it out!

    # if you still haven't installed uv:
    # curl -LsSf https://astral.sh/uv/install.sh | sh
    uvx pbs-tui
    

Features

  • Cluster grid – visual map of cluster node utilization with proportional legend bar. Click a job block to see its details. Colors adapt to the active theme.
  • Live PBS data – prefers the JSON (-F json) output of qstat/pbsnodes and falls back to XML or text parsing so schedulers without newer flags continue to work.
  • Automatic refresh – updates every 30 seconds by default with a manual refresh binding (r).
  • Rich tables – sortable (via cursor) tables for jobs, nodes, and queues with detail views for the selected record.
  • Themes – ships with pbs-dark, pbs-light, ansi-dark, and ansi-light themes. The ansi-* variants use muted 256-color palette tones that blend with your terminal colorscheme. Switch via the command palette (Ctrl+P).
  • Fallback sample data – bundled realistic mock cluster (~560 nodes, ~40 jobs) for demoing without a production scheduler (PBS_TUI_SAMPLE_DATA=1).
  • Inline snapshot – render the current queue as a Rich table with pbs-tui --inline and optionally write a Markdown summary alongside it.

Installation

uv pip install pbs-tui

Usage

Launch the dashboard once the PBS CLI utilities (qstat, pbsnodes) are on the PATH:

pbs-tui

The same entry point is available via python -m pbs_tui. The interface displays a summary panel, tables for jobs/nodes/queues, and a detail pane for the selected row. Refreshing happens automatically; press r to force an immediate update.

Adjust the refresh cadence with pbs-tui --refresh-interval 60 (seconds) if you prefer a slower or faster polling loop.

Key bindings

Key Action
q Quit the application
r Refresh immediately
g Focus the cluster grid
j Focus the jobs table
n Focus the nodes table
u Focus the queues table
d Toggle detail panel

Use tab and the arrow keys/PageUp/PageDown to move through rows once a table has focus.

Sample mode

If you want to explore the UI without a live PBS cluster, export PBS_TUI_SAMPLE_DATA=1 (or pass force_sample=True to PBSDataFetcher). The application will display bundled example jobs, nodes, and queues along with a warning banner indicating that the data is synthetic.

Headless / automated runs

For automated testing or CI environments without an interactive terminal you can run the TUI in headless mode by exporting PBS_TUI_HEADLESS=1. Pairing this with PBS_TUI_AUTOPILOT=quit presses the q binding automatically after startup so pbs-tui exits cleanly once the interface has rendered its first update.

Inline snapshot mode

When running non-interactively you can emit a Rich-rendered table summarising the active PBS jobs instead of starting the Textual interface:

PBS_TUI_SAMPLE_DATA=1 pbs-tui --inline

The command prints a table that can be pasted into terminals that support Unicode box drawing. Pass --file snapshot.md alongside --inline to also write an aligned Markdown table to snapshot.md for sharing in chat or documentation systems. Any warnings raised while collecting data are written to standard error so they remain visible in logs.

Architecture

  • pbs_tui.fetcher.PBSDataFetcher orchestrates qstat/pbsnodes calls, preferring JSON output and falling back to XML/text before converting everything into structured dataclasses (Job, Node, Queue).
  • pbs_tui.app.PBSTUI is the Textual application that renders the dashboard, periodically asks the fetcher for new data, and updates the widgets.
  • pbs_tui.samples.sample_snapshot provides the demonstration snapshot used when PBS commands cannot be executed.

The UI styles are defined in pbs_tui/app.tcss. Adjust the CSS to change layout or theme attributes.

Development notes

  • The application refresh interval defaults to 30 seconds. Pass a different value to PBSTUI(refresh_interval=...) if desired.
  • Errors encountered while running PBS commands are surfaced in the status bar so operators can quickly see when data is stale.
  • When both PBS utilities are unavailable and the fallback is disabled, the UI will show an empty dashboard with an error message in the status bar.

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

pbs_tui-0.5.1.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

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

pbs_tui-0.5.1-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file pbs_tui-0.5.1.tar.gz.

File metadata

  • Download URL: pbs_tui-0.5.1.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pbs_tui-0.5.1.tar.gz
Algorithm Hash digest
SHA256 fa0df8f689ecf7300addaca0d233026b040756f9237884b8b395cd412e79df76
MD5 ce644f6550b07a328b1fd8c2bc77a9c4
BLAKE2b-256 31c7d8a6cf14b5755314f086f43c76f0a9357f879ec09eb1fdbcd7b691fdaab4

See more details on using hashes here.

File details

Details for the file pbs_tui-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: pbs_tui-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 36.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pbs_tui-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bea141b1bb614c4582ec63232ab4a019d3aa1f458c849a40da3f25d1e46a4810
MD5 dc0855a4d42ea9948c81c93fece16002
BLAKE2b-256 94d75554a74ab839bfaa62e84bce0dcdb47e5297496ae73818b05ec736de0011

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