s9s

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2026 License: MIT

README ยถ

s9s - Terminal UI for SLURM

s9s logo

Latest Release License Go Report Card Documentation

s9s provides a terminal interface for managing SLURM clusters, inspired by the popular k9s Kubernetes CLI. It allows HPC administrators and users to monitor and manage jobs, nodes, and cluster resources efficiently from the terminal.

๐Ÿ“š Documentation

โœจ Features

  • Real-time Monitoring: Live updates of jobs, nodes, and cluster status
  • Multi-View Interface: Dedicated views for jobs, nodes, partitions, users, QoS, and more
  • Job Management: Submit, cancel, hold, release, and monitor jobs
  • Batch Operations: Perform actions on multiple jobs simultaneously
  • Advanced Filtering: Powerful search and filter capabilities
  • SSH Integration: Connect directly to compute nodes
  • Export Capabilities: Export data in CSV, JSON, Markdown, HTML formats
  • Real-time Job Log Streaming: Live job output monitoring with filtering
  • Plugin System: Extensible architecture for custom functionality
  • Performance Analysis: Built-in profiling and optimization tools
  • Vim-like Navigation: Familiar keyboard shortcuts for power users
  • Mock Mode: Built-in SLURM simulator for development and testing

๐Ÿš€ Quick Start

Prerequisites
  • Go 1.19 or higher
  • Access to a SLURM cluster (or use mock mode)
  • Terminal with 256 color support
Installation
curl -sSL https://get.s9s.dev | bash
Using Go Install
go install github.com/jontk/s9s/cmd/s9s@latest
From Source
git clone https://github.com/jontk/s9s.git
cd s9s
go build -o s9s cmd/s9s/main.go
sudo mv s9s /usr/local/bin/
Basic Usage
# Connect to your SLURM cluster
s9s

# Use mock mode for testing (no SLURM required)
s9s --mock

# Connect to a specific cluster
s9s --cluster production

# Enable debug logging
s9s --debug
Configuration

Run the interactive setup wizard for first-time configuration:

s9s setup

The wizard will guide you through:

  • ๐Ÿข Cluster connection settings
  • ๐Ÿ” Authentication configuration
  • ๐Ÿ”’ Secure credential storage
  • โšก Performance optimization
Manual Configuration

s9s looks for configuration in the following order:

  1. ~/.s9s/config.yaml
  2. ~/.config/s9s/config.yaml
  3. Environment variables
  4. Command-line flags

Example configuration:

# ~/.s9s/config.yaml
clusters:
  production:
    url: https://slurm-api.example.com
    token: ${SLURM_TOKEN}
    default: true
  
  development:
    url: https://slurm-dev.example.com
    auth:
      username: ${SLURM_USER}
      password: ${SLURM_PASS}

preferences:
  theme: dark
  refreshInterval: 5s
  defaultView: jobs

๐ŸŽฎ Key Bindings

Global
Key Action
? Show help
q Quit
: Command mode
/ Search
Tab Switch view
Ctrl+r Force refresh
Jobs View
Key Action
c Cancel job
h Hold job
r Release job
d Show job details
o View job output
s Submit new job
b Batch operations
m Toggle auto-refresh
Nodes View
Key Action
d Drain node
r Resume node
s SSH to node
i Node info

๐Ÿ—๏ธ Architecture

s9s follows a modular architecture with clear separation of concerns:

cmd/s9s/          # Main application entry point
internal/
  โ”œโ”€โ”€ app/        # Application lifecycle management
  โ”œโ”€โ”€ dao/        # Data Access Objects (SLURM client abstraction)
  โ”œโ”€โ”€ views/      # Terminal UI views
  โ”œโ”€โ”€ config/     # Configuration management
  โ”œโ”€โ”€ ui/         # UI components and utilities
  โ””โ”€โ”€ slurm/      # SLURM client implementation
pkg/
  โ””โ”€โ”€ slurm/      # Mock SLURM implementation

For detailed architecture information, see docs/ARCHITECTURE.md.

๐Ÿ”ง Development

Setup Development Environment
# Clone the repository
git clone https://github.com/jontk/s9s.git
cd s9s

# Install dependencies
go mod download

# Run tests
go test ./...

# Run with mock data
go run cmd/s9s/main.go --mock

# Build binary
go build -o s9s cmd/s9s/main.go
Running Tests
# Unit tests
go test ./...

# Integration tests
go test -tags=integration ./test/integration

# Benchmarks
go test -bench=. ./test/performance

# Coverage
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
Debug Mode

Enable debug logging to troubleshoot issues:

s9s --debug

# Or set environment variable
export S9S_DEBUG=true
s9s

Debug logs are written to ~/.s9s/debug.log.

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick Contribution Guide
  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (go test ./...)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Inspired by k9s - Kubernetes CLI
  • Built with tview - Terminal UI framework
  • SLURM - HPC workload manager

Made with โค๏ธ for the HPC community

Directories ยถ

Path Synopsis
cmd
s9s command
test-cli command
internal
app
cli
dao
ssh
version
Package version provides version information for s9s
Package version provides version information for s9s
pkg
plugins
observability/alerts
Package alerts provides real-time alerting and notification capabilities for monitoring system metrics and resource utilization.
Package alerts provides real-time alerting and notification capabilities for monitoring system metrics and resource utilization.
observability/analysis
Package analysis provides advanced analytics capabilities for resource utilization and efficiency analysis.
Package analysis provides advanced analytics capabilities for resource utilization and efficiency analysis.
observability/api
Package api provides external HTTP API endpoints for accessing observability data.
Package api provides external HTTP API endpoints for accessing observability data.
observability/config
Package config provides configuration management for the observability plugin.
Package config provides configuration management for the observability plugin.
observability/historical
Package historical provides time-series data collection and analysis capabilities.
Package historical provides time-series data collection and analysis capabilities.
observability/initialization
Package initialization provides centralized component initialization and lifecycle management for the observability plugin.
Package initialization provides centralized component initialization and lifecycle management for the observability plugin.
observability/logging
Package logging provides a simple logging infrastructure for the observability plugin It supports file-based logging with different levels and structured output
Package logging provides a simple logging infrastructure for the observability plugin It supports file-based logging with different levels and structured output
observability/metrics
Package metrics provides comprehensive metrics collection and instrumentation for the observability plugin itself.
Package metrics provides comprehensive metrics collection and instrumentation for the observability plugin itself.
observability/models
Package models defines data structures and types for representing metrics, nodes, jobs, and other observability entities.
Package models defines data structures and types for representing metrics, nodes, jobs, and other observability entities.
observability/overlays
Package overlays provides dynamic metric overlay functionality for enhancing existing S9S views with real-time observability data.
Package overlays provides dynamic metric overlay functionality for enhancing existing S9S views with real-time observability data.
observability/prometheus
Package prometheus provides Prometheus client functionality with advanced features including caching, circuit breaking, connection pooling, and batch query processing.
Package prometheus provides Prometheus client functionality with advanced features including caching, circuit breaking, connection pooling, and batch query processing.
observability/security
Package security provides comprehensive security mechanisms for the observability plugin, including audit logging, rate limiting, request validation, and secrets management.
Package security provides comprehensive security mechanisms for the observability plugin, including audit logging, rate limiting, request validation, and secrets management.
observability/subscription
Package subscription provides real-time data subscription and notification capabilities.
Package subscription provides real-time data subscription and notification capabilities.
observability/views
Package views provides user interface components and widgets for displaying observability data within the S9S application.
Package views provides user interface components and widgets for displaying observability data within the S9S application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL