Job monitoring with SLURM
__NOTOC__
| < Submit a GPU job | Home | Job output > |
The most frequent job monitoring operations are
- Kill a job with scancel
squeue¶
After submitting a job, the job will wait in a queue to be run on a compute node and has the PD (i.e. pending) status.
$ squeue
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
6037416 normal.4h myjob nmarouni PD 0:00 1 (None)
When the job is running on a compute node, it has the R (i.e. running) status.
$ squeue
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
6037416 normal.4h myjob nmarouni R 0:03 1 eu-g5-047-1
| squeue options | Description |
|---|---|
| (no option) | list all your jobs in all queues |
| -t STATE | list only jobs with a specified STATE. Valid job states include (but are not limited to): PENDING, RUNNING, SUSPENDED, COMPLETED, CANCELLED, FAILED, TIMEOUT |
| -o "format" | use custom output format (see SLURM documentation for details) |
| -j |
show only job(s) with given jobIDs. Requests a comma separated list of job IDs to display |
| -p partition | show only jobs in a specific partition (queue) |
myjobs¶
myjobs displays more human-friendly information than squeue. Here are examples in PENDING and RUNNING status.
#### PENDING status {#pending_status}
$ myjobs -j 6038307Job informationJob ID : 6038307Status : PENDINGRunning on node : None assignedUser : nmarouninaShareholder group : es_cdssSlurm partition (queue) : gpu.24hCommand : script.sbatchWorking directory : /cluster/home/nmarouninaRequested resourcesRequested runtime : 08:00:00Requested cores (total) : 12Requested nodes : 1Requested memory (total) : 120000 MiBJob historySubmitted at : 2023-01-09T15:56:09Started at : Job did not start yetQueue waiting time : 8 sResource usageWall-clock :Total CPU time : -CPU utilization : - %Total resident memory : - MiBResident memory utilization : - %
|
#### RUNNING status {#running_status}
$ myjobs -j 6038307Job informationJob ID : 6038307Status : RUNNINGRunning on node : eu-g3-022User : nmarouninaShareholder group : es_cdssSlurm partition (queue) : gpu.24hCommand : script.sbatchWorking directory : /cluster/home/nmarouninaRequested resourcesRequested runtime : 08:00:00Requested cores (total) : 12Requested nodes : 1Requested memory (total) : 120000 MiBJob historySubmitted at : 2023-01-09T15:56:09Started at : 2023-01-09T15:56:38Queue waiting time : 29 sResource usageWall-clock : 00:00:36Total CPU time : 00:00:00CPU utilization : 0%Total resident memory : 2.94 MiBResident memory utilization : 0%
|
scancel¶
Use scancel to terminate a submitted job
$ scancel 161182774
| scancel options | Description |
|---|---|
| job-ID | kill job-ID |
| -n jobname | kill all jobs called jobname |
| -p partition | restrict the scancel operation to jobs in this partition |
| -t state | Restrict the scancel operation to jobs in this state |
| -i | Interactive mode. Ask for confirmation before performing the cancel operation |
Further reading¶
| < Submit a GPU job | Home | Job output > |