Qstat XML
From GridWiki
Contents |
XML output of the qstat command
Copyright statement
Note: This document is under Grid Engine project SISSL license.
Introduction
The output of the qstat command has a lot of useful information that users desire and parsing the plain text output of this command could be somewhat cumbersome. Therefore there is an XML alternative. This switch is not new to the qstat command, however recently there has been some changes to the output of this -xml switch and many discussions around what information should be displayed. With the 61u3 version of gridengine, the output of qstat -xml was altered in a way to filter out undesirable output from the dump of the entire data structure. Since this time, it has been the subject of many discussions as to what should be displayed in the output and what information is deemed as garbage.
Project Overview
Project Aim
The goal of this project is to enable a concise, user-friendly and useful output for the qstat -xml command. This document specifies the content of the output and aims to clarify all concerns relating to the issue surrounding qstat -xml. In reaching this goal, two main points need to be addressed. First of all, deciding upon which output should be displayed in the xml output, and secondly, unifying the output between the plain text and xml output. Currently there exist some discrepancies between the data shown between these two views.
Project Benefit
Among others, the main benefit of this project will be to give the users of gridengine a distinct and definite definition for the qstat -xml output. The users will know exactly how the output of this command will look and it will include all information that is desired by gridengine users.
Project Dependencies
Although not directly dependant on any other projects, this project should ensure that Chris D's qstat -xml project is is not broken
Implementation
The xml switch is already implemented into the qstat command. As taken from the qstat man page: "This option [-xml] can be used with all other options and changes the output to XML. The used schemas are referenced in the XML output. The output is printed to stdout."
As for the details of the -xml switch implementation, that still has to be decided on (hence this document).
The fields that have been proposed for being displayed in the xml output are as follows:
JB_job_number JB_exec_file JB_submission_time JB_owner JB_uid JB_group JB_gid JB_account JB_merge_stderr JB_mail_list, MR_user, MR_host JB_notify JB_job_name JB_jobshare JB_shell_list, PN_path, PN_host, PN_file_host, PN_file_staging JB_env_list, __SGE_PREFIX__O_HOME, __SGE_PREFIX__O_LOGNAME, __SGE_PREFIX__O_PATH, __SGE_PREFIX__O_SHELL, __SGE_PREFIX__O_TZ, __SGE_PREFIX__O_MAIL, __SGE_PREFIX__O_HOST, __SGE_PREFIX__O_WORKDIR JB_script_file JB_ja_tasks, JAT_status, JAT_task_number JB_deadline JB_execution_time JB_checkpoint_attr JB_checkpoint_interval JB_reserve JB_mail_options JB_priority JB_restart JB_verify JB_script_size JB_verify_suitable_queues JB_soft_wallclock_gmt JB_hard_wallclock_gmt JB_override_tickets JB_version JAT_start_time JAT_master_queue
Appendix
Example #1
This example shows the basic qstat -j output of a sleeper job followed by the same output of the job using the -xml switch. NOTE: This example was done using gridengine 61u4. Other versions may shown different output.
> qstat -j 17 ============================================================== job_number: 17 exec_file: job_scripts/17 submission_time: Mon May 12 13:47:18 2008 owner: michael uid: 200850 group: staff gid: 10 sge_o_home: /home/michael sge_o_log_name: michael sge_o_path: /scratch2/michael/61u4/sol-amd64/bin/sol-amd64:/vol2/tools/SW/jdk1.5.0/sol-amd64/bin:/usr/pkg/bin:/usr/pkg/sbin:/opt/SUNWspro/bin:/vol2/tools/SW/sol-amd64/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/bin:.:/usr/sbin:/usr/ccs/bin sge_o_shell: /bin/tcsh sge_o_tz: Europe/Berlin sge_o_workdir: /scratch2/michael/61u4/sol-amd64 sge_o_host: tuor account: sge mail_list: michael@tuor notify: FALSE job_name: Sleeper jobshare: 0 shell_list: /bin/sh env_list: script_file: examples/jobs/sleeper.sh usage 1: cpu=00:00:00, mem=0.00000 GBs, io=0.00000, vmem=N/A, maxvmem=N/A scheduling info: There are no messages available
Same job with the xml output:
> qstat -j 17 -xml
<?xml version='1.0'?>
<detailed_job_info xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<djob_info>
<qmaster_response>
<JB_job_number>17</JB_job_number>
<JB_exec_file>job_scripts/17</JB_exec_file>
<JB_submission_time>1210592838</JB_submission_time>
<JB_owner>michael</JB_owner>
<JB_uid>200850</JB_uid>
<JB_group>staff</JB_group>
<JB_gid>10</JB_gid>
<JB_account>sge</JB_account>
<JB_merge_stderr>false</JB_merge_stderr>
<JB_mail_list>
<element>
<MR_user>michael</MR_user>
<MR_host>tuor</MR_host>
</element>
</JB_mail_list>
<JB_notify>false</JB_notify>
<JB_job_name>Sleeper</JB_job_name>
<JB_jobshare>0</JB_jobshare>
<JB_shell_list>
<path_list>
<PN_path>/bin/sh</PN_path>
<PN_host></PN_host>
<PN_file_host></PN_file_host>
<PN_file_staging>false</PN_file_staging>
</path_list>
</JB_shell_list>
<JB_env_list>
<job_sublist>
<VA_variable>__SGE_PREFIX__O_HOME</VA_variable>
<VA_value>/home/michael</VA_value>
</job_sublist>
<job_sublist>
<VA_variable>__SGE_PREFIX__O_LOGNAME</VA_variable>
<VA_value>michael</VA_value>
</job_sublist>
<job_sublist>
<VA_variable>__SGE_PREFIX__O_PATH</VA_variable>
<VA_value>/scratch2/michael/61u4/sol-amd64/bin/sol-amd64:/vol2/tools/SW/jdk1.5.0/sol-amd64/bin:/usr/pkg/bin:/usr/pkg/sbin:/opt/SUNWspro/bin:/vol2/tools/SW/sol-amd64/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/bin:.:/usr/sbin:/usr/ccs/bin</VA_value>
</job_sublist>
<job_sublist>
<VA_variable>__SGE_PREFIX__O_SHELL</VA_variable>
<VA_value>/bin/tcsh</VA_value>
</job_sublist>
<job_sublist>
<VA_variable>__SGE_PREFIX__O_TZ</VA_variable>
<VA_value>Europe/Berlin</VA_value>
</job_sublist>
<job_sublist>
<VA_variable>__SGE_PREFIX__O_MAIL</VA_variable>
<VA_value>/var/mail/michael</VA_value>
</job_sublist>
<job_sublist>
<VA_variable>__SGE_PREFIX__O_HOST</VA_variable>
<VA_value>tuor</VA_value>
</job_sublist>
<job_sublist>
<VA_variable>__SGE_PREFIX__O_WORKDIR</VA_variable>
<VA_value>/scratch2/michael/61u4/sol-amd64</VA_value>
</job_sublist>
</JB_env_list>
<JB_script_file>examples/jobs/sleeper.sh</JB_script_file>
<JB_ja_tasks>
<ulong_sublist>
<JAT_status>128</JAT_status>
<JAT_task_number>1</JAT_task_number>
</ulong_sublist>
</JB_ja_tasks>
<JB_deadline>0</JB_deadline>
<JB_execution_time>0</JB_execution_time>
<JB_checkpoint_attr>0</JB_checkpoint_attr>
<JB_checkpoint_interval>0</JB_checkpoint_interval>
<JB_reserve>false</JB_reserve>
<JB_mail_options>0</JB_mail_options>
<JB_priority>1024</JB_priority>
<JB_restart>0</JB_restart>
<JB_verify>0</JB_verify>
<JB_script_size>0</JB_script_size>
<JB_verify_suitable_queues>0</JB_verify_suitable_queues>
<JB_soft_wallclock_gmt>0</JB_soft_wallclock_gmt>
<JB_hard_wallclock_gmt>0</JB_hard_wallclock_gmt>
<JB_override_tickets>0</JB_override_tickets>
<JB_version>0</JB_version>
</qmaster_response>
</djob_info>
<messages>
<qmaster_response>
<SME_global_message_list>
<element>
<MES_message_number>87</MES_message_number>
<MES_message>There are no messages available</MES_message>
</element>
</SME_global_message_list>
</qmaster_response>
</messages>
</detailed_job_info>
