Tiny, tiny documentation fix -- Peter Valdemar Mørch
[rrdtool.git] / doc / rrdruby.pod
index f2aced8..c1c246e 100644 (file)
@@ -7,9 +7,8 @@ rrdruby - About the RRD Ruby bindings
  require "RRD"
  RRD.create(
     rrd,
-    "--start", "#{start - 1}",
     "--step", "300",
-        "DS:a:GAUGE:600:U:U",
+    "DS:a:GAUGE:600:U:U",
     "DS:b:GAUGE:600:U:U",
     "RRA:AVERAGE:0.5:1:300")
 
@@ -26,6 +25,11 @@ to the other B<rrdtool> documentation for functions and valid arguments.
 
  $: << '/path/to/rrdtool/lib/ruby/1.8/i386-linux'
  require "RRD" 
+
+ name = "test"
+ rrd = "#{name}.rrd"
+ start = Time.now.to_i
+
  RRD.create(    
     rrd,
     "--start", "#{start - 1}",
@@ -42,7 +46,7 @@ to the other B<rrdtool> documentation for functions and valid arguments.
  puts
 
  puts "fetching data from #{rrd}"
- (fstart, fend, data) = RRD.fetch(rrd, "--start", start.to_s, "--end", 
+ (fstart, fend, data, step) = RRD.fetch(rrd, "--start", start.to_s, "--end", 
       (start + 300 * 300).to_s, "AVERAGE")
  puts "got #{data.length} data points from #{fstart} to #{fend}"
  puts
@@ -65,9 +69,9 @@ to the other B<rrdtool> documentation for functions and valid arguments.
  puts
 
 If you use the B<--ruby-site-install> configure option you can drop the $:
-line since the rrdtool module will be found automatically.
+line since the RRDtool module will be found automatically.
 
-If rrdtool runs into trouble, it will throw an exception which you might
+If RRDtool runs into trouble, it will throw an exception which you might
 want to catch.
 
 =head1 SEE ALSO