Code

Imported upstream version 1.3.8.
[pkg-rrdtool.git] / doc / rrdgraph_data.html
index 8551d434034c34b1544456c3571e8c8c64936673..7348df4c2cd5c2629929d74f6061731fa3d019de 100644 (file)
@@ -9,8 +9,10 @@
 
 <body style="background-color: white">
 
-<p><a name="__index__"></a></p>
+
 <!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
 <!--
 
 <ul>
        <li><a href="#def">DEF</a></li>
        <li><a href="#vdef">VDEF</a></li>
        <li><a href="#cdef">CDEF</a></li>
+       <li><a href="#about_cdef_versus_vdef">About CDEF versus VDEF</a></li>
+       <ul>
+
+               <li><a href="#when_do_you_use_vdef_versus_cdef">When do you use <strong>VDEF</strong> versus <strong>CDEF</strong>?</a></li>
+       </ul>
+
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
+
 -->
+
+
+</div>
 <!-- INDEX END -->
 
 <p>
@@ -114,6 +126,31 @@ the script, just as if it were generated by a <strong>DEF</strong> instruction.<
 <p>
 </p>
 <hr />
+<h1><a name="about_cdef_versus_vdef">About CDEF versus VDEF</a></h1>
+<p>At some point in processing, <strong>RRDtool</strong> has gathered an array of rates
+ready to display.</p>
+<p><strong>CDEF</strong> works on such an array.  For example, <em>CDEF:new=ds0,8,*</em>
+would multiply each of the array members by eight (probably
+transforming bytes into bits). The result is an array containing the
+new values.</p>
+<p><strong>VDEF</strong> also works on such an array but in a different way.  For
+example, <em>VDEF:max=ds0,MAXIMUM</em> would scan each of the array members
+and store the maximum value.</p>
+<p>
+</p>
+<h2><a name="when_do_you_use_vdef_versus_cdef">When do you use <strong>VDEF</strong> versus <strong>CDEF</strong>?</a></h2>
+<p>Use <strong>CDEF</strong> to transform your data prior to graphing.  In the above
+example, we'd use a <strong>CDEF</strong> to transform bytes to bits before
+graphing the bits.</p>
+<p>You use a <strong>VDEF</strong> if you want <em>max(1,5,3,2,4)</em> to return five which
+would be displayed in the graph's legend (to answer, what was the
+maximum value during the graph period).</p>
+<p>If you want to apply 'complex' operations to the result of a VDEF you have
+to use a CDEF again since VDEFs only look like RPN expressions, they aren't
+realy.</p>
+<p>
+</p>
+<hr />
 <h1><a name="see_also">SEE ALSO</a></h1>
 <p><a href="././rrdgraph.html">the rrdgraph manpage</a> gives an overview of how <strong>rrdtool graph</strong> works.
 <a href="././rrdgraph_data.html">the rrdgraph_data manpage</a> describes <strong>DEF</strong>,<strong>CDEF</strong> and <strong>VDEF</strong> in detail.