Skip to content

Job accounting

Accounting script

The script vsc4CoreHours.py on VSC4 calculates the elapsed core-hours per user in your project and the total amount of core-hours in your project.

Usage of the script

Examples:
vsc4CoreHours.py                     # total project time span
vsc4CoreHours.py -D 7                # last week
vsc4CoreHours.py -S 2019-04-23 -E 2019-05-26T00:00:01
vsc4CoreHours.py -E 2020-05-26       # project start until 2020-05-26
vsc4CoreHours.py -S 2019-04-23       # 2019-04-23 until today

sacct

In order to customize your accounting request, the command sacct allows for assessing information from the Slurm job accounting log or Slurm database. The default output values are jobs, job steps, status, and exit codes. By specifying the format, the output of sacct can be customized. In the framework of this section only a minimal subset of options is listed.

See the full list of commands here, or via the man pages with
zen username@l53:~$man sacct

Some examples are,

[...@... ~]$ sacct -o Account,User,UID,AveCPUFreq,Elapsed,Start,End,TotalCPU
[...@... ~]$ sacct --format=Account,User,UID,AveCPUFreq,Elapsed,Start,End,TotalCPU
[...@... ~]$ sacct --format=JobID,UID,State,ExitCode
[...@... ~]$ sacct -o UID,User,Account,Group,JobID,JobName,Elapsed,Start,End

A shorthand to show all the parameters is,

-l, --long
which is equivalent to,
-o jobid,jobname,partition,maxvmsize,maxvmsizenode,maxvmsizetask, avevmsize,maxrss,maxrssnode,maxrsstask,averss,maxpages,maxpagesnode, maxpagestask,avepages,mincpu,mincpunode,mincputask,avecpu,ntasks, alloccpus,elapsed,state,exitcode,maxdiskread,maxdiskreadnode,maxdiskreadtask, avediskread,maxdiskwrite,maxdiskwritenode,maxdiskwritetask,avediskwrite, allocgres,reqgres

Whereas minimum information (-o jobid,status,exitcode) is returned via the option

-b, --brief