Here you can see how to manage and monitor your jobs on our HPC cluster. Whether you're running batch jobs, interactive sessions, or array jobs, these tools and commands will help you keep track of your work and manage your resources.
## Checking Job Status
### Using `squeue`
The `squeue` command is possibly your most common tool for viewing the status of jobs in the queue. Here's a basic usage:
```bash
squeue
```
Sample output:
```bash
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
1234 batch my_job jsmith R 5:23 1 cn01
1235 batch array_job jdoe R 2:45 1 cn02
1236 gpu gpu_task asmith PD 0:00 1 (Resources)
```
To see **only** your job:
```bash
squeue -u your_username
```
To see jobs on a specific partition:
```bash
squeue -p partition_name
```
### Jobs States
These are common job states that you might see under the `ST` column of `squeue`'s output:
If you initially submit a job and then remember some attribute needs to be changed, you don't need to cacnel and resubmit the whole job. You can modify certain attributes of a job that's already in the queue using the `scontrol update` command.
For example, to change the time limit of a job:
```bash
scontrol update JobId=job_id TimeLimit=2:00:00
```
To change the number of CPUs:
```bash
scontrol update JobId=job_id NumCPUs=4
```
## Monitoring Resource Usage
### Using `sstat`
For running jobs, you can use `sstat` to get resource usage statistics: