Skip to main content

sacctmgr_user

Overview​

Collects user account and association data from SLURM using sacctmgr and publishes it at regular intervals. Provides daily snapshots of user account associations, default accounts and QoS per user, account-specific QoS access, user permissions and access control, and account hierarchy.

Data Type: DataType.LOG, Schema: SacctmgrUserPayload

Execution Scope​

Single node in the cluster.

Output Schema​

SacctmgrUserPayload​

Published with DataType.LOG:

{
"ds": str, # Collection date (YYYY-MM-DD in Pacific time)
"cluster": str, # Cluster identifier
"derived_cluster": str, # Sub-cluster (same as cluster if not `--heterogeneous-cluster-v1`)
"sacctmgr_user": { # Dictionary of user attributes
"User": str, # Username
"DefaultAccount": str, # User's default account
"Account": str, # Account for this association
"DefaultQOS": str, # User's default QoS
"QOS": str, # Comma-separated list of available QoS
# Additional fields depending on SLURM version
}
}

Important Notes:

  1. Each user-account association creates a separate record
  2. A user with 3 accounts will generate 3 separate payloads
  3. The QOS field is a comma-separated string of available QoS levels
  4. Fields depend on SLURM version; collector dynamically parses headers

Data Collection Commands​

The collector executes:

Stage 1: Get User List

sacctmgr show user format=User -nP

Stage 2: Get User Details (per user)

sacctmgr show user <username> withassoc format=User,DefaultAccount,Account,DefaultQOS,QOS -P

Command-Line Options​

OptionTypeDefaultDescription
--clusterStringAuto-detectedCluster name for metadata enrichment
--sinkStringRequiredSink destination, see Exporters
--sink-optsMultiple-Sink-specific options
--log-levelChoiceINFODEBUG, INFO, WARNING, ERROR, CRITICAL
--log-folderString/var/log/fb-monitoringLog directory
--stdoutFlagFalseDisplay metrics to stdout in addition to logs
--heterogeneous-cluster-v1FlagFalseEnable per-partition metrics for heterogeneous clusters
--intervalInteger300Seconds between collection cycles (5 minutes)
--onceFlagFalseRun once and exit (no continuous monitoring)
--retriesIntegerShared defaultRetry attempts on sink failures
--dry-runFlagFalsePrint to stdout instead of publishing to sink
--chunk-sizeIntegerShared defaultThe maximum size in bytes of each chunk when writing data to sink.

Usage Examples​

Basic Daily Collection​

gcm sacctmgr_user --sink otel --sink-opts "log_resource_attributes={'attr_1': 'value1'}"

One-Time Snapshot​

gcm sacctmgr_user --once --sink stdout

Debug Mode with Local File Output​

gcm sacctmgr_user \
--once \
--log-level DEBUG \
--stdout \
--sink file --sink-opts filepath=/tmp/user_data.jsonl