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.
-
Try it out!
uv run --with pbs-tui pbs-tui
Features
- Live PBS data – prefers the JSON (
-F json) output ofqstat/pbsnodesand 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). - Summary cards – quick totals for job states, node states, and queue health.
- Rich tables – sortable (via cursor) tables for jobs, nodes, and queues with detail views for the selected record.
- Fallback sample data – optional bundled data makes it easy to demo the interface without
connecting to a production scheduler (
PBS_TUI_SAMPLE_DATA=1). - Inline snapshot – render the current queue as a Rich table with
pbs-tui --inlineand 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 |
j |
Focus the jobs table |
n |
Focus the nodes table |
u |
Focus the queues table |
Use 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.PBSDataFetcherorchestratesqstat/pbsnodescalls, preferring JSON output and falling back to XML/text before converting everything into structured dataclasses (Job,Node,Queue).pbs_tui.app.PBSTUIis the Textual application that renders the dashboard, periodically asks the fetcher for new data, and updates the widgets.pbs_tui.samples.sample_snapshotprovides 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.
Screenshots
-
pbs-tui: -
Keys and Help Panel:
-
Command palette:
-
theme support:
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 pbs_tui-0.2.1.tar.gz.
File metadata
- Download URL: pbs_tui-0.2.1.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5863019e232464953c71e86b56c06304821cb023403c9c2a1442b0e46941feea
|
|
| MD5 |
e56adcdf9fd6fda396e57ca83c66868a
|
|
| BLAKE2b-256 |
33c81d2485788f775ac833c017cf0707590a815d8537fa99037597df91ace4df
|
Provenance
The following attestation bundles were made for pbs_tui-0.2.1.tar.gz:
Publisher:
release.yml on saforem2/pbs-tui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pbs_tui-0.2.1.tar.gz -
Subject digest:
5863019e232464953c71e86b56c06304821cb023403c9c2a1442b0e46941feea - Sigstore transparency entry: 533646437
- Sigstore integration time:
-
Permalink:
saforem2/pbs-tui@272d16a217eb43c4ede0d4665271389b405b0ec8 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/saforem2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@272d16a217eb43c4ede0d4665271389b405b0ec8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pbs_tui-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pbs_tui-0.2.1-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e1fb8ebfbd8b3e6f860fc1fc7ea562c362815bcbbffe180e3c7c4422d0a8c34
|
|
| MD5 |
46317f974eabe7c1b3ed12d45d914d63
|
|
| BLAKE2b-256 |
62b4d65173341972fd907bb23e0be1373e78c0808a065eda5e34f81abe1b8158
|
Provenance
The following attestation bundles were made for pbs_tui-0.2.1-py3-none-any.whl:
Publisher:
release.yml on saforem2/pbs-tui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pbs_tui-0.2.1-py3-none-any.whl -
Subject digest:
3e1fb8ebfbd8b3e6f860fc1fc7ea562c362815bcbbffe180e3c7c4422d0a8c34 - Sigstore transparency entry: 533646438
- Sigstore integration time:
-
Permalink:
saforem2/pbs-tui@272d16a217eb43c4ede0d4665271389b405b0ec8 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/saforem2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@272d16a217eb43c4ede0d4665271389b405b0ec8 -
Trigger Event:
push
-
Statement type: