[slurm-users] Enable SLURM Accounting

6,546 views
Skip to first unread message

Buckley, Ronan

unread,
May 28, 2018, 10:33:01 AM5/28/18
to slurm...@lists.schedmd.com

Hi All,

 

I need to enable SLURM accounting so that I can use commands like sacct, sstat,sreport etc. It looks like SLURM accounting was not enabled by default. From reading the online documentation, all I have to do is to un-commented the following lines in /etc/slurm/slurm.conf:

 

#JobAcctGatherFrequency=30

# AccountingStorageLoc=slurm_acct_db

# AccountingStoragePass=SLURMDBD_USERPASS

 

Then run the command 'scontrol reconfigure' the SLURM configuration.

Is that all I have to do?

 

Ronan

Andy Riebs

unread,
May 28, 2018, 10:41:51 AM5/28/18
to slurm...@lists.schedmd.com
Let me recommend the very helpful documentation on Slurm accounting at <https://slurm.schedmd.com/accounting.html>.

Andy
-- 
Andy Riebs
andy....@hpe.com
Hewlett-Packard Enterprise
High Performance Computing Software Engineering
+1 404 648 9024
My opinions are not necessarily those of HPE
    May the source be with you!

Wiegand, Paul

unread,
May 28, 2018, 10:45:10 AM5/28/18
to Slurm User Community List
No, there's more. In terms of the slurm.conf ... you will need to set the storage host so slurm knows where to go look for slurmdbd. If you are enforcing any limits, you will need to set those. I also set the job gather type.

AccountingStorageEnforce
AccountingStorageHost
JobAcctGatherType


You will have also have to make sure mysql is installed, slurmdbd is setup, and you have slurmdbd.conf file, as well. You will have to create the accounts and users using sacctmgr, and possibly QOSs, depending on what you'd like to do. It's not difficult, but there are a number of small steps.

There's a document online that walks you through the process.

Paul.

Buckley, Ronan

unread,
May 28, 2018, 11:20:15 AM5/28/18
to Slurm User Community List
I forgot to add. I have the following already in place:

From slurm.conf:

# ACCOUNTING
JobAcctGatherType=jobacct_gather/linux
#JobAcctGatherType=jobacct_gather/cgroup
#JobAcctGatherFrequency=30
AccountingStorageType=accounting_storage/slurmdbd
AccountingStorageUser=slurm
# AccountingStorageLoc=slurm_acct_db
# AccountingStoragePass=SLURMDBD_USERPASS

From slurmdbd.conf:

# Database info
StorageType=accounting_storage/mysql
StorageHost=127.0.0.1
#StoragePort=1234
StoragePass=*********************
StorageUser=slurm
StorageLoc=slurm_acct_db
Reply all
Reply to author
Forward
0 new messages