[GE issues] [Issue 2335] load_avg data missing from "qstat -f -xml"

rayson rayrayson at gmail.com
Sat Feb 13 01:58:31 GMT 2010


http://gridengine.sunsource.net/issues/show_bug.cgi?id=2335






------- Additional comments from rayson at sunsource.net Fri Feb 12 17:58:29 -0800 2010 -------
A simple fix:

Index: clients/qstat/qstat_xml.c
===================================================================
RCS file: /cvs/gridengine/source/clients/qstat/qstat_xml.c,v
retrieving revision 1.43
diff -C 4 -r1.43 qstat_xml.c
*** clients/qstat/qstat_xml.c   4 Sep 2009 11:30:14 -0000       1.43
--- clients/qstat/qstat_xml.c   13 Feb 2010 01:55:51 -0000
***************
*** 1014,1022 ****
     xml_append_Attr_I(attribute_list, "slots_resv", summary->resv_slots);
     xml_append_Attr_I(attribute_list, "slots_total", summary->total_slots);

     /* load avg */
!    if (summary->has_load_value && summary->has_load_value_from_object) {
        xml_append_Attr_D(attribute_list, "load_avg", summary->load_avg);
     }

     /* arch */
--- 1014,1022 ----
     xml_append_Attr_I(attribute_list, "slots_resv", summary->resv_slots);
     xml_append_Attr_I(attribute_list, "slots_total", summary->total_slots);

     /* load avg */
!    if (!summary->has_load_value && summary->has_load_value_from_object) {
        xml_append_Attr_D(attribute_list, "load_avg", summary->load_avg);
     }

     /* arch */

Now qstat -f XML displays the load information:

hccgalaxy:~> /tmp/s/source/LINUXAMD64_26/qstat -f -xml
<?xml version='1.0'?>
<job_info  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <queue_info>
    <Queue-List>
      <name>all.q at hccgalaxy</name>
      <qtype>BIP</qtype>
      <slots_used>0</slots_used>
      <slots_resv>0</slots_resv>
      <slots_total>4</slots_total>
      <load_avg>1.03000</load_avg>
      <arch>lx26-amd64</arch>
    </Queue-List>
  </queue_info>
  <job_info>
  </job_info>
</job_info>

While standard qstat misses it:

hccgalaxy:~> qstat -f -xml
<?xml version='1.0'?>
<job_info  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <queue_info>
    <Queue-List>
      <name>all.q at hccgalaxy</name>
      <qtype>BIP</qtype>
      <slots_used>0</slots_used>
      <slots_resv>0</slots_resv>
      <slots_total>4</slots_total>
      <arch>lx26-amd64</arch>
    </Queue-List>
  </queue_info>
  <job_info>
  </job_info>
</job_info>

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=36&dsMessageId=244499

To unsubscribe from this discussion, e-mail: [issues-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list