Altering Batch Jobs
Remove Batch Job from the Queue
Jobs in the queue in any state can be stopped and removed from the queue using the command qdel
.
For example, to remove a job with a PBS ID of 1234, use the following command:
> qdel 1234
More details on the qdel
utility can be found through the qdel
man page.
Hold Queued Job
Jobs in the queue in a non-running state may be placed on hold using the qhold
command. Jobs placed on hold will not be removed from the queue, but they will not be eligible for execution.
For example, to move a currently queued job with a PBS ID of 1234 to a hold state, use the following command:
> qhold 1234
More details on the qhold
utility can be found through the qhold
man page.
Release Held Job
Once on hold the job will not be eligible to run until it is released to return to a queued state. The qrls
command can be used to remove a job from the held state.
For example, to release job 1234 from a held state, use the following command:
> qrls 1234
More details on the qrls
utility can be found through the qrls
man page.
Modify Queued Job
Non-running jobs in the queue can be modified with the PBS qalter
command. Please note: Jobs in a running state cannot be altered.
The following uses job 130494 as an example:
> qstat -a 130494nid03588: ORNL/CCS Req'd Req'd Elap Job ID Username Queue Jobname SessID NDS Tasks Memory Time S Time -------------------- -------- -------- ---------- ------ ----- ----- ------ ----- - ----- 130494.nid03588 cfuson debug t1 -- 1 4300 0b 00:10 Q -- >
The qalter
utility can be used to
- Modify the job’s name
> qalter -N newname 130494
- Modify the number of requested cores
> qalter -l size=4800 130494
- Modify the job’s wall time
> qalter -l walltime=01:00:00 130494
The qstat
utility can then be used to view the changes, as follows:
> qstat -a 130494nid03588: ORNL/CCS Req'd Req'd Elap Job ID Username Queue Jobname SessID NDS Tasks Memory Time S Time -------------------- -------- -------- ---------- ------ ----- ----- ------ ----- - ----- 130494.nid03588 cfuson debug newname -- 1 4800 0b 01:00 Q -- >
The qalter
utility can modify more PBS options than are listed above. These options as well as more information can be found through the qalter
man page.