]> granicus.if.org Git - sysstat/commitdiff
Fixed some differences between XML output (as displayed by
authorSebastien Godard <sysstat@orange.fr>
Sun, 24 Oct 2010 19:27:40 +0000 (21:27 +0200)
committerSebastien Godard <sysstat@orange.fr>
Sun, 24 Oct 2010 19:27:40 +0000 (21:27 +0200)
sadf -x) and DTD document.

In the DTD document, cpu-frequency is defined as a list of cpufreq items.
But sadf -x outputs:

<cpu-frequency unit="MHz">
<cpu number="all" frequency="3000.00"/>
<cpu number="0" frequency="3000.00"/>
<cpu number="1" frequency="3000.00"/>
</cpu-frequency>

So replace cpu by cpufreq in sadf.c (we don't keep the name
"cpu" as it is already used in CPU statistics):

<cpu-frequency unit="MHz">
<cpufreq number="all" frequency="3000.00"/>
<cpufreq number="0" frequency="3000.00"/>
<cpufreq number="1" frequency="3000.00"/>
</cpu-frequency>

In the DTD document, fan-speed is defined as a list of fanspd items.
But sadf -x outputs:

<fan-speed unit="rpm">
<fan number="1" rpm="1869" drpm="1869" device="dme1737-i2c-1-2e"/>
<fan number="2" rpm="1136" drpm="1136" device="dme1737-i2c-1-2e"/>
<fan number="3" rpm="0" drpm="0" device="dme1737-i2c-1-2e"/>
</fan-speed>

The name "word" can be kept here, so replace fanspd by fan in DTD document.

Note that XSD document is correct.

CHANGES
prf_stats.c
xml/sysstat.dtd

diff --git a/CHANGES b/CHANGES
index 23866d8fd4a2861b5d59bffca33e7edcf4a02656..fc6eb821ab3d227474ae45b6f6ee50e8119465e0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,8 @@ xxxx/xx/xx: Version 9.1.6 - Sebastien Godard (sysstat <at> orange.fr)
          the whole file.
        * Added CPU average clock frequency statistics to sar and sadc.
        * Added hugepages utilization statistics to sar and sadc.
+       * Fixed some differences between XML output (as displayed by
+         sadf -x) and DTD document.
        * [Ivana Varekova]: Moved manual pages to $prefix/share/man
          instead of $prefix/man.
        * [Ivana Varekova]: Fixed configure's --disable-man-group option.
index e79fb306be31f9d1448eb5101233ac954ec7b22a..44d9f4d37c11d248fc087cf857a33feeed19e1e4 100644 (file)
@@ -4110,7 +4110,7 @@ __print_funct_t xml_print_pwr_cpufreq_stats(struct activity *a, int curr, int ta
                                sprintf(cpuno, "%d", i - 1);
                        }
                        
-                       xprintf(tab, "<cpu number=\"%s\" "
+                       xprintf(tab, "<cpufreq number=\"%s\" "
                                "frequency=\"%.2f\"/>",
                                cpuno,
                                ((double) spc->cpufreq) / 100);
index 32a6eb3d5c194d55bf8dcf4fc913b33dc453f3c4..58130f523ff4225d79725aaed80683bd218a77d5 100644 (file)
        number CDATA #REQUIRED
        weighted-frequency CDATA #REQUIRED
 >
-<!ELEMENT fan-speed (fanspd+)>
+<!ELEMENT fan-speed (fan+)>
 <!ATTLIST fan-speed
        unit CDATA #REQUIRED
 >
-<!ELEMENT fanspd EMPTY>
-<!ATTLIST fanspd
+<!ELEMENT fan EMPTY>
+<!ATTLIST fan
        number CDATA #REQUIRED
        rpm CDATA #REQUIRED
        drpm CDATA #REQUIRED