To check the status of the jobs we use the qstat command
qstat
# to get information about specific job
qstat -j <job-id>
# to get the full information of the resources
qstat -f# to get the full details of all the jobs running
qstat -F# To get the filter for a queue we use
qstat -q queue_list
# to filter by queue state
qstat -qs{a|c|d|o|s|u|A|C|D|E|S}# to filter jobs by users
qstat -u <userid>
# to show all user's job
qstat -u\*
QSUB
To submit a batch job we use the qsub command
# Example 1: to submit a simple bash job
qsub <script_path>
# Example 2: To submit an advanced batch job we use
qsub -cwd-S /bin/bash -i /data/example.in -o /results/example.out -j y example.sh arg1 arg2
# Options explained:# -cwd: job will be executed from the same directory# -S: bash shell will be assigned to interpret the submitted job# -i: this file will be used as an input# -o: this file will be used to show output# -j y: this will merge the error into the same as the output file# Example 3: advanced script
qsub -N example3 -P project_test -p-28-la=lx-amd64 example.sh
# Options explained:# -N: this will be submitted by the given name, instead of the script name# -P: this job will be submitted to project_test# -p: this will assign lower priority to the given job than normal priority# -l: this will request for amd64 resource on the scheduler# Example 4: to submit a binary job
qsub -b y firefox
Job Submission Script
#!/bin/bash#$ -N example3#$ -P "project-name"#$ -o test.out -e error.err#$ -l mem=6G#$ -l cpu=2# command to be executedecho"just a test"
QDEL
qdel is used to delete a job in the queue
# Force delete a job in the queue
qdel -f <job-id>
# to delete specific tasks of a job
qdel <job-id> -t <task-range>
# to delete all the jobs from a specific user, only possible for managers
qdel -u <user-list> "*"
How to check for the list of the nodes
To check the list of the current nodes we use the qhost command
qhost
# To check the jobs running under the specific hosts we use
qhost -q-j
What is grid engine and all these qcommands for? is it a hosting platform or something like that? Along the lines of teraform or something similar?