Package pymeterlib :: Module RRD :: Class RRD
[show private | hide private]
[frames | no frames]

Class RRD


Data access layer that provides a wrapper for RRDtool.

RRDtool is a data logging and graphing application. RRD (Round Robin Database) is a system to store and display time-series data. It stores the data in a very compact way that will not expand over time.
Method Summary
  __init__(self, rrd_name)
  create_rrd(self, interval, data_sources)
Create a new RRD.
  update(self, *values)
Update the RRD with a new set of values.

Instance Variable Summary
  rrd_name: Name (and path) of the RRD

Method Details

__init__(self, rrd_name)
(Constructor)

Parameters:
rrd_name - Name (and path) of the RRD

create_rrd(self, interval, data_sources)

Create a new RRD.

If an RRD of the same name already exists, it will be replaced with the new one.
Parameters:
interval - Interval in seconds that data will be fed into the RRD
data_sources - Nested sequence (e.g. List of tuples) of data sources (DS) to store in the RRD. Each data source is passed in as: (name, type, min_value, max_value). If you try to update a data source with a value that is not within its accepted range, it will be ignored. min_value and max_value can be replaced with a 'U' to accept unlimited values.

update(self, *values)

Update the RRD with a new set of values.

Updates must supply a set of values that match the number of data sources (DS) containted in the RRD. (i.e. You can not update an RRD with 1 value when the RRD contains 2 DS's)
Parameters:
values - Values to be inserted into the RRD (arbitrary number of scalar arguments)

Instance Variable Details

rrd_name

Name (and path) of the RRD

Generated by Epydoc 2.1 on Fri Mar 17 09:16:20 2006 http://epydoc.sf.net