RRDtool
rrdxportSYNOPSISrrdtool xport [sstart seconds] [eend seconds] [mmaxrows rows] [step value] [json] [tshowtime] [enumds] [daemond address] [DEF:vname=rrd:dsname:CF] [CDEF:vname=rpnexpression] [XPORT:vname[:legend]] DESCRIPTIONThe xport function's main purpose is to write an XML formatted representation of the data stored in one or several RRDs. It can also extract numerical reports. If no XPORT statements are found, there will be no output.
OUTPUT FORMATThe output is enclosed in an xport element and contains two blocks. The first block is enclosed by a meta element and contains some meta data. The second block is enclosed by a data element and contains the data rows. Let's assume that the xport command looks like this: rrdtool xport \ start now1h end now \ DEF:xx=hostinout.lo.rrd:output:AVERAGE \ DEF:yy=hostinout.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> All the statistics in the output will use the same step. The first sample will be the first sample starting at or immediately after start. The last sample will be the one ending at or immediately after end. Each sample has a timestamp and one or more values. The timestamps associated with a value in RRDtool ALWAYS represent the time the sample was taken. Since any value you sample will represent some sort of past state your sampling apparatus has gathered, the timestamp will always be at the end of the sampling period. RRDtool does not store the actual samples, but does internal resampling of the values presented to it. Nevertheless when a data value is presented with a single timestamp the timestamp is at the end of the period the value represents. Note that the timestamp itself is outside the period the sample is valid for. For more details about this, see PDP calculation explanation. So the time range for a sample with a timestamp is actually from The first line of the sample output: <row><t>1020611700</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row> therefore means that the values for the interval 1020611700 to 1020611999 were 3.4 and 54.4 for "out bytes" and "in and out bits" respectively, as if the value was taken at 1020612000. EXAMPLE 1rrdtool xport \ DEF:out=if1inouts.rrd:outoctets:AVERAGE \ XPORT:out:"out bytes" EXAMPLE 2rrdtool xport \ DEF:out1=if1inouts.rrd:outoctets:AVERAGE \ DEF:out2=if2inouts.rrd:outoctets:AVERAGE \ CDEF:sum=out1,out2,+ \ XPORT:out1:"if1 out bytes" \ XPORT:out2:"if2 out bytes" \ XPORT:sum:"output sum" ENVIRONMENT VARIABLESThe following environment variables may be used to change the behavior of
AUTHORTobias Oetiker <tobi@oetiker.ch> 

02/04/2019  Tobias Oetiker  OETIKER+PARTNER AG

NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox or Opera but also Apple's Safari or KDE's Konqueror for example. It may also be that you are looking at a mirror page which did not copy the CSS for this page. Or if some pictu res are missing, then the mirror may not have picked up the contents of the inc directory.