RRDXPORT(1) RRDtool RRDXPORT(1)
NNAAMMEE
rrdxport - Export data in XML format based on data from one or several
RRD
SSYYNNOOPPSSIISS
rrrrddttooooll xxppoorrtt [--ss|----ssttaarrtt _s_e_c_o_n_d_s] [--ee|----eenndd _s_e_c_o_n_d_s]
[--mm|----mmaaxxrroowwss _r_o_w_s] [----sstteepp _v_a_l_u_e] [DDEEFF::_v_n_a_m_e==_r_r_d::_d_s_-_n_a_m_e::_C_F]
[CCDDEEFF::_v_n_a_m_e==_r_p_n_-_e_x_p_r_e_s_s_i_o_n] [XXPPOORRTT::_v_n_a_m_e[::_l_e_g_e_n_d]]
DDEESSCCRRIIPPTTIIOONN
The xxppoorrtt functions main purpose is to write XML formatted
representation of the data stored in one or several RRRRDDs. It can also
extract numerical reports.
If no _X_P_O_R_T statements are found, there will be no output.
--ss|----ssttaarrtt _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.
--ee|----eenndd _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.
--mm|----mmaaxxrroowwss _r_o_w_s (default 400 rows)
This works like the --ww|----wwiiddtthh 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.
----sstteepp _v_a_l_u_e (default automatic)
See _r_r_d_g_r_a_p_h documentation.
DDEEFF::_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.
CCDDEEFF::_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.
XXPPOORRTT::_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.
OOuuttppuutt ffoorrmmaatt
The output is enclosed in a xxppoorrtt element and contains two blocks. The
first block is enclosed by a mmeettaa element and contains some meta data.
The second block is enclosed by a ddaattaa 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 (the values will depend on the RRD
characteristics):
1020611700
300
1020615600
14
2
The resulting data section:
10206117003.4000000000e+005.4400000000e+01
10206120003.4000000000e+005.4400000000e+01
10206123003.4000000000e+005.4400000000e+01
10206126003.4113333333e+005.4581333333e+01
10206129003.4000000000e+005.4400000000e+01
10206132003.4000000000e+005.4400000000e+01
10206135003.4000000000e+005.4400000000e+01
10206138003.4000000000e+005.4400000000e+01
10206141003.4000000000e+005.4400000000e+01
10206144003.4000000000e+005.4400000000e+01
10206147003.7333333333e+005.9733333333e+01
10206150003.4000000000e+005.4400000000e+01
10206153003.4000000000e+005.4400000000e+01
1020615600NaNNaN
EEXXAAMMPPLLEE 11
rrdtool xport \
DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
XPORT:out:"out bytes"
EEXXAAMMPPLLEE 22
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"
AAUUTTHHOORR
Tobias Oetiker
1.0.50 2004-01-17 RRDXPORT(1)