[rrd-users] Newbie Question Storing Absolute Values versus Average

Guy Fleegman network.monger at gmail.com
Wed Jun 4 22:22:18 CEST 2008


Ok I see what you are saying.. I now understnad the difference between
the "heartbeat" and the step.... but it makes me pause to wonder...
Why are the values that i am telling it to be updated with not the
actual values showing up for that entry? (The appear to be less)
If I am sending an update of N:1:1:1  I would think that line would
show 1:1:1 in the dump... likewise.. .if I send in the next period
N:2:2:2
That I would have 2's appear.

Let's take your script as an example..... I changed it to increment
the a value each time...

#!/bin/bash

date "+%Y-%m-%d %T (%s)"

rrdtool create test3.rrd --start now --step 5 DS:in:GAUGE:120:U:U \
  DS:out:GAUGE:120:U:U DS:busyper:GAUGE:120:U:U RRA:LAST:0.5:1:60

echo created.
a=1
while true; do
  date "+%Y-%m-%d %T (%s)"
  rrdtool updatev test3.rrd N:$a:$a:$a
  echo $a
  sleep 1
  a=$((a+1))
done




here is the output.... why am I not getting entries that show the
whole values... it appears to be averaging.... I want it so if I send
an update of N:5:5:5
the values reflected are '5 5 5'

root at nagios:~/Desktop/testrrd# ./script.sh
2008-06-04 16:10:43 (1212610243)
created.
2008-06-04 16:10:43 (1212610243)
return_value = 0
1
2008-06-04 16:10:44 (1212610244)
return_value = 0
2
2008-06-04 16:10:45 (1212610245)
return_value = 0
[1212610245]RRA[LAST][1]DS[in] = 1.6794170000e+00
[1212610245]RRA[LAST][1]DS[out] = 1.6794170000e+00
[1212610245]RRA[LAST][1]DS[busyper] = 1.6794170000e+00
3
2008-06-04 16:10:46 (1212610246)
return_value = 0
4
2008-06-04 16:10:47 (1212610247)
return_value = 0
5
2008-06-04 16:10:48 (1212610248)
return_value = 0
6
2008-06-04 16:10:49 (1212610249)
return_value = 0
7
2008-06-04 16:10:50 (1212610250)
return_value = 0
[1212610250]RRA[LAST][1]DS[in] = 5.1567116000e+00
[1212610250]RRA[LAST][1]DS[out] = 5.1567116000e+00
[1212610250]RRA[LAST][1]DS[busyper] = 5.1567116000e+00
8
2008-06-04 16:10:51 (1212610251)
return_value = 0
9
2008-06-04 16:10:52 (1212610252)
return_value = 0
10
2008-06-04 16:10:53 (1212610253)
return_value = 0
11
2008-06-04 16:10:54 (1212610254)
return_value = 0
12
2008-06-04 16:10:55 (1212610255)
return_value = 0
[1212610255]RRA[LAST][1]DS[in] = 1.0128031000e+01
[1212610255]RRA[LAST][1]DS[out] = 1.0128031000e+01
[1212610255]RRA[LAST][1]DS[busyper] = 1.0128031000e+01



More information about the rrd-users mailing list