338b264d71437403d3ea7e7583e109d8ebc596d6
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-
10 _\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>]
18 optionally altering them (think, for example, of a bytes to bits con-
19 version). If so desired, you can also define variables containing use-
20 ful information such as maximum, minimum etcetera. Two of the instruc-
22 page.
25 ters "A-Z, a-z, 0-9, -,_" and a maximum length of 255 characters.
27 When picking variable names, make sure you do not choose a name that is
28 already taken by an RPN operator. A safe bet it to use lowercase or
29 mixedcase names for variables since operators will always be in upper-
30 case.
33 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-
34 _\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>]
38 which contains the correct consolidated data at an appropriate resolu-
39 tion will be chosen. The resolution can be overridden with the --step
42 default, you can override this by specifying s\bst\bta\bar\brt\bt a\ban\bnd\bd e\ben\bnd\bd. Remember
43 to escape colons in the time specification!
45 If the resolution of the data is higher than the resolution of the
46 graph, the data will be further consolidated. This may result in a
47 graph that spans slightly more time than requested. Ideally each point
50 should create an image with width 400 and time span 400*1800 seconds
51 (use appropriate start and end times, such as "--start
52 end-8days8hours").
56 be changed using ":reduce=<CF>". This optional parameter specifies the
59 Example:
61 DEF:ds0=router.rrd:ds0:AVERAGE
62 DEF:ds0weekly=router.rrd:ds0:AVERAGE:step=7200
63 DEF:ds0weekly=router.rrd:ds0:AVERAGE:start=end-1h
64 DEF:ds0weekly=router.rrd:ds0:AVERAGE:start=11\:00:end=start+1h
73 had put a number at that place. The variable can also be used in the
74 various graph and print elements.
76 Example: "VDEF:avg=mydata,AVERAGE"
78 Note that currently only aggregation functions work in VDEF rpn expres-
79 sions. Patches to change this are welcome.
84 This command creates a new set of data points (in memory only, not in
86 tions are used to evaluate a mathematical function on each data point.
90 Example: "CDEF:mydatabits=mydata,8,*"
94 ready to display.
96 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 mul-
97 tiply each of the array members by eight (probably transforming bytes
98 into bits). The result is an array containing the new values.
101 _\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
102 maximum value.
104 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?
108 bits.
110 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
111 displayed in the graph's legend (to answer, what was the maximum value
112 during the graph period).
114 If you want to apply 'complex' operations to the result of a VDEF you
115 have to use a CDEF again since VDEFs only look like RPN expressions,
116 they aren't realy.
119 rrdgraph gives an overview of how r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh works. rrdgraph_data
120 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
122 all of the graph and print functions.
124 Make sure to read rrdgraph_examples for tips&tricks.
127 Program by Tobias Oetiker <tobi@oetiker.ch>
129 This manual page by Alex van den Bogaerdt <alex@vandenbogaerdt.nl> with
130 corrections and/or additions by several people
134 1.3.99909060808 2009-04-29 RRDGRAPH_DATA(1)