RRDGRAPH_DATA(1)                    rrdtool                   RRDGRAPH_DATA(1)



NNAAMMEE
       rrdgraph_data - preparing data for graphing in rrdtool graph

SSYYNNOOPPSSIISS
       DDEEFF::_<_v_n_a_m_e_>=_<_r_r_d_f_i_l_e_>:_<_d_s_-
       _n_a_m_e_>:_<_C_F_>[:step=_<_s_t_e_p_>][:start=_<_t_i_m_e_>][:end=_<_t_i_m_e_>][:reduce=_<_CC_FF_>]

       VVDDEEFF:_v_n_a_m_e=_R_P_N _e_x_p_r_e_s_s_i_o_n

       CCDDEEFF:_v_n_a_m_e=_R_P_N _e_x_p_r_e_s_s_i_o_n

DDEESSCCRRIIPPTTIIOONN
       These three instructions extract data values out of the RRRRDD files,
       optionally altering them (think, for example, of a bytes to bits con-
       version). If so desired, you can also define variables containing use-
       ful information such as maximum, minimum etcetera. Two of the instruc-
       tions use a language called RRPPNN which is described in its own manual
       page.

       Variable names (_v_n_a_m_e) must be made up strings of the following charac-
       ters "A-Z, a-z, 0-9, -,_" and a maximum length of 255 characters.

       When picking variable names, make sure you do not choose a name that is
       already taken by an RPN operator. A save bet it to use lowercase or
       mixedcase names for variables since operators will always be in upper-
       case.

DDEEFF
       DDEEFF::_<_v_n_a_m_e_>=_<_r_r_d_f_i_l_e_>:_<_d_s_-
       _n_a_m_e_>:_<_C_F_>[:step=_<_s_t_e_p_>][:start=_<_t_i_m_e_>][:end=_<_t_i_m_e_>][:reduce=_<_CC_FF_>]

       This command fetches data from an RRRRDD file.  The virtual name _v_n_a_m_e can
       then be used throughout the rest of the script. By default, an RRRRAA
       which contains the correct consolidated data at an appropriate resolu-
       tion will be chosen.  The resolution can be overridden with the --step
       option.  The resolution can again be overridden by specifying the sstteepp
       ssiizzee.  The time span of this data is the same as for the graph by
       default, you can override this by specifying ssttaarrtt aanndd eenndd.  Remember
       to escape colons in the time specification!

       If the resolution of the data is higher than the resolution of the
       graph, the data will be further consolidated. This may result in a
       graph that spans slightly more time than requested.  Ideally each point
       in the graph should correspond with one CCDDPP from an RRRRAA.  For instance,
       if your RRRRDD has an RRRRAA with a resolution of 1800 seconds per CCDDPP, you
       should create an image with width 400 and time span 400*1800 seconds
       (use appropriate start and end times, such as "--start
       end-8days8hours").

       If consolidation needs to be done, the CCFF of the RRRRAA specified in the
       DDEEFF itself will be used to reduce the data density. This behaviour can
       be changed using ":reduce=<CF>".  This optional parameter specifies the
       CCFF to use during the data reduction phase.

       Example:

               DEF:ds0=router.rrd:ds0:AVERAGE
               DEF:ds0weekly=router.rrd:ds0:AVERAGE:step=7200
               DEF:ds0weekly=router.rrd:ds0:AVERAGE:start=end-1h
               DEF:ds0weekly=router.rrd:ds0:AVERAGE:start=11\:00:end=start+1h

VVDDEEFF
       VVDDEEFF:_v_n_a_m_e=_R_P_N _e_x_p_r_e_s_s_i_o_n

       This command returns a value and/or a time according to the RRPPNN state-
       ments used. The resulting _v_n_a_m_e will, depending on the functions used,
       have a value and a time component.  When you use this _v_n_a_m_e in another
       RRPPNN expression, you are effectively inserting its value just as if you
       had put a number at that place.  The variable can also be used in the
       various graph and print elements.

       Example: "VDEF:avg=mydata,AVERAGE"

       Note that currently only agregation functions work in VDEF rpn expres-
       sions.  Patches to change this are welcome.

CCDDEEFF
       CCDDEEFF:_v_n_a_m_e=_R_P_N _e_x_p_r_e_s_s_i_o_n

       This command creates a new set of data points (in memory only, not in
       the RRRRDD file) out of one or more other data series. The RRPPNN instruc-
       tions are used to evaluate a mathematical function on each data point.
       The resulting _v_n_a_m_e can then be used further on in the script, just as
       if it were generated by a DDEEFF instruction.

       Example: "CDEF:mydatabits=mydata,8,*"

SSEEEE AALLSSOO
       rrdgraph gives an overview of how rrrrddttooooll ggrraapphh works.  rrdgraph_data
       describes DDEEFF,CCDDEEFF and VVDDEEFF in detail.  rrdgraph_rpn describes the RRPPNN
       language used in the ??DDEEFF statements.  rrdgraph_graph page describes
       all of the graph and print functions.

       Make sure to read rrdgraph_examples for tips&tricks.

AAUUTTHHOORR
       Program by Tobias Oetiker <tobi@oetiker.ch>

       This manual page by Alex van den Bogaerdt <alex@ergens.op.het.net>



1.3.1                             2008-03-15                  RRDGRAPH_DATA(1)
