Skip to content

Slurm report

Automatic usage report

You can generate accounting statistics from Slurm using the slurmreport script, located in /ceph/hpc/bin/.


/ceph/hpc/bin/slurmreport [-m] [-c | -w] [-a accountlist] [-s startdate -e enddate] [-r report-directory]


-m: Send report by E-mail to root@localhost

-a: Select an account (or list of accounts)

-s -e: Select Start and End dates of the report

-c: Select current month from the 1st until today

-w: Select the last week

-r: Copy the report to a specified directory as well
./slurmreport -s 2021-08-18 -e 2021-08-01

Date format could be either YYYY-MM-DD or MMDD

If you run the script without specifying additional features, the report will be generated for the last month and placed into your home directory.

Manual usage report

Create an accounting report manually using sreport command:

Usage report in CPU Hours

Report cluster account utilization by filing specified fields for the desired period of time start/end:

sreport cluster AccountUtilizationByUser user=$USER -t Hours start=2021-01-01 end=2021-05-25 format=Proper%20,Login%20,Accounts,Used


sreport cluster AccountUtilizationByUser user=user -t Hours start=2021-01-01 end=2021-10-25 format=Proper%20,Login%20,Accounts,Used
Cluster/Account/User Utilization 2021-01-01T00:00:00 - 2021-10-07T14:59:59 (24156000 secs)

Usage reported in CPU Hours
         Proper Name                Login         Account        Used
-------------------- -------------------- --------------- -----------
          User User                 user        vega-users     5009241

Used=5009241 is in Thread Hours.

To get result in Core Hours divide the number by 2.

Usage report in TRES Hours

Fill specified fields for the desired period of time start/end:

Create report for your project account:

ACC=$(sacctmgr show assoc cluster=vega user=$USER format=account%40 -n) ; ACC=$(tr -d ' ' <<< "$ACC") ; sreport --tres billing cluster AccountUtilizationByAccount account=$ACC -t Hours start=2021-01-01 end=2022-01-01 format=Proper%20,Login%20,Accounts%30,Used

Create report for your user account only

sreport --tres billing cluster UserUtilizationByAccount -t Hours start=2021-01-01 end=2022-01-01 user=$USER format=Proper%20,Login%15,Account%40,Used%20