Skip to content

Python script to take specific SLURM job parsable output, derive statistics, and print the line to be used in a pipeline

Notifications You must be signed in to change notification settings

uoracs/process-job-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

process-job-stats

Python script to take specific SLURM job parsable output, derive statistics, and output lines with extra information to be used with something like pandas.

Usage

This script assumes you're using the SLURM format string:

JobID|JobName|User|Account|Partition|Elapsed|NNodes|NCPUS|AllocTRES|Submit|Start|End|NodeList

and you're using the parsable2 flag, -P, omitting job steps, -X, and not printing the header -n.

You also probably want to report on Failed (F) and Completed (CD) states.

Simply pipe the sacct command to this script:

sacct -n -X -P \
  --starttime='2025-02-04T00:00:00' \
  --endtime='2025-02-04T23:59:59' \
  --state=F,CD \
  --format=JobID,JobName,User,Account,Partition,Elapsed,NNodes,NCPUS,AllocTRES,Submit,Start,Nodelist \
  | process-job-stats.py -o processed.csv

About

Python script to take specific SLURM job parsable output, derive statistics, and print the line to be used in a pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published