Runaway jobs that have an end times of 0 which add up compute hours that are altering the accounting info within slurmDB which produces inaccurate accounting data.
To fix jobs accumulating runtime infinitely because they do not have end times.
Note: First create a back up of your slurm accounting database and work in a local test environment.
mysql -u root
create database slurm_acct_db;
mysql slurm_acct_db -u root < <path to your DB dumpfile>
Note: Before using this script you need to have an input file which is generated by running the following command
sacct -o jobid,state,totalcpu,timelimit,start,end,resvcpuraw --accounts 'username' > inputfile
./slurm-acct-db-patch inputfile
=======
./slurm-acct-db-patch filename user