Skip to content

Slurm report

Automatic usage report

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

Usage:

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

where:

-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 -a $USER -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

Usage report in TRES Hours

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

account=$(sacctmgr show assoc cluster=vega user=$USER format=account -n) | sreport --tres billing cluster AccountUtilizationByAccount account=$account -t Hours start=2021-01-01 end=2021-05-25 format=Proper%20,Login%20,Accounts,Used