How to use the command "sreport" (with examples)

How to use the command "sreport" (with examples)

The “sreport” command is used to generate reports on jobs, users, and clusters from accounting data in the Slurm workload manager. It provides valuable information for system administrators and job schedulers to analyze system utilization, job sizes, and user activity.

Use case 1: Show pipe delimited cluster utilization data

Code:

sreport --parsable cluster utilization

Motivation: This use case is helpful for gathering cluster utilization data in a pipe-delimited format. By using this command, cluster administrators can quickly analyze and monitor the resource usage of the entire cluster, enabling better decision-making for resource allocation.

Explanation: The “–parsable” option specifies that the output should be in a machine-readable format, which in this case is pipe-delimited. The “cluster” keyword indicates that the utilization data is related to the cluster level.

Example Output:

Cluster|TOTALCPU|TOTALGRES|   TOTMEM| AVAILMEM|ALLOCST|DEFMEM|      IDLE|  TIMELIMIT|
slurm|1324800|  70912.0|125337403|39479040| 238944|102400|1054388763|25920000000

Use case 2: Show number of jobs run

Code:

sreport job sizes printjobcount

Motivation: Monitoring the number of jobs run is crucial for tracking workload trends and understanding the overall cluster usage. This use case helps administrators and schedulers evaluate cluster performance, identify job bottlenecks, and optimize job scheduling algorithms.

Explanation: The “job” keyword indicates that the report should focus on job-related data. The “sizes” keyword narrows down the focus to job size-related information. The “printjobcount” option specifies that the report should display the count of jobs run.

Example Output:

Account|User|Submit|TRESMins|        ID
all|all|1387910400|3360553|1387908945

Use case 3: Show users with the highest CPU time use

Code:

sreport user topuser

Motivation: Identifying users with the highest CPU time usage helps administrators track resource consumption patterns and understand which users are utilizing the cluster resources the most. This information assists in managing resource allocation, identifying power users, and potentially implementing fair usage policies.

Explanation: The “user” keyword indicates that the report should focus on user-related data. The “topuser” option specifies that the report should display users with the highest CPU time usage.

Example Output:

User|                     Matrix( Mins)| GCD( Mins)|K-means( Mins)|            ID
 user1|                          3175105|         40|            40|        311840
 user2|                          2546850|       2405|          2405|        272024

Conclusion:

The “sreport” command provides a range of useful reports for system administrators and job schedulers in the Slurm workload manager. By utilizing its various options and arguments, administrators can gain insights into cluster utilization, job statistics, and user activity, allowing for better resource management and decision-making.

Related Posts

How to use the command 'nmcli agent' (with examples)

How to use the command 'nmcli agent' (with examples)

The nmcli agent command is used to run nmcli as a NetworkManager secret agent or polkit agent.

Read More
How to use the command 'pdftoppm' (with examples)

How to use the command 'pdftoppm' (with examples)

The ‘pdftoppm’ command is a tool for converting PDF document pages to portable Pixmap (image formats).

Read More
How to use the command 'head' (with examples)

How to use the command 'head' (with examples)

The ‘head’ command is used to output the first part of files.

Read More