Skip to main content
Print

Tracking Resource usage: A Comprehensive Guide

One of Slurm’s key features is its built-in accounting system, which enables HPC administrators and users  to track and analyze resource utilization. In this article, we will explore the various Slurm accounting commands available and provide a comprehensive guide on how to utilize them for efficient resource tracking.

1. sacct – Query Slurm Accounting Data:

The sacct command is a versatile tool for querying Slurm accounting data, allowing users to retrieve various job and accounting information. By utilizing different options, users can customize their queries and obtain the required data. Some useful options for sacct include:

  • -u or --user: Filter results by a specific user.
  • -j or --jobs: Filter results by job ID(s).
  • -S or --starttime: Specify a start time range for querying accounting data.
  • -E or --endtime: Specify an end time range for querying accounting data.
  • -o or --format: Customize the output format to display specific fields.

2. sstat – Monitor Job Status and Progress:

The sstat command provides real-time monitoring of running Slurm jobs. It allows users to retrieve information about job status, progress, and resource utilization. Some key options for sstat include:

  • -j or --job: Specify a specific job ID to monitor.
  • -a or --all: Display information for all jobs.
  • -p or --pending: Show information for pending jobs.
  • -s or --summary: Display summarized information for running jobs

3. squeue – View Job Queue Information:

The squeue command allows users to view the current status of jobs in the queue, including pending, running, and completed jobs. It provides useful insights into job priority, resource allocation, and estimated start times. Some commonly used options for squeue include:

  • -u or --user: Filter results by a specific user.
  • -j or --job: Filter results by job ID(s).
  • -t or --states: Specify specific job states to display.
  • -o or --format: Customize the output format to display specific fields.

4. jobinfo – Retrieve

The jobinfo command collates job information from the ‘sstat’, ‘sacct’ and ‘squeue’  commands to give a uniform interface for both current and historical jobs. It takes the job-id as an argument and presents important metrics like cores utilized, reserved wall time and CPU time, and I/O utilization.

  • -v or –verbose: verbose output
Table of Contents