We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take this file:
require 'rrd' rrd = RRD::Base.new("test.rrd") time = Time.now.to_i / 300 * 300 rrd.create!(start: time, step: 5.minutes) do datasource "foo", type: :gauge, heartbeat: 10.minutes, min: 0.0, max: 1000000000.0 archive :max, every: 5.minutes, during: (5*115200).minutes end rrd.update(time, 500) rrd.update(time + 300, 600) rrd.update(time + 600, 700) puts "#{time} to #{time + 600}" rrd.fetch!(:max, start: time, end: time + 600).each do |row| puts row.join("\t") end
Compare its output with the command-line tool:
$ ruby test.rb 1392837600 to 1392838200 time foo 1392837600 600.0 1392837900 700.0 1392838200 NaN $ rrdtool fetch test.rrd MAX -s 1392837600 -e 1392838200 foo 1392837900: 6,0000000000e+02 1392838200: 7,0000000000e+02 1392838500: -nan
All time values returned by #fetch are smaller by the value of step.
#fetch
The text was updated successfully, but these errors were encountered:
Have the same, all values are shifted by one.
Sorry, something went wrong.
No branches or pull requests
Take this file:
Compare its output with the command-line tool:
All time values returned by
#fetch
are smaller by the value of step.The text was updated successfully, but these errors were encountered: