Gratia probe for SLURM resource manager
The probe connects to the SLURM accounting database, retrieves records for completed jobs, and submits the JobUsageRecords to Gratia.
- SLURM (tested with 2.4)
- MySQL
- Python (tested with 2.6)
- Python MySQLdb (in the standard MySQL-python package)
- slurmdbd accounting storage configured and logging to MySQL
- Configure the ProbeConfig
- Add the script to cron
Sample crontab entry:
*/15 * * * * root /usr/bin/slurm_meter -s 900 -c
- The probe gets the installed SLURM version by running the srun command. If your SLURM install is not on the path, specify it with the SlurmLocation option.
Option | Description |
---|---|
SlurmDbHost="db.cluster.example.edu" | Database host |
SlurmDbPort="3306" | Database port |
SlurmDbUser="slurm" | Database username with read/only access |
SlurmDbPasswordFile="/etc/gratia/slurm/pwfile" | File containing database password. Must only be readable to the probe. (chmod 600) |
SlurmDbName="slurm_acct_db" | Name of SLURM accounting database |
SlurmCluster="mycluster" | Name of SLURM cluster, available from 'sacctmgr list cluster' |
In addition to the settings above, there are additional options for the running jobs probe.
Option | Description |
---|---|
SlurmCEName="cluster.example.edu" | The FQDN of the cluster |