Interface 1: Enhance output of qstat to make it more admin and script friendly.
- Visibility: Public
- Change Control: Stable
- Details: qstat -f output should follow standards like pbsnodes output in-order to avoid ambiguity while parsing.
- If value itself contains more key value pairs, then it should get printed in the next line with an additional tab in the front.
- An assignment operator will be used as the delimiter between key and value.
- Backslash will be used to mention line continuation. (In case of splitting up the value of an attribute across multiple lines if it is greater than 78 chars)
Usage:
qstat -f
qstat -f <job_id>
Present Behavior:
[root@localhost overlay]# qstat -f 1
Job Id: 1.vbox
Job_Name = STDIN
Job_Owner = root@vbox
job_state = Q
queue = workq
server = vbox
Checkpoint = u
ctime = Fri Nov 11 17:57:05 2016
Error_Path = vbox:/home/nithinj/Tasks/overlay/STDIN.e1
Hold_Types = n
Join_Path = n
Keep_Files = n
Mail_Points = a
mtime = Fri Nov 11 17:57:05 2016
Output_Path = vbox:/home/nithinj/Tasks/overlay/STDIN.o1
Priority = 0
qtime = Fri Nov 11 17:57:05 2016
Rerunable = True
Resource_List.ncpus = 1
Resource_List.nodect = 1
Resource_List.place = pack
Resource_List.select = 1:ncpus=1
schedselect = 1:ncpus=1
substate = 10
Variable_List = PBS_O_HOME=/root,PBS_O_LANG=en_US.utf8,
PBS_O_LOGNAME=nithinj,
PBS_O_PATH=/root/perl5/bin:/usr/lib64/qt-3.3/bin:/home/nithinj/perl5/b
in:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/pb
s/bin:/home/nithinj/.local/bin:/home/nithinj/bin:/opt/pbs/default/bin:/
usr/local/git/bin:/opt/pbs/default/bin:/opt/pbs/default/sbin:/usr/local
/git/bin,PBS_O_MAIL=/var/spool/mail/nithinj,PBS_O_SHELL=/bin/bash,
PBS_O_WORKDIR=/home/nithinj/Tasks/overlay,PBS_O_SYSTEM=Linux,
PBS_O_QUEUE=workq,PBS_O_HOST=vbox
euser = root
egroup = root
queue_rank = 1
queue_type = E
comment = Not Running: Not enough free nodes available
etime = Fri Nov 11 17:57:05 2016
Submit_arguments = -- /bin/sleep 1000
executable = <jsdl-hpcpa:Executable>/bin/sleep</jsdl-hpcpa:Executable>
argument_list = <jsdl-hpcpa:Argument>1000</jsdl-hpcpa:Argument>
project = _pbs_project_default
Expected Behavior:
[root@localhost overlay]# qstat -f 1
Job Id: 1.vbox
Job_Name = STDIN
Job_Owner = root@vbox
job_state = Q
queue = workq
server = vbox
Checkpoint = u
ctime = Fri Nov 11 17:57:05 2016
Error_Path = vbox:/home/nithinj/Tasks/overlay/STDIN.e1
Hold_Types = n
Join_Path = n
Keep_Files = n
Mail_Points = a
mtime = Fri Nov 11 17:57:05 2016
Output_Path = vbox:/home/nithinj/Tasks/overlay/STDIN.o1
Priority = 0
qtime = Fri Nov 11 17:57:05 2016
Rerunable = True
Resource_List.ncpus = 1
Resource_List.nodect = 1
Resource_List.place = pack
Resource_List.select = 1
ncpus=1
schedselect = 1
ncpus=1
substate = 10
Variable_List
PBS_O_HOME = /root
PBS_O_LANG = en_US.utf8
PBS_O_LOGNAME = nithinj
PBS_O_PATH = /root/perl5/bin:/usr/lib64/qt-3.3/bin:/home/nithinj/perl5/b \
in:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/pb \
s/bin:/home/nithinj/.local/bin:/home/nithinj/bin:/opt/pbs/default/bin:/ \
usr/local/git/bin:/opt/pbs/default/bin:/opt/pbs/default/sbin:/usr/local \
/git/bin
PBS_O_MAIL = /var/spool/mail/nithinj
PBS_O_SHELL = /bin/bash
PBS_O_WORKDIR = /home/nithinj/Tasks/overlay
PBS_O_SYSTEM = Linux
PBS_O_QUEUE = workq
PBS_O_HOST = vbox
euser = root
egroup = root
queue_rank = 1
queue_type = E
comment = Not Running: Not enough free nodes available
etime = Fri Nov 11 17:57:05 2016
Submit_arguments = -- /bin/sleep 1000
executable = <jsdl-hpcpa:Executable>/bin/sleep</jsdl-hpcpa:Executable>
argument_list = <jsdl-hpcpa:Argument>1000</jsdl-hpcpa:Argument>
project = _pbs_project_default