picar / pyrrd

Automatically exported from code.google.com/p/pyrrd
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

RRD.info() does not return data when non-keyword mode is passed #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

This provides expected output.
  $rrdtool info example5.rrd
  filename = "example5.rrd"
  rrd_version = "0003"
  step = 1
  last_update = 1298944000
  ds[ds_in_bps].type = "COUNTER"
  ds[ds_in_bps].minimal_heartbeat = 6
  ...

However pyrrd does not.
  >>> from pyrrd.rrd import DataSource, RRA, RRD
  >>> from pyrrd.backend import bindings
  >>> 
  >>> os.path.exists('example5.rrd')
  True
  >>> rrd = RRD('example5.rrd','r')
  >>> os.path.exists('example5.rrd')
  True
  >>> rrd.info()
  rra = []
  filename = example5.rrd
  start = r
  step = 300
  values = []
  ds = []
  >>> 

What is the expected output? What do you see instead?
The attributes should have complete values mirroring those of the rrd file, and 
output from "rrdtool info".

What version of the product are you using? On what operating system?
Python 2.6.4, pyrrd 0.0.7 or trunk, rrdtool 1.3.8 on Fedora Core 13 .

Original issue reported on code.google.com by colin.ho...@gmail.com on 11 Mar 2011 at 6:31

GoogleCodeExporter commented 9 years ago
You need to specify the mode parameter.  For example:

rrd = RRD('example5.rrd','r') # does NOT work

rrd = RRD('example5.rrd',mode='r') # does work

Original comment by colin.ho...@gmail.com on 11 Mar 2011 at 7:00

GoogleCodeExporter commented 9 years ago
Colin, thanks for updating the ticket with that help. 

I'll see if I can make changes to the code that would make it possible for 
parameter passing with out names (it really depends on legacy support and how 
that would affect other parts of the code).

Original comment by duncan.m...@gmail.com on 18 Oct 2011 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by duncan.m...@gmail.com on 19 Oct 2011 at 5:48