A command line tool for Slurm in CMA-HPC2023 by CEMC/CMA.
- Query active jobs
- Show partition information
- Interactive TUI for browsing jobs
- (experiment) Filter long time jobs for operation users
Download the latest release from the Releases page.
Clone the repository and build using Go:
go build -o bin/slclient main.goOr use the Makefile:
# Local build (current platform)
make build
# Cross-compile for a specific platform
make linux/amd64
make linux/arm64
make windows/amd64
make windows/arm64
# Build all platforms
make build-allThe compiled binary will be placed in the bin/ directory.
Query Slurm jobs:
slclient queryAll jobs in queue will be shown (columns are colored and right-aligned except the last):
JOB ID State PARTITION NODEs User Submit Time Time Command
1234567 RUNNING normal 24 user1 2026-01-01 01:10:01 1-23:45:00 /some/path/to/user1/job
7654321 RUNNING serial 1 user2 2026-01-01 01:20:10 01:23:34 /some/path/to/user2/job
Use slclient --help to see more sub-commands.
Query active jobs in the Slurm queue.
slclient query
slclient query -u user1 -u user2
slclient query -p normal -s state:submit_time
slclient query -c "user1.csh"Flags:
-u, --user— Filter by user (can be specified multiple times).-p, --partition— Filter by partition (can be specified multiple times).-s, --sort-keys— Sort keys separated by:, default isstate:submit_time.-c, --command-pattern— Filter by command pattern.
Show partition information.
slclient info
slclient info -s partitionFlags:
-s, --sort-keys— Sort keys separated by:, default ispartition.
Query jobs with detailed output (includes the full command line for each job).
slclient detail
slclient detail -u user1 -p normalFlags:
-u, --user— Filter by user (can be specified multiple times).-p, --partition— Filter by partition (can be specified multiple times).-s, --sort-keys— Sort keys separated by:, default isstate:submit_time.-c, --command-pattern— Filter by command pattern.
Watch jobs until they finish. Checks every minute and prints a summary of job states.
slclient watch
slclient watch -j 1234567 -j 7654321
slclient watch -u user1 -p normalFlags:
-u, --user— Filter by user (can be specified multiple times).-p, --partition— Filter by partition (can be specified multiple times).-j, --job— Filter by job ID (can be specified multiple times).
Launch an interactive terminal UI to browse jobs with real-time updates.
slclient tuiUse arrow keys to navigate, q or ctrl+c to quit.
Filter long-running jobs for operation users.
slclient filterShow category list defined by command patterns.
slclient category
slclient category -dFlags:
-d, --detail— Show detailed information for each category.
Print version and build information.
slclient versionExample output:
Version: v1.0.0
Git Hash: a1b2c3d
Build Date: 2026-04-23T12:00:00Z
Go Version: go1.26.2
OS/Arch: linux/amd64
Copyright © 2019-2026, developers at cemc-oper.
slurm-client-go is licensed under MIT License.