slurm-self-healing-watchdog

Monitor Slurm sbatch jobs via sacct and squeue, apply minimal repairs, and resubmit failures.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/KwongFuk/codex-skills --skill slurm-self-healing-watchdog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slurm-self-healing-watchdog
Source: https://github.com/KwongFuk/codex-skills/tree/main/workspace/slurm-self-healing-watchdog
Command: npx skills add https://github.com/KwongFuk/codex-skills --skill slurm-self-healing-watchdog

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Slurm job workflows can stall or fail silently, requiring manual monitoring. This skill provides an automated watchdog that submits sbatch jobs, watches terminal states via sacct/squeue, diagnoses failures from logs, and triggers minimal, local repairs before resubmitting up to a configurable limit.

Core Features & Use Cases

  • Submits an sbatch script and continuously monitors its status until terminal.
  • Diagnoses failures using Slurm state and log output, then applies a minimal repair workflow.
  • Automatically retries failed jobs up to a configurable limit and emits per-attempt JSON reports.
  • Ideal for long-running pipelines and experiments where manual re-submission is error-prone.

Quick Start

From the target repository root, run the watchdog with the sbatch script path and optional --max-attempts to start automatic monitoring and safe repairs.

Frequently Asked Questions about slurm-self-healing-watchdog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically monitor and retry failed Slurm sbatch jobs?

To automatically monitor and retry failed Slurm sbatch jobs, you can use a watchdog that submits scripts, watches terminal states via sacct and squeue, diagnoses failures, and resubmits up to a configurable limit.

What is the best way to prevent Slurm workflows from stalling or failing silently?

The best way to prevent Slurm workflows from stalling or failing silently is deploying an automated watchdog that continuously tracks job state and triggers minimal local repairs before safely resubmitting.

How does a Slurm watchdog diagnose job failures before resubmitting?

A Slurm watchdog diagnoses job failures by checking the terminal state via sacct and squeue, analyzing log output, and emitting structured JSON repair notes to aid debugging and auditing.

Can I configure the maximum retry attempts for sbatch job resubmission?

Yes, you can configure the maximum retry attempts for sbatch job resubmission. The watchdog applies minimal fixes and resubmits failed jobs up to a configurable limit, defaulting to five attempts in common scenarios.

Do I need to manually parse sacct logs to repair long-running Slurm pipelines?

No, you do not need to manually parse sacct logs to repair long-running Slurm pipelines. The watchdog automatically diagnoses failures from log output and applies minimal repair workflows before retrying.

What are the limitations of using an automated watchdog for Slurm job repair?

A limitation of using an automated watchdog for Slurm job repair is that it applies only minimal local fixes and retries up to a configured limit, which may not resolve complex pipeline failures requiring manual intervention.