Wednesday, June 12, 2013

MOAB Job Control - mjobctl

Taken from Adaptive Computing: mjobctl

The mjobctl command controls various aspects of jobs. It is used to submit, cancel, execute, and checkpoint jobs. It can also display diagnostic information about each job. The mjobctl command enables the Moab administrator to control almost all aspects of job behavior. 

Selected examples of using mjobctl. For more information, see

1. Cancel Job
# mjobctl -c job_id

Cancel Job according to credentials or job attributes
Example A, Cancels all jobs that currently have a USERHOLD on them.
# mjobctl -c -w state=USERHOLD

Example B,  Cancels all jobs assigned to user1 or acct1.
# mjobctl -c -w user=user1 -w acct=acct1

2. Set or Release a Job Hold

Example A, Set a user hold on job job1045
# mjobctl -h user job1045

Example B, Unset all holds on job job1045
# mjobctl -u all job1045

3. Unhold a Job

Release user and system holds on job job1045.
# mjobctl -u user,system job1045

4. Execute a Job

The -w option allows flags to be set for the job. Allowable flags are, ignorepolicies, ignorenodestate, and ignorersv.
ignorepolicies - Ignore Policies
ignorenodestate - Ignore Node State
ignorersv - Ignore RSV

Example A, Execute the job1045
# mjobctl -x job1045

Example B, Execute job job1046 and ignore policies, such as MaxJobPerUser
# mjobctl -x -w flags=ignorepolicies job1046

Example C, Resume a Job
# mjobctl -r job1045

Example D, Requeue a Job
# mjobctl -R job1045

Example E, Suspend a job
# mjobctl -s job1045 

Example F, Submit a Job
# mjobctl -S job1045

5. Modify a Job's Priority

Example A, Modify a job's System Priority.
# mjobctl -p +1000 job1045

Example B, Adds 1000 points to what the priority of the job would be from normal calculation.
# mjobctl -p 1000 job1045 --flags=relative

6. Query a Job

Example A, Query job job1045.
# mjobctl -q diag job1045

Example B, Query starttime of job job1045
# mjobctl -q starttime job1045

No comments: