[rrd-users] rrdxport issue version 1.3.8 on windows

Tobias Oetiker tobi at oetiker.ch
Mon Mar 29 18:24:47 CEST 2010


Hi Ykonuslu,

I have looked through the code and cant find how it is possible
that this sort of output gets generated ...

  printf("<%s>%lu</%s>", COL_TIME_TAG, ti, COL_TIME_TAG);

but you may want to try this:

--- src/rrd_tool.c      (revision 2042)
+++ src/rrd_tool.c      (working copy)
@@ -721,10 +721,10 @@
                    XML_ENCODING);
             printf("<%s>\n", ROOT_TAG);
             printf("  <%s>\n", META_TAG);
-            printf("    <%s>%lu</%s>\n", META_START_TAG,
-                   (unsigned long) start + step, META_START_TAG);
+            printf("    <%s>%lld</%s>\n", META_START_TAG,
+                   (long long int) start + step, META_START_TAG);
             printf("    <%s>%lu</%s>\n", META_STEP_TAG, step, META_STEP_TAG);
-            printf("    <%s>%lu</%s>\n", META_END_TAG, (unsigned long) end,
+            printf("    <%s>%lld</%s>\n", META_END_TAG, (long long int) end,
                    META_END_TAG);
             printf("    <%s>%lu</%s>\n", META_ROWS_TAG, row_cnt,
                    META_ROWS_TAG);
@@ -745,7 +745,7 @@
             printf("  <%s>\n", DATA_TAG);
             for (ti = start + step; ti <= end; ti += step) {
                 printf("    <%s>", DATA_ROW_TAG);
-                printf("<%s>%lu</%s>", COL_TIME_TAG, ti, COL_TIME_TAG);
+                printf("<%s>%lld</%s>", COL_TIME_TAG, (long long int)ti, COL_TIME_TAG);
                 for (j = 0; j < col_cnt; j++) {
                     rrd_value_t newval = DNAN;

cheers
tobi

Jan 4 ykonuslu wrote:

>
> Closing tag (</null>) of the time element looks wrong. Is this a known issue?
> I' m using prebuilt binaries of version 1.3.8 for windows.
>
> <xport>
>   <meta>
>     <start>1262565360</start>
>     <step>360</step>
>     <end>1262566440</end>
>     <rows>4</rows>
>     <columns>1</columns>
>     <legend>
>       <entry>input</entry>
>     </legend>
>   </meta>
>   <data>
>     <row><t>1262565360</(null)><v0>NaN</v0></row>
>     <row><t>1262565720</(null)><v0>7,8085350717e+003</v0></row>
>     <row><t>1262566080</(null)><v0>1,6887218817e+004</v0></row>
>     <row><t>1262566440</(null)><v0>2,3795068687e+004</v0></row>
>   </data>
> </xport>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-users mailing list