RRDXPORT(1)                         rrdtool                        RRDXPORT(1)



[1mNAME[0m
       rrdtool xport - Export data in XML format based on data from one or
       several RRD

[1mSYNOPSIS[0m
       [1mrrdtool xport [22m[[1m-s[22m|[1m--start [4m[22mseconds[24m] [[1m-e[22m|[1m--end [4m[22mseconds[24m]
       [[1m-m[22m|[1m--maxrows [4m[22mrows[24m] [[1m--step [4m[22mvalue[24m] [[1mDEF:[4m[22mvname[24m[1m=[4m[22mrrd[24m[1m:[4m[22mds-name[24m[1m:[4m[22mCF[24m]
       [[1mCDEF:[4m[22mvname[24m[1m=[4m[22mrpn-expression[24m] [[1mXPORT:[4m[22mvname[24m[[1m:[4m[22mlegend[24m]]

[1mDESCRIPTION[0m
       The [1mxport [22mfunctions main purpose is to write XML formatted representa-
       tion of the data stored in one or several [1mRRD[22ms. It can also extract
       numerical reports.

       If no [4mXPORT[24m statements are found, there will be no output.

       [1m-s[22m|[1m--start [4m[22mseconds[24m (default end-1day)
           The time when the exported range should begin. Time in seconds
           since epoch (1970-01-01) is required. Negative numbers are relative
           to the current time. By default one day worth of data will be
           printed.  See also AT-STYLE TIME SPECIFICATION section in the [4mrrd-[0m
           [4mfetch[24m documentation for a detailed explanation on how to specify
           time.

       [1m-e[22m|[1m--end [4m[22mseconds[24m (default now)
           The time when the exported range should end. Time in seconds since
           epoch.  See also AT-STYLE TIME SPECIFICATION section in the [4mrrd-[0m
           [4mfetch[24m documentation for a detailed explanation of ways to specify
           time.

       [1m-m[22m|[1m--maxrows [4m[22mrows[24m (default 400 rows)
           This works like the [1m-w[22m|[1m--width [22mparameter of [4mrrdgraph[24m.  In fact it
           is exactly the same, but the parameter was renamed to describe its
           purpose in this module. See [4mrrdgraph[24m documentation for details.

       [1m--step [4m[22mvalue[24m (default automatic)
           See [4mrrdgraph[24m documentation.

       [1mDEF:[4m[22mvname[24m[1m=[4m[22mrrd[24m[1m:[4m[22mds-name[24m[1m:[4m[22mCF[0m
           See [4mrrdgraph[24m documentation.

       [1mCDEF:[4m[22mvname[24m[1m=[4m[22mrpn-expression[0m
           See [4mrrdgraph[24m documentation.

       [1mXPORT:[4m[22mvname[24m[1m::[4m[22mlegend[0m
           At least one [4mXPORT[24m statement should be present. The values refer-
           enced by [4mvname[24m are printed. Optionally add a legend.

       [1mOutput format[0m

       The output is enclosed in a [1mxport [22melement and contains two blocks. The
       first block is enclosed by a [1mmeta [22melement and contains some meta data.
       The second block is enclosed by a [1mdata [22melement and contains the data
       rows.

       Let's assume that the [4mxport[24m command looks like this:

         rrdtool xport \
                 --start now-1h --end now \
                 DEF:xx=host-inout.lo.rrd:output:AVERAGE \
                 DEF:yy=host-inout.lo.rrd:input:AVERAGE \
                 CDEF:aa=xx,yy,+,8,* \
                 XPORT:xx:"out bytes" \
                 XPORT:aa:"in and out bits"

       The resulting meta data section (the values will depend on the RRD
       characteristics):

         <meta>
           <start>1020611700</start>
           <step>300</step>
           <end>1020615600</end>
           <rows>14</rows>
           <columns>2</columns>
           <legend>
             <entry>out bytes</entry>
             <entry>in and out bits</entry>
           </legend>
         </meta>

       The resulting data section:

         <data>
           <row><t>1020611700</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020612000</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020612300</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020612600</t><v>3.4113333333e+00</v><v>5.4581333333e+01</v></row>
           <row><t>1020612900</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020613200</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020613500</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020613800</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020614100</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020614400</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020614700</t><v>3.7333333333e+00</v><v>5.9733333333e+01</v></row>
           <row><t>1020615000</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020615300</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
           <row><t>1020615600</t><v>NaN</v><v>NaN</v></row>
         </data>

[1mEXAMPLE 1[0m
         rrdtool xport \
                 DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
                 XPORT:out:"out bytes"

[1mEXAMPLE 2[0m
         rrdtool xport \
                 DEF:out1=if1-inouts.rrd:outoctets:AVERAGE \
                 DEF:out2=if2-inouts.rrd:outoctets:AVERAGE \
                 CDEF:sum=out1,out2,+ \
                 XPORT:out1:"if1 out bytes" \
                 XPORT:out2:"if2 out bytes" \
                 XPORT:sum:"output sum"

[1mAUTHOR[0m
       Tobias Oetiker <oetiker@ee.ethz.ch>



1.0.41                            2002-05-29                       RRDXPORT(1)
