Cacti (home)ForumsDocumentation

Differences

This shows you the differences between two versions of the page.

manual:087:7_examples [2010/02/21 17:31]
gandalf created
manual:087:7_examples [2019/10/29 15:16] (current)
Line 39: Line 39:
 This way, the graphs y-axis will automatically adjust for the range of values displayed. The common drawback is, that you will have to pay attention for the current y-axis scale, because it "jumps" from low to high values. This way, the graphs y-axis will automatically adjust for the range of values displayed. The common drawback is, that you will have to pay attention for the current y-axis scale, because it "jumps" from low to high values.
  
-==== Using an Upper Limit ====+===== Using an Upper Limit =====
  
 In order to define the same y-axis dimensions for a graph template, In order to define the same y-axis dimensions for a graph template,
Line 61: Line 61:
 {{:manual:087:upper-limit.png|Upper Limit, when limit is not exceeded by data}} {{:manual:087:upper-limit.png|Upper Limit, when limit is not exceeded by data}}
  
-=== Data exceeds given Limit ===+==== Data exceeds given Limit ====
  
-The following example uses the same graph configuration. But the data was tweaked to excee the given limit. You will notice, that rrdtool automatically extends the y-axis despite the given --uper-limit!+The following example uses the same graph configuration. But the data was tweaked to exceed the given limit. You will notice, that rrdtool automatically extends the y-axis despite the given --upper-limit!
  
 **Example:** **Example:**
Line 80: Line 80:
 {{:manual:087:upper-limit-exceed.png|Upper Limit, when limit **IS** exceeded by data}} {{:manual:087:upper-limit-exceed.png|Upper Limit, when limit **IS** exceeded by data}}
  
 +==== Data exceeds given Limit, Capped ====
  
-==== Graphing Negative Values ====+The following example uses the same graph configuration; data tweaked to exceed the given limit. Now we use 
 +  * check **Auto Scale** 
 +  * select **--alt-autoscale-min (accepting an upper limit, requires rrdtool 1.2.x)** 
 +  * define a numeric value for **upper limit**. e.g. 2 
 +  * check **Rigid Boundaries Mode (--rigid)**
  
 +**Example:**
 +<code>/usr/bin/rrdtool graph - \
 +--imgformat=PNG \
 +--end=now \
 +--start=end-150000 \
 +--title="Upper Limit" \
 +--alt-autoscale-min \
 +--upper-limit=2 \
 +--rigid \
 +--slope-mode \
 +DEF:a="test.rrd":test:AVERAGE \
 +CDEF:sine=a,POP,NOW,TIME,-,10000,/,SIN,3,* \
 +LINE1:sine#0000ff:sine</code>
 +
 +{{:manual:087:upper-limit-exceed-capped.png|Upper Limit, capped, when limit **IS** exceeded by data}}
 +
 +**Notice**:\\ Please note, that the upper y-axis is capped only, as we use **--upper-limit**
 +
 +
 +===== Graphing Data with a Small Standard Deviation =====
 +
 +Sometimes, the automatic scaling of y-axis fails.
 +
 +**Example:**
 +<code>/usr/bin/rrdtool graph - \
 +--imgformat=PNG \
 +--end=now \
 +--start=end-150000 \
 +--title="Small Standarddeviation" \
 +--slope-mode \
 +DEF:a="test.rrd":test:AVERAGE \
 +CDEF:sine=a,POP,NOW,TIME,-,10000,/,SIN,1000,+ \
 +LINE1:sine#0000ff:sine</code>
 +
 +{{:manual:087:small-stddev.png|Small Standarddeviation using defaults}}
 +
 +==== Using --alt-autoscale ====
 +
 +In this case, using --alt-autoscale helps:
 +**Example:**
 +<code>/usr/bin/rrdtool graph - \
 +--imgformat=PNG \
 +--end=now \
 +--start=end-150000 \
 +--title="Small Standarddeviation using Autoscale" \
 +--alt-autoscale \
 +--slope-mode \
 +DEF:a="test.rrd":test:AVERAGE \
 +CDEF:sine=a,POP,NOW,TIME,-,10000,/,SIN,1000,+ \
 +LINE1:sine#0000ff:sine</code>
 +
 +{{:manual:087:small-stddev-autoscale.png|Small Standarddeviation using --alt-autoscale}}
 +
 +That indeed looks better. But you can't judge from this graph, how big the amplitude of the sine is.
 +
 +==== Using --alt-autoscale and --alt-y-grid ====
 +
 +Using the alternate grid (--alt-y-grid) solves this problem.
 +
 +**Example:**
 +<code>/usr/bin/rrdtool graph - \
 +--imgformat=PNG \
 +--end=now \
 +--start=end-150000 \
 +--title="Small Stddev using Autoscale and --alt-y-grid" \
 +--alt-autoscale \
 +--alt-y-grid \
 +--slope-mode \
 +DEF:a="test.rrd":test:AVERAGE \
 +CDEF:sine=a,POP,NOW,TIME,-,10000,/,SIN,1000,+ \
 +LINE1:sine#0000ff:sine</code>
  
-==== Graphing Data with a Small Standard Deviation ====+{{:manual:087:small-stddev-autoscale-alt-y-grid.png|Using --alt-y-grid to adjust y-axis}}





Personal Tools