Skip to main content

sacctmgr

Overview

sacctmgr is the command tool in Slurm for managing accounting data:

  • Manage Accounts, Users, resource limits (QOS), etc.
  • Configure associations and permissions
  • Requires administrator privileges

Common Options

OptionDescriptionExample
addAdd entitysacctmgr add account
modifyModify entitysacctmgr modify user
deleteDelete entitysacctmgr delete qos
showShow infosacctmgr show cluster
-i, --immediateTake effect immediatelysacctmgr -i add ...
-p, --parsableParsable outputsacctmgr -p show ...
-Q, --quietQuiet modesacctmgr -Q delete ...

Examples

Manage accounts

# Add account
sacctmgr add account myaccount Description="test account" Organization=CS

# Modify account
sacctmgr modify account myaccount set GrpTRES=cpu=100

# Delete account
sacctmgr delete account myaccount

Manage users

# Add user
sacctmgr add user user1 Account=myaccount

# Set default account for user
sacctmgr modify user user1 set DefaultAccount=myaccount

# Delete user
sacctmgr delete user user1

Manage QOS

# Add QoS
sacctmgr add qos high Priority=100

# Add qos: limit high to 10 CPUs, 10 RTX2080 GPUs, and 4 V100 GPUs
sacctmgr add qos high set GrpTRES=cpu=10,gres/gpu:rtx2080=10,gres/gpu:v100=4

# Limit high to 10 CPUs, 10 RTX2080 GPUs, and 4 V100 GPUs
sacctmgr modify qos high set maxtresperuser=cpu=1,gres/gpu:rtx2080=1,gres/gpu:v100=1

# Modify QoS limits
sacctmgr modify qos high set MaxTRESPerJob=cpu=32

# Clear limits; -1 means unlimited
sacctmgr modify qos high set GrpTRES=cpu=-1,gres/gpu:rtx2080=-1,gres/gpu:v100=-1

# Modify group limits
sacctmgr modify qos high set GrpTRES=cpu=-1,gres/gpu:rtx2080=-1,gres/gpu:v100=-1

# Delete QoS
sacctmgr delete qos high

# Add user to qos
sacctmgr modify user <user_name> set qos=<qos_name>

View associations

sacctmgr show Association  format=Cluster,Account,User,Partition,QOS,GrpSubmit,GrpWall,GrpTRESMins,MaxJobs,MaxTRES format=GrpTRES%60

View user details

sacctmgr show user user1 format=User,DefaultAccount,AdminLevel

View QOS configuration

sacctmgr show qos format=Name,Priority,MaxTRESPerJob

Key Parameter Details

Resource Types (TRES)

TypeDescriptionExample
cpuCPU corescpu=100
memMemory (MB)mem=100G
gres/gpuGPU countgres/gpu=2
billingBilling weightbilling=30

Common limits

Limit parameterDescription
GrpTRESGroup total resource limit
MaxTRESPerUserPer-user resource limit
MaxTRESPerJobPer-job resource limit
MaxJobsMax jobs limit

Notes

  • All modifications take effect immediately and are irreversible

  • Deleting a parent account will delete all child accounts

  • Resource limits are based on real-time calculation and may affect queued jobs

  • For complex configurations, run simulation tests first

  • Back up configuration before production operations:

     sacctmgr -p dump <cluster_name> file=./<file_name>.cfg

📌 Tip: For more advanced features (such as federated cluster configuration), see man sacctmgr or visit Slurm official documentation