


     RRRRRRRRDDDDXXXXPPPPOOOORRRRTTTT((((1111))))            1111....2222....11113333 ((((2222000000006666----00005555----00004444))))            RRRRRRRRDDDDXXXXPPPPOOOORRRRTTTT((((1111))))



     NNNNAAAAMMMMEEEE
          rrdxport - Export data in XML format based on data from one
          or several RRD

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
          rrrrrrrrddddttttoooooooollll xxxxppppoooorrrrtttt [----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s] [----eeee|--------eeeennnndddd _s_e_c_o_n_d_s]
          [----mmmm|--------mmmmaaaaxxxxrrrroooowwwwssss _r_o_w_s] [--------sssstttteeeepppp _v_a_l_u_e] [DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s-
          _n_a_m_e::::_C_F] [CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n-_e_x_p_r_e_s_s_i_o_n] [XXXXPPPPOOOORRRRTTTT::::_v_n_a_m_e[::::_l_e_g_e_n_d]]

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
          The xxxxppppoooorrrrtttt function's main purpose is to write an XML
          formatted representation of the data stored in one or
          several RRRRRRRRDDDDs. It can also extract numerical reports.

          If no _X_P_O_R_T statements are found, there will be no output.

          -ssss|--ssssttttaaaarrrrtttt _s_e_c_o_n_d_s (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 _r_r_d_f_e_t_c_h documentation
              for a detailed explanation on how to specify time.

          -eeee|--eeeennnndddd _s_e_c_o_n_d_s (default now)
              The time when the exported range should end. Time in
              seconds since epoch.  See also AT-STYLE TIME
              SPECIFICATION section in the _r_r_d_f_e_t_c_h documentation for
              a detailed explanation of ways to specify time.

          -mmmm|--mmmmaaaaxxxxrrrroooowwwwssss _r_o_w_s (default 400 rows)
              This works like the ----wwww|--------wwwwiiiiddddtttthhhh parameter of _r_r_d_g_r_a_p_h.
              In fact it is exactly the same, but the parameter was
              renamed to describe its purpose in this module. See
              _r_r_d_g_r_a_p_h documentation for details.

          --sssstttteeeepppp _v_a_l_u_e (default automatic)
              See rrdgraph documentation.

          DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s-_n_a_m_e::::_C_F
              See _r_r_d_g_r_a_p_h documentation.

          CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n-_e_x_p_r_e_s_s_i_o_n
              See _r_r_d_g_r_a_p_h documentation.

          XXXXPPPPOOOORRRRTTTT::::_v_n_a_m_e::::::::_l_e_g_e_n_d
              At least one _X_P_O_R_T statement should be present. The
              values referenced by _v_n_a_m_e are printed. Optionally add a
              legend.

     OOOOuuuuttttppppuuuutttt ffffoooorrrrmmmmaaaatttt
          The output is enclosed in an xxxxppppoooorrrrtttt element and contains two



     Page 1                                          (printed 6/13/06)






     RRRRRRRRDDDDXXXXPPPPOOOORRRRTTTT((((1111))))            1111....2222....11113333 ((((2222000000006666----00005555----00004444))))            RRRRRRRRDDDDXXXXPPPPOOOORRRRTTTT((((1111))))



          blocks. The first block is enclosed by a mmmmeeeettttaaaa element and
          contains some meta data. The second block is enclosed by a
          ddddaaaattttaaaa element and contains the data rows.

          Let's assume that the _x_p_o_r_t 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 is (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 is:

            <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>

     EEEEXXXXAAAAMMMMPPPPLLLLEEEE 1111
            rrdtool xport \
                    DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
                    XPORT:out:"out bytes"



     Page 2                                          (printed 6/13/06)






     RRRRRRRRDDDDXXXXPPPPOOOORRRRTTTT((((1111))))            1111....2222....11113333 ((((2222000000006666----00005555----00004444))))            RRRRRRRRDDDDXXXXPPPPOOOORRRRTTTT((((1111))))



     EEEEXXXXAAAAMMMMPPPPLLLLEEEE 2222
            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"

     AAAAUUUUTTTTHHHHOOOORRRR
          Tobias Oetiker <tobi@oetiker.ch>












































     Page 3                                          (printed 6/13/06)



