4

I am playing with MRTG and I configure it to use RRD to record the performance data (which is a switch interface byte counter). When I use "rrdtool info" to check the RRD file, I see that ds[ds0].last_ds is a number and it changes everytime the new data is inputted

# rrdtool info 10.0.3.129_24_bw.rrd
filename = "10.0.3.129_24_bw.rrd"
rrd_version = "0003"
step = 60
last_update = 1482950882
header_size = 2912
ds[ds0].index = 0
ds[ds0].type = "COUNTER"
ds[ds0].minimal_heartbeat = 600
ds[ds0].min = 0.0000000000e+00
ds[ds0].max = 1.2500000000e+08
ds[ds0].last_ds = "6332648954"
ds[ds0].value = 3.5016393443e+01
ds[ds0].unknown_sec = 0
ds[ds1].index = 1
ds[ds1].type = "COUNTER"
ds[ds1].minimal_heartbeat = 600
ds[ds1].min = 0.0000000000e+00
ds[ds1].max = 1.2500000000e+08
ds[ds1].last_ds = "32104385407"
ds[ds1].value = 5.3344262295e+01
ds[ds1].unknown_sec = 0

What is it exactly? Thanks!

Difan Zhao
  • 379
  • 6
  • 20

1 Answers1

5

last_ds is the last received value of the DS, prior to calculation of Rate, at last_update time. When a new update comes in with a new DS value, this is used to create the new value for the update interval new_value = ( new_ds - last_ds ) / ( current_time - last_update ) and this is then assigned to one (or more) Intervals (according to Data Normalisation) in order to be able to set values in the various RRAs.

last_ds is different from value as it is before rate calculations and normalisation.

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39
  • Thank you Steve as always! I clearly misunderstood that the "counter" type would be actual the delta... I thought that it would be the same as the "snmp counter".. Now I understand! Thank you! – Difan Zhao Dec 31 '16 at 05:44