Created
February 15, 2012 22:00
-
-
Save flagranterror/1839294 to your computer and use it in GitHub Desktop.
Quick and lazy RRDTool padding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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