Skip to content

Instantly share code, notes, and snippets.

@flagranterror
Created February 15, 2012 22:00
Show Gist options
  • Save flagranterror/1839294 to your computer and use it in GitHub Desktop.
Save flagranterror/1839294 to your computer and use it in GitHub Desktop.
Quick and lazy RRDTool padding
#!/usr/bin/env ruby
# pad an RRD with 5-minute data covering 24 hours
# starting yesterday
time = Time.now.to_i - 86400
288.times do
time = time + 300
puts "rrdtool update test.rrd #{time}:#{rand(1..64)}"
system("rrdtool update test.rrd #{time}:#{rand(1..64)}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment