Skip to main content

scontrol

Overview

scontrol is the command tool in Slurm for system control and configuration management:

  • View and modify Slurm configuration
  • Manage jobs, nodes, partitions, and other resources
  • Most operations require administrator privileges
  • Provides real-time system status viewing

Common Options

FeatureCommand ExampleDescription
Job Management
View jobsscontrol show job <jobid>Show job details
Job extended infoscontrol show job_ex <jobid>Show extra job info
Modify jobscontrol update jobid=123 ...Modify job parameters
Cancel jobscontrol kill <jobid>Terminate a running job
Node Management
View nodescontrol show node <node>Show node details
Modify nodescontrol update nodename=node01 ...Update node config
Drain nodescontrol update nodename=node01 state=DRAINSet node to maintenance
Partition Management
View partitionscontrol show partition <name>Show partition config
Modify partitionscontrol update partition=debug ...Update partition parameters
Other Features
View configscontrol show configShow system config
View licensesscontrol show licShow license status

Examples

Job management

View extended job info

scontrol show job_ex 12345

Extended field details

FieldDescription
RespHostHost name for interactive job requests
PortAllocated response port (alloc_resp_port)
OtherPortOther ports (used for notifications such as SRUN_PING)
LastActivityLast active time for job allocation (job last_time_active)

Modify job parameters

scontrol update jobid=12345 TimeLimit=1-12:00:00

Modify job priority

scontrol update jobid=12345 Priority=1000

Terminate a job

scontrol kill 12345 "Maintenance required"

Node control

Set node to maintenance

scontrol update nodename=node01 state=DRAIN reason="Hardware upgrade"

Resume node

scontrol update nodename=node01 state=RESUME

Partition control

Change partition state

scontrol update partition=debug state=UP

Set partition node weight

scontrol update partition=debug weight=100

State Management

Node state types

StateDescription
IDLENode is idle/available
ALLOCNode is allocated
MIXEDNode is partially allocated
DRAINNode is in maintenance
FAILNode failure
DOWNNode is down

Partition state types

StateDescription
UPPartition available
DOWNPartition unavailable
DRAINPartition in maintenance

Notes

  • Most modification operations require administrator privileges
  • Configuration changes may affect system operation; use a maintenance window
  • Node state changes may take time to take effect
  • Some changes may require updating the slurm.conf configuration file
  • Test before production operations

📌 Best practices:

  • Check current status before important operations: scontrol show <entity>
  • Verify after changes: scontrol reconfigure
  • Record reasons for maintenance operations: scontrol update ... reason="<details>"
  • Use node range expressions for batch operations: node[01-08,12]