Skip to main content

Enhanced Universal SLURM Job Monitor with smart pattern matching

Project description

jobmon-slurm: Enhanced Universal SLURM Job Monitor

PyPI version Python 3.6+

A robust, user-friendly SLURM job monitoring utility that handles job name truncation, detects job completion status, and provides intelligent feedback for HPC environments.

🚀 Quick Start

# Install (no admin required)
pip install --user jobmon-slurm

# Monitor all your jobs
jm

# Monitor specific job pattern (handles SLURM truncation)
jm dual_env_audit

# Monitor specific job ID
jm 41005547

# Quiet mode
jq pattern

# Debug mode for troubleshooting
jm -d pattern

✨ Features

Smart Pattern Matching

  • Handles SLURM job name truncation automatically
  • jm dual_env_audit works even when SLURM shows dual_env
  • Progressive fallback strategies (exact → shortened → partial)

Enhanced Job Completion Detection

  • Uses sacct to check job history when queue is empty
  • Detects quickly-completed jobs that finish before monitoring starts
  • Shows job exit codes and completion timestamps

Intelligent User Feedback

  • 🎯 COMPLETED: Job finished successfully
  • 🛑 CANCELLED: Job cancelled via scancel
  • ❌ FAILED: Job failed during execution
  • ⏰ TIMEOUT: Job exceeded time limit
  • 🔄 RUNNING: Job currently executing

Better Monitoring Experience

  • Real-time transitions: Automatically moves from queue monitoring to output viewing
  • Helpful suggestions: When searches fail, provides actionable alternatives
  • Debug mode: jm -d pattern shows detailed search process

📋 Usage Examples

# Basic monitoring
jm                      # Monitor all your jobs
jm foldx               # Monitor jobs matching "foldx"
jm 41005547            # Monitor specific job ID

# Enhanced features
jm dual_env_audit      # Works despite SLURM name truncation
jm -d pattern          # Debug mode shows search process
jm -q pattern          # Quiet mode (less verbose)
jq pattern             # Short alias for quiet mode

# Advanced options
jm -u username         # Monitor another user's jobs
jm -i 5                # 5-second refresh interval

🔧 Installation Options

Option 1: pip (Recommended)

pip install --user jobmon-slurm

Option 2: Development Install

git clone https://github.com/omonidat/jobmon-slurm.git
cd jobmon-slurm
pip install --user -e .

Option 3: Direct Script Install

# Download and install manually
wget https://raw.githubusercontent.com/omonidat/jobmon-slurm/main/install.sh
bash install.sh

🏗️ Requirements

  • SLURM environment (uses squeue, sacct, scancel)
  • Python 3.6+ (for package management only)
  • Standard Unix utilities (bash, tail, grep, etc.)

🧪 Examples in Action

Cancelled Job Detection

$ jm my_job
# Start monitoring...
# User runs: scancel 41005547
# Monitor output:
==========================================
🛑 JOB CANCELLED at Wed Jul 23 10:15:42 2025
==========================================
💡 This job was cancelled (likely via 'scancel' command)
   If this was intentional, no further action needed
   If accidental, you may want to resubmit the job

Smart Pattern Matching

$ jm dual_environment_audit_script
# Automatically tries:
# 1. "dual_environment_audit_script" (exact)
# 2. "dual_env" (SLURM truncated)
# 3. "dual" (shorter pattern)
# Shows which pattern worked in debug mode

🤝 Contributing

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

📄 License

MIT License - see LICENSE file for details.

🆘 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

jobmon_slurm-2.0.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

jobmon_slurm-2.0.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file jobmon_slurm-2.0.0.tar.gz.

File metadata

  • Download URL: jobmon_slurm-2.0.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for jobmon_slurm-2.0.0.tar.gz
Algorithm Hash digest
SHA256 2deb5ae22c2a80d4d41491f0b20bca6bd7a2843bc12f88e0322ee2e445d382bf
MD5 5d1e06962fcba4aedd5ad2422a21a559
BLAKE2b-256 74fbd1553fa09be33d67bf7d504e143ca396483806ee4613aadf02dee5b7e135

See more details on using hashes here.

File details

Details for the file jobmon_slurm-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: jobmon_slurm-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for jobmon_slurm-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 508e5782aea391631922fe193979c21aa7740412a998b937b6d6052373fedfe7
MD5 5db9e8bf77281ef43a31a06961d38664
BLAKE2b-256 38521aa10c64e04d8d818e152d470979f4d17901448b3d091bbdfc8c56beac49

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