Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »


  • Interface 1: As an admin or user, I would like qstat to be able to output full job attribute information in JSON format so that I can more easily write scripts consuming this information.


    • Visibility: Public
    • Change Control: Stable
    • Details: qstat -f will use -Fjson option to print the output in JSON format(http://www.json.org/).
    • Similar to pbsnodes -av -Fjson, timestamp, pbs_version and pbs_server will be used as the prolog of the output.
      • Usage:
        qstat -f -F json
        qstat -f -F json <job_id>


      • Example: 

        {
             "timestamp":1479277336,
             "pbs_version":"14.1",
             "pbs_server":"vbox",
             "Jobs":{
                         "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,
                                       "nodect":1,
                                       "place":"pack",
                                       "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/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/pbs/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"
                            }
                  }
        }




     NOTE:

            JSON and DSV will be supported only with full set of attributes (" -f " option). This would include every vaild combination of "-f" (Ex: "qstat -Qf" or "qstat -Bf")

            Using it with other optargs will throw the already existing "conflicting options" error and prints the usage on the screen.


Follow the community discussion

  • No labels