LinuxCommandLibrary

slurmdbd

Slurm database daemon for job accounting

TLDR

Set the daemon's nice value to the specified value, typically a negative number

$ slurmdbd -n [value]
copy

Change the working directory of slurmdbd to the LogFile path or to /var/tmp
$ slurmdbd -s
copy

Display help
$ slurmdbd -h
copy

Display version
$ slurmdbd -V
copy

SYNOPSIS

slurmdbd [OPTIONS]

Common Usage:
slurmdbd -D
slurmdbd -f /etc/slurm/custom_slurmdbd.conf
slurmdbd --kill

PARAMETERS

-D, --daemon
    Run the slurmdbd daemon in the background.

-f <conf_file>, --conf=<conf_file>
    Specify the path to the slurmdbd configuration file. Default is typically /etc/slurm/slurmdbd.conf.

-h, --help
    Display a brief help message and exit.

-L <log_file>, --logfile=<log_file>
    Path to the log file for slurmdbd messages. This option overrides the LogFile parameter in slurmdbd.conf.

-v, --verbose
    Increase the logging verbosity. Can be specified multiple times for more detailed output.

-V, --version
    Print version information for slurmdbd and exit.

-k, --kill
    Instruct a running slurmdbd daemon to shut down cleanly. This is often used for graceful restarts or shutdowns.

-i, --init
    Initialize or re-initialize the database schema. Use with extreme caution as it can erase existing accounting data if used on a populated database.

DESCRIPTION

The slurmdbd daemon is a core component of the Slurm Workload Manager, responsible for managing and storing Slurm's accounting and resource utilization data in a database. It serves as an interface for various Slurm client commands like sacct and sreport, allowing users to query job accounting information and generate usage reports.

It typically connects to a MySQL or MariaDB database and requires proper configuration through the slurmdbd.conf file, specifying database credentials, listening port, and other operational parameters.

Its primary functions include collecting job records, user and account limits, and historical data, which are crucial for billing, policy enforcement, and historical analysis. The daemon also plays a role in federated Slurm setups, enabling multi-cluster accounting.

CAVEATS

  • Requires a properly configured external database (e.g., MySQL, MariaDB) to store accounting data. Database connection issues are common troubleshooting points.
  • The slurmdbd.conf file is critical for correct operation; misconfigurations can prevent the daemon from starting or connecting to the database.
  • The --init option should be used with extreme care, as it can re-initialize the database schema and potentially erase all existing accounting data.
  • Ensure the user running slurmdbd has appropriate permissions to write to log files and access the configuration file.

CONFIGURATION FILE

The primary configuration for slurmdbd is managed via the slurmdbd.conf file, typically located in /etc/slurm. This file defines database connection parameters (type, host, port, credentials), logging options, and daemon-specific settings. A correct configuration is paramount for the daemon's functionality.

DATABASE REQUIREMENTS

slurmdbd relies on an external SQL database, commonly MySQL or MariaDB, to persist all accounting and historical data. Proper setup of the database server, including user permissions and database creation, is a prerequisite for running slurmdbd.

INTERACTIONS

slurmdbd communicates with the slurmctld daemon to receive job completion records and updates. It also serves data to client commands like sacct and sreport, enabling users and administrators to query and report on cluster utilization and job statistics.

HISTORY

slurmdbd is an integral part of the Slurm Workload Manager, which originated in 2002 as a robust, scalable job scheduler. It was developed to address the growing need for comprehensive accounting, historical data retention, and federated cluster capabilities beyond basic job scheduling. Its evolution has paralleled Slurm's growth, continuously adding features for more complex reporting, user/account limits, and seamless integration into large-scale, multi-cluster environments.

SEE ALSO

slurmdbd.conf(5), slurmctld(8), slurmd(8), slurm.conf(5), sacct(1), sreport(1), sview(1), scontrol(1)

Copied to clipboard