1 基本

% qstat
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
-----------------------------------------------------------------------------------------------------------------
  26053 0.74380 qsub.sh    ippei        dr    11/22/2016 14:36:28 Rh.q@Rh02.calc.atom                2        
  40360 0.37719 qsub.sh    ippei        r     01/26/2017 20:28:17 Rh.q@Rh00.calc.atom                2        
  40693 0.37766 qsub.sh    ippei        r     02/02/2017 15:09:51 Ru.q@Ru02.calc.atom                4      
  (snip)
  42010 0.33498 vaspgeomop ippei        qw    01/27/2017 20:46:45                                    4        

2 オプション

2.1 -ext ジョブチケットポリシーと関連する情報の追加

view additional attributes

% qstat -ext 
job-ID  prior   ntckts  name       user         project          department state cpu        mem     io      tckts ovrts otckt ftckt stckt share queue                          slots ja-task-ID 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  26053 0.74391 0.50000 qsub.sh    ippei        NA               defaultdep dr    NA         NA      NA          0     0     0     0     0 0.00  Rh.q@Rh02.calc.atom                2        
  32853 0.65297 0.50000 qsubTc.sh  ippei        NA               defaultdep dr    NA         NA      NA          0     0     0     0     0 0.00  Tc.q@Tc08.calc.atom                4        
  40360 0.38355 0.50000 qsub.sh    ippei        NA               defaultdep r     0:02:07:14 3855.08280 0.00539     0     0     0     0     0 0.00  Rh.q@Rh00.calc.atom                2        
  41214 0.38396 0.50000 qsub.sh    ippei        NA               defaultdep r     106:06:15:02 7184433.62542 3.29167     0     0     0     0     0 0.00  Sr.q@Sr05.calc.atom                4        
  41828 0.34207 0.50000 vaspgeomop ippei        NA               defaultdep r     34:04:07:20 1987783.95657 1.23065     0     0     0     0     0 0.00  Ge.q@Ge03.calc.atom                4        
  41859 0.34207 0.50000 vaspgeomop ippei        NA               defaultdep r     12:10:50:00 665435.27702 0.68803     0     0     0     0     0 0.00  Ge.q@Ge05.calc.atom                4        
  41865 0.34207 0.50000 vaspgeomop ippei        NA               defaultdep r     11:06:03:26 532251.02654 0.30956     0     0     0     0     0 0.00  Ge.q@Ge04.calc.atom                4        
  41866 0.34207 0.50000 vaspgeomop ippei        NA               defaultdep r     11:04:53:30 654386.11417 0.11782     0     0     0     0     0 0.00  Ge.q@Ge08.calc.atom                4    

2.2 -f キューの状態の詳細を表示

full output。 qtype: キューのタイプ。キューのタイプは B (バッチ) または I (対話型) のどちらか。 (see qstat によるジョブの監視 (Sun N1 Grid Engine 6.1 ユーザーズガイド) )

% qstat -f
queuename                      qtype resv/used/tot. load_avg arch          states
---------------------------------------------------------------------------------
Ag.q@Ag00.calc.atom            BIP   0/4/4          4.01     lx26-amd64    
  41997 0.34207 vaspgeomop ippei        r     02/10/2017 17:16:09     4        
---------------------------------------------------------------------------------
Ag.q@Ag01.calc.atom            BIP   0/0/4          0.01     lx26-amd64    
---------------------------------------------------------------------------------
Ag.q@Ag02.calc.atom            BIP   0/4/4          4.01     lx26-amd64    
---------------------------------------------------------------------------------
Ag.q@Ag03.calc.atom            BIP   0/4/4          7.73     lx26-amd64    
(snip)
############################################################################
 - PENDING JOBS - PENDING JOBS - PENDING JOBS - PENDING JOBS - PENDING JOBS
############################################################################
     21 0.50000 hostname.s ippei        qw    12/10/2013 11:45:38     1

2.3 -g c キューの状態のまとめ

display cluster queue summary

% qstat -g c
CLUSTER QUEUE                   CQLOAD   USED    RES  AVAIL  TOTAL aoACDS  cdsuE  
--------------------------------------------------------------------------------
Ag.q                              0.94     32      0      0     32      0      4 
Cd.q                              1.00     28      0      0     32      0      4 
Ga.q                              -NA-      0      0      0     40      0     40 
Ge.q                              1.00     48      0      0     52      0      4 
In.q                              0.95     40      0      0     40      0      0 
Kr.q                              0.95     32      0      0     36      0      4 
Pd.q                              0.97     36      0      0     64      0     28 
Rh.q                              0.49     14      0      0     16      0      8 
Ru.q                              0.98     52      0      0     64      0     16 
Se.q                              -NA-      0      0      0    120      0    120 
Sn.q                              0.98     12      0      0     20      0      8 
Sr.q                              0.99     56      0      0     80      0     36 
Tc.q                              0.61     72      0      0     80      0     40 

2.4 -help ヘルプ

print this help

ヘルプの表示

2.5 -j job_identifier_list

show scheduler job information

ジョブの詳細。 カンマ区切りで複数ジョブを指定可能。

% qstat -j 42844,42845                                                                                                                                                                                             
==============================================================
job_number:                 42844
exec_file:                  job_scripts/42844
submission_time:            Fri Jan 27 20:46:57 2017
owner:                      ippei
uid:                        1000
group:                      ippei
gid:                        1000
sge_o_home:                 /home/ippei
sge_o_log_name:             ippei
sge_o_path:                 /home/ippei/.gem/ruby/2.3.0/bin:/home/ippei/.cabal/bin:/home/ippei/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ippei/.rvm/bin:/home/ippei/opt/ATLAS/bin:/home/ippei/opt/mediawiki-1.20.2/bin:/home/ippei/opt/phonopy-1.7.6/bin:/home/ippei/opt/ruby-1.9.3-p125/bin:/opt/bin:/opt/intel/bin:/opt/mpich2/bin:/opt/openmpi-gcc-var/bin:/opt/openmpi-gcc/bin:/opt/openmpi-intel/bin
sge_o_shell:                /usr/bin/zsh
sge_o_workdir:              /home/ippei/study/lisicon/n-graph/c-geomopt/working2/Li4_1971
sge_o_host:                 Re
account:                    sge
cwd:                        /home/ippei/study/lisicon/n-graph/c-geomopt/working2/Li4_1971
stderr_path_list:           NONE:NONE:stderr
mail_list:                  ippei@Re.calc.atom
notify:                     FALSE
job_name:                   vaspgeomoptGe.qsub
stdout_path_list:           NONE:NONE:stdout
jobshare:                   0
hard_queue_list:            Rh.q
shell_list:                 NONE:/bin/sh
env_list:                   
script_file:                vaspgeomoptGe.qsub
parallel environment:  Rh.openmpi range: 2
version:                    2
scheduling info:            queue instance "Ag.q@Ag05.calc.atom" dropped because it is temporarily not available
                            queue instance "Cd.q@Cd05.calc.atom" dropped because it is temporarily not available
                            (snip)
                            queue instance "Tc.q@Tc07.calc.atom" dropped because it is full
                            Job is in hold state
==============================================================
job_number:                 42845
exec_file:                  job_scripts/42845
submission_time:            Fri Jan 27 20:47:01 2017
owner:                      ippei
uid:                        1000
group:                      ippei
gid:                        1000
sge_o_home:                 /home/ippei
sge_o_log_name:             ippei
sge_o_path:                 /home/ippei/.gem/ruby/2.3.0/bin:/home/ippei/.cabal/bin:/home/ippei/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ippei/.rvm/bin:/home/ippei/opt/ATLAS/bin:/home/ippei/opt/mediawiki-1.20.2/bin:/home/ippei/opt/phonopy-1.7.6/bin:/home/ippei/opt/ruby-1.9.3-p125/bin:/opt/bin:/opt/intel/bin:/opt/mpich2/bin:/opt/openmpi-gcc-var/bin:/opt/openmpi-gcc/bin:/opt/openmpi-intel/bin
sge_o_shell:                /usr/bin/zsh
sge_o_workdir:              /home/ippei/study/lisicon/n-graph/c-geomopt/working2/Li4_1972
sge_o_host:                 Re
account:                    sge
cwd:                        /home/ippei/study/lisicon/n-graph/c-geomopt/working2/Li4_1972
stderr_path_list:           NONE:NONE:stderr
mail_list:                  ippei@Re.calc.atom
notify:                     FALSE
job_name:                   vaspgeomoptGe.qsub
stdout_path_list:           NONE:NONE:stdout
jobshare:                   0
hard_queue_list:            Rh.q
shell_list:                 NONE:/bin/sh
env_list:                   
script_file:                vaspgeomoptGe.qsub
parallel environment:  Rh.openmpi range: 2
version:                    2
scheduling info:            queue instance "Ag.q@Ag05.calc.atom" dropped because it is temporarily not available
                            queue instance "Cd.q@Cd05.calc.atom" dropped because it is temporarily not available
                            (snip)
                            queue instance "Tc.q@Tc07.calc.atom" dropped because it is full
                            Job is in hold state

2.5.1 -j の引数なし

-j オプションを引数なしで実行すると、実行できない理由なんかも表示してくれる。

scheduling info:            queue instance "Fe.q@Fe00.calc.atom" dropped because it is temporarily not available
                            queue instance "Fe.q@Fe01.calc.atom" dropped because it is temporarily not available
                            (snip)
                            queue instance "Tc.q@Tc07.calc.atom" dropped because it is overloaded: no such host Tc07.calc.atom for that queue
                            (snip)
                            queue instance "Ge.q@Ge00.calc.atom" dropped because it is full
                            (snip)

Jobs can not run because queue instance is not contained in its hard queue list
  7450, 7451, 7452, 7453, 7454

Jobs can not run because available slots combined under PE are not in range of job
  7450, 7451, 7452, 7453, 7454

Jobs can not run because available slots combined under PE are not in range of job

たぶん、計算機が出払っていて利用可能なリソースがないんだと思う。

2.6 -pe 並列環境を使っているジョブの表示

select only queues with one of these parallel environments

2.7 -q キューに入っているジョブの表示

print information on given queue

キューに入っているジョブの表示。 複数指定できる。

2.8 -qs その状態のキュー表示

selects queues, which are in the given state(s)

2.9 -r ジョブが利用するリソースの表示

show requested resources of job(s)

ジョブが利用するリソースの表示

% qstat -r H -n 50                                           [17-02-17 14:38:25]
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
-----------------------------------------------------------------------------------------------------------------
  26053 0.74424 qsub.sh    ippei        dr    11/22/2016 14:36:28 Rh.q@Rh02.calc.atom                2        
       Full jobname:     qsub.sh
       Master Queue:     Rh.q@Rh02.calc.atom
       Requested PE:     Rh.openmpi 2
       Granted PE:       Rh.openmpi 2
       Hard Resources:   
       Soft Resources:   
       Hard requested queues: Rh.q
  40360 0.40374 qsub.sh    ippei        r     01/26/2017 20:28:17 Rh.q@Rh00.calc.atom                2        
       Full jobname:     qsub.sh
       Master Queue:     Rh.q@Rh00.calc.atom
       Requested PE:     Rh.openmpi 2
       Granted PE:       Rh.openmpi 2
       Hard Resources:   
       Soft Resources:   
       Hard requested queues: Rh.q
(snip)

2.10 -s 指定した状態のジョブのみ表示

{p|r|s|z|hu|ho|hs|hd|hj|ha|h|a} のいずれかで指定。

2.11 -u: 指定したユーザのジョブ状態を表示

ippei@Ir % qstat -u ippei                                            [14-12-15 15:31:48]
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
    336 0.75000 vasp-Sr.qs ippei        r     11/27/2014 21:17:10 Sr.q@Sr06.calc.atom                4
    433 0.73296 runvaspgeo ippei        r     11/28/2014 11:42:36 Se.q@Se21.calc.atom                4
    437 0.73296 runvaspgeo ippei        r     11/28/2014 11:42:36 Se.q@Se13.calc.atom                4
    449 0.73296 runvaspgeo ippei        r     11/29/2014 12:56:21 Se.q@Se00.calc.atom                4
    674 0.52330 vasp-Tc.qs ippei        r     12/05/2014 21:13:36 Tc.q@Tc08.calc.atom                4

全ユーザ情報を取得したい場合は "*" を指定する。

ippei@Ir % qstat -u '*'                                              [14-12-15 15:33:01]
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
    336 0.75000 vasp-Sr.qs ippei        r     11/27/2014 21:17:10 Sr.q@Sr06.calc.atom                4
    403 0.73396 runvaspgeo koyama       r     11/28/2014 10:52:21 Se.q@Se20.calc.atom                4
(snip)
   1046 0.33052 vasp-Nb.qs koyama       qw    12/12/2014 14:26:47                                    2
   1047 0.33051 vasp-Nb.qs koyama       qw    12/12/2014 14:27:23                                    2

2.12 -urg 緊急度を併せて表示

display job urgency information

2.13 -pri 優先度を併せて表示

display job priority information