Changes between Initial Version and Version 1 of oldwiki/sgecmds


Ignore:
Timestamp:
Oct 28, 2014, 11:16:55 AM (10 years ago)
Author:
les
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • oldwiki/sgecmds

    v1 v1  
     1SGE Commands
     2What are some basic SGE commands?
     3
     4
     5Commonly-Used SGE Commands
     6qsub    Submit a Job
     7qstat   Determine the Status of a Job
     8qstat -t -ext -s r -u (user)    Show start time and cpu time for running jobs
     9qdel    Cancel a job
     10qhold   Place a hold on a queued job to prevent it from running
     11qrls    Release a job held with qhold
     12qhost   Display Node Information
     13qmon    An X-Windows interface to SGE commands
     14
     15
     16qsub
     17The ‘qsub’ command submits a job to the SGE queueing system.
     18
     19For example, to submit simple.sh script, run:
     20
     21$ qsub simple.sh
     22A message will be displayed with the job ID and job name:
     23
     24Your job 96606 (“simple.sh”) has been submitted
     25Qsub 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.:
     26
     27simple.sh.e96606
     28simple.sh.o96606
     29... where ‘e’ indicates ‘error’ and ‘o’ indicates ‘output’. The number in the file name is the job submission number.
     30
     31qload
     32The ‘qload’ command displays SGE job utilization.
     33
     34It prints a summary of everyone’s submitted jobs, and lists your running jobs with system CPU/memory information.
     35qstat
     36The ‘qstat’ command displays detailed SGE job information. It has many useful options. For a complete list, run ‘man qstat’ (type ‘q’ to quit).
     37
     38To list your jobs, use the ‘qstat’ command without any options.
     39
     40To 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):
     41
     42$ qstats | less
     43The -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 <JobID>, for example
     44
     45$ qstat -j 193013
     46qdel
     47The ‘qdel’ command deletes a job from the queue.
     48
     49To delete all of your jobs:
     50
     51$ qdel -u $USER
     52Note
     53
     54$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.
     55
     56To delete a single job:
     57
     58$ qdel 6033
     59To delete a specific range of jobs, see for loop iteration.