amd-agi/primus/slurm-idle-node-check
Claude Code and agent skill by amd-agi/primus
- community
Checking that the SKILL.md file is still in the repository.
Check available idle nodes in a SLURM cluster. Use when the user wants to find usable idle nodes, verify node health, check docker status on SLURM nodes, check NIC QoS/DCQCN configuration, check RDMA link status, validate GID table, or troubleshoot cluster node availability.
Install
npx vskill@latest install amd-agi/primus/slurm-idle-node-checkSKILL.md
SLURM Idle Node Health Check
Diagnose idle nodes in a SLURM cluster: verify SSH access, check Docker service, verify workspace directory accessibility, validate NIC QoS/DCQCN configuration consistency, check RDMA link status, validate GID table, and report usable vs problematic nodes.
Workflow
Step 1: Obtain Idle Node List
If the user provides a nodelist, use it directly. Otherwise:
- Run
sinfo -h -o "%P %T %N"to get all nodes with their exact state. - Filter to keep only rows where the state is exactly `idle` — exclude
drained,drain,idle*,down,mixed, etc.
- Recommended:
sinfo -h -o "%P %T %N" | awk '$2 == "idle"' - Do NOT use
sinfo -t idlealone — it also matchesdrainednodes whose base state containsidle.
- If multiple partitions have idle nodes, use AskQuestion to let the user pick one partition.
- Expand the nodelist with
scontrol show hostnames <nodelist>to get individual hostnames.
Step 2: Ensure SSH Access
- Pick one node from the list and test:
ssh -o BatchMode=yes -o ConnectTimeout=5 <node> echo ok - If it fails (password required), inform the user and propose:
- Read
~/.ssh/id_rsa.pub - Append (not overwrite) the public key to
~/.ssh/authorized_keys:cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- Wait for user confirmation before executing the append.
- After appending, verify SSH works again.
Step 3: Run Health Checks (Parallel)
SSH into each idle node and run the checks below. Use parallel subagents or batch shell commands to speed up.
For each node, run a single SSH command that performs all checks:
If SSH itself fails, mark the node as FAIL|SSH connection failed|||.
Output format: STATUS|errors|qos_hash|dcqcn_hash — fields separated by |. The qos_hash and dcqcn_hash are md5 hashes of the full nicctl show qos and nicctl show dcqcn output respectively, used for cross-node consistency comparison in Step 3b.
Current Checks
| # | Check | Command | Failure Meaning | ||
|---|---|---|---|---|---|
| 1 | Docker service is running | docker info | Docker daemon not started or user has no permission | ||
| 2 | Can remove existing containers | `docker ps -aq --filter status=exited \ | xargs -r docker rm` | Cannot clean up containers | |
| 3 | Workspace directory accessible | [ -d "$WORKSPACE_DIR" ] && [ -r "$WORKSPACE_DIR" ] | Shared filesystem not mounted or path unreachable on this node | ||
| 4 | NIC QoS config valid | sudo nicctl show qos | QoS not configured or missing required settings (DSCP classification, DSCP 10→priority 0, PFC no-drop priorities 0) | ||
| 5 | NIC DCQCN config present | sudo nicctl show dcqcn | DCQCN not configured on this node | ||
| 6 | RDMA links all active | rdma link | One or more RDMA links not in state ACTIVE / physical_state LINK_UP | ||
| 7 | GID table valid | show_gid | Device missing required GID indices (all devices need index 0 & 1; ionic devices must have exactly 0 & 1, no extra indices) |
<workspace_path> is the absolute path of the current repository root (i.e. the workspace directory where the agent is operating). Determine it at runtime via pwd or from the workspace context, then substitute into the script.
To add more checks later: append new check logic inside thebash -c '...'block above and update the table.
Step 3b: Cross-Node NIC Configuration Consistency Check
After collecting results from all nodes, perform a cross-node consistency comparison for the NIC configuration checks (QoS and DCQCN).
- Parse the
qos_hashanddcqcn_hashfields from each node's output. - For QoS: group nodes by their
qos_hash. If more than one distinct hash exists (ignoring empty hashes from failed nodes), the QoS configuration is inconsistent. The group with the most nodes is treated as the "majority" (expected) configuration; nodes in other groups are marked as inconsistent. - For DCQCN: apply the same majority-based grouping logic on
dcqcn_hash. - For any node flagged as inconsistent, append to its error string:
QoS config inconsistent with majority;orDCQCN config inconsistent with majority;and change its status to FAIL. - If you need to show the user what differs, SSH into one representative node from each group and re-run the relevant
sudo nicctl showcommand to display the actual output side by side.
Step 4: Display Results
Print two tables — one for healthy nodes, one for problematic nodes.
Table format (markdown):
- Column 1: Node name
- Column 2: PASS or FAIL
- Column 3: Issue description (or
-if PASS)
Show the healthy-node table first, then the problematic-node table.
If any NIC configuration inconsistency was detected in Step 3b, add a separate NIC Configuration Consistency section after the tables:
- State whether QoS and DCQCN configs are consistent across all nodes.
- If inconsistent, list which nodes belong to which configuration group (by hash), and show the differing output for each group so the user can compare.
Step 5: Summary
Always write the summary in English, regardless of the conversation language.
Provide a summary block:
To generate compressed nodelists, use: scontrol show hostlistctrl <node1,node2,...> (or echo "node1,node2,..." | tr ',' '\n' | scontrol show hostlistctrl)
If scontrol show hostlistctrl is not available, fall back to: scontrol show hostnames for verification and manually compress contiguous ranges.
Step 6: Save Report to File
After displaying results to the user, save the full report as a Markdown file under the repo root at:
YYYYMMDD.HHMMis the current date and time when the check finishes (e.g.20260318.1107).- Create the
output/skills/directory if it does not exist (mkdir -p). - The file should contain the complete report in English, structured as follows:
- Use the Write tool (or shell
cat > file) to create the file. - After saving, print the file path so the user knows where to find it.
Important Notes
- Never overwrite
~/.ssh/authorized_keys— always append. - Always ask for user confirmation before modifying SSH keys.
- Run node checks in parallel to save time on large clusters.
- Use
-o StrictHostKeyChecking=noto avoid interactive SSH prompts. - Use
-o ConnectTimeout=10to avoid hanging on unreachable nodes.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/slurm-idle-node-check/SKILL.md
Popularity
- Repository stars
- 120
- Repository forks
- 46
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/amd-agi/primus/slurm-idle-node-check)