1 RRDGRAPH_DATA(1) rrdtool RRDGRAPH_DATA(1)
6 rrdgraph_data - preparing data for graphing in rrdtool graph
9 D\bDE\bEF\bF:\b:_\b<_\bv_\bn_\ba_\bm_\be_\b>=_\b<_\br_\br_\bd_\bf_\bi_\bl_\be_\b>:_\b<_\bd_\bs_\b-_\bn_\ba_\bm_\be_\b>:_\b<_\bC_\bF_\b>[:step=_\b<_\bs_\bt_\be_\bp_\b>][:start=_\b<_\bt_\bi_\bm_\be_\b>][:end=_\b<_\bt_\bi_\bm_\be_\b>][:reduce=_\b<_\bC\bC_\bF\bF_\b>]
17 optionally altering them (think, for example, of a bytes to bits
18 conversion). If so desired, you can also define variables containing
19 useful information such as maximum, minimum etcetera. Two of the
21 manual page.
24 characters "A-Z, a-z, 0-9, -,_" and a maximum length of 255 characters.
26 When picking variable names, make sure you do not choose a name that is
27 already taken by an RPN operator. A safe bet it to use lowercase or
28 mixedcase names for variables since operators will always be in
29 uppercase.
32 D\bDE\bEF\bF:\b:_\b<_\bv_\bn_\ba_\bm_\be_\b>=_\b<_\br_\br_\bd_\bf_\bi_\bl_\be_\b>:_\b<_\bd_\bs_\b-_\bn_\ba_\bm_\be_\b>:_\b<_\bC_\bF_\b>[:step=_\b<_\bs_\bt_\be_\bp_\b>][:start=_\b<_\bt_\bi_\bm_\be_\b>][:end=_\b<_\bt_\bi_\bm_\be_\b>][:reduce=_\b<_\bC\bC_\bF\bF_\b>]
36 which contains the correct consolidated data at an appropriate
37 resolution will be chosen. The resolution can be overridden with the
38 --step option. The resolution can again be overridden by specifying
41 Remember to escape colons in the time specification!
43 If the resolution of the data is higher than the resolution of the
44 graph, the data will be further consolidated. This may result in a
45 graph that spans slightly more time than requested. Ideally each point
48 should create an image with width 400 and time span 400*1800 seconds
49 (use appropriate start and end times, such as "--start
50 end-8days8hours").
57 Example:
59 DEF:ds0=router.rrd:ds0:AVERAGE
60 DEF:ds0weekly=router.rrd:ds0:AVERAGE:step=7200
61 DEF:ds0weekly=router.rrd:ds0:AVERAGE:start=end-1h
62 DEF:ds0weekly=router.rrd:ds0:AVERAGE:start=11\:00:end=start+1h
71 if you had put a number at that place. The variable can also be used
72 in the various graph and print elements.
74 Example: "VDEF:avg=mydata,AVERAGE"
76 Note that currently only aggregation functions work in VDEF rpn
77 expressions. Patches to change this are welcome.
82 This command creates a new set of data points (in memory only, not in
84 instructions are used to evaluate a mathematical function on each data
88 Example: "CDEF:mydatabits=mydata,8,*"
92 ready to display.
94 C\bCD\bDE\bEF\bF works on such an array. For example, _\bC_\bD_\bE_\bF_\b:_\bn_\be_\bw_\b=_\bd_\bs_\b0_\b,_\b8_\b,_\b* would
95 multiply each of the array members by eight (probably transforming
96 bytes into bits). The result is an array containing the new values.
99 _\bV_\bD_\bE_\bF_\b:_\bm_\ba_\bx_\b=_\bd_\bs_\b0_\b,_\bM_\bA_\bX_\bI_\bM_\bU_\bM would scan each of the array members and store the
100 maximum value.
102 W\bWh\bhe\ben\bn d\bdo\bo y\byo\bou\bu u\bus\bse\be V\bVD\bDE\bEF\bF v\bve\ber\brs\bsu\bus\bs C\bCD\bDE\bEF\bF?\b?
105 bits.
107 You use a V\bVD\bDE\bEF\bF if you want _\bm_\ba_\bx_\b(_\b1_\b,_\b5_\b,_\b3_\b,_\b2_\b,_\b4_\b) to return five which would be
108 displayed in the graph's legend (to answer, what was the maximum value
109 during the graph period).
111 If you want to apply 'complex' operations to the result of a VDEF you
112 have to use a CDEF again since VDEFs only look like RPN expressions,
113 they aren't realy.
116 rrdgraph gives an overview of how r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh works. rrdgraph_data
117 describes D\bDE\bEF\bF,C\bCD\bDE\bEF\bF and V\bVD\bDE\bEF\bF in detail. rrdgraph_rpn describes the R\bRP\bPN\bN
119 all of the graph and print functions.
121 Make sure to read rrdgraph_examples for tips&tricks.
124 Program by Tobias Oetiker <tobi@oetiker.ch>
126 This manual page by Alex van den Bogaerdt <alex@vandenbogaerdt.nl> with
127 corrections and/or additions by several people
131 1.3.8 2009-04-29 RRDGRAPH_DATA(1)