SGE Commands What are some basic SGE commands? Commonly-Used SGE Commands qsub Submit a Job qstat Determine the Status of a Job qstat -t -ext -s r -u (user) Show start time and cpu time for running jobs qdel Cancel a job qhold Place a hold on a queued job to prevent it from running qrls Release a job held with qhold qhost Display Node Information qmon An X-Windows interface to SGE commands qsub The ‘qsub’ command submits a job to the SGE queueing system. For example, to submit simple.sh script, run: $ qsub simple.sh A message will be displayed with the job ID and job name: Your job 96606 (“simple.sh”) has been submitted Qsub assigns the job to the workstation with the most resources available. When finished, qsub produces 2 files in my home directory (by default): an error file and an output file, e.g.: simple.sh.e96606 simple.sh.o96606 ... where ‘e’ indicates ‘error’ and ‘o’ indicates ‘output’. The number in the file name is the job submission number. qload The ‘qload’ command displays SGE job utilization. It prints a summary of everyone’s submitted jobs, and lists your running jobs with system CPU/memory information. qstat The ‘qstat’ command displays detailed SGE job information. It has many useful options. For a complete list, run ‘man qstat’ (type ‘q’ to quit). To list your jobs, use the ‘qstat’ command without any options. To list everyone’s jobs, use the ‘qstats’ command (which is a shortcut for ‘qstat -f -ne -u \*’). To view the output one page at a time, include the ‘less’ command (type ‘q’ to quit): $ qstats | less The -j option prints detailed information for a specific job. This is useful to identify why a job remains queued, or is in E(rror) state. The syntax is qstat -j , for example $ qstat -j 193013 qdel The ‘qdel’ command deletes a job from the queue. To delete all of your jobs: $ qdel -u $USER Note $USER will be interpreted by the shell as your unix account name. You may use $USER in shell commands and shell scripts instead of your unix account name. To delete a single job: $ qdel 6033 To delete a specific range of jobs, see for loop iteration.