Jobstats

When to Use?

This article explains how to use the jobstats command to view the amount of resources your job is consuming.

Monitoring your jobs with jobstats can help ensure that the optimal amount of resources are requested when submitting a job to the HPC cluster. Properly sized and timed jobs help reduce wait times for everyone using the cluster.

The jobstats command can be run on both running and completed jobs. The goal for each user should be to utilize 90% or more of the resources they have requested.

Process

Run the following command:

squeue

This will then list all the jobs running on the cluster. Find the line with your job and it should show you the job ID.

If you are looking for a completed job by yourself run this command. 

sacct -u username

Example:

sacct -u mccrakei

Now run the following command:

jobstats "JobID"

Example:

jobstats 123456

The output displays the average usage of CPU, memory, and GPU resources for the specified job.

Output will look something like this:

As you can see, this job has requested 8 cores and 64GB of RAM but is only using an average of 16% of the CPU and 14% of the memory. If your job has similar stats, you should reconsider your resource request and aim for closer to 90% efficiency.