RRDtool - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

RRDtool

Description:

As we are on a circle there is no beginning nor an end, you can go on and on. ... Fetch: Get data for a certain time period from a RRD. ... – PowerPoint PPT presentation

Number of Views:480
Avg rating:3.0/5.0
Slides: 11
Provided by: Cheng86
Category:
Tags: fetch | go | rrdtool

less

Transcript and Presenter's Notes

Title: RRDtool


1
RRDtool ??
  • ???

2
Background
  • RRD is the Acronym for Round Robin Database. RRD
    is a system to store and display time-series data
    . You can think of RRDtool as a reimplementation
    of MRTGs graphing and logging features.
  • It stores the data in a very compact way that
    will not expand over time, and it presents useful
    graphs by processing the data.
  • Developed by Tobias Oetiker ltoetiker_at_ee.ethz.chgt .

3
Basic ideas
  • Round robin works with a fixed amount of data,
    and a pointer to the current element. Think of a
    circle with some dots plotted on the edge, these
    dots are the places where data can be stored.
    Draw an arrow from the center of the circle to
    one of the dots, this is the pointer. When the
    current data is read or written, the pointer
    moves to the next element. As we are on a circle
    there is no beginning nor an end, you can go on
    and on. After a while, all the available places
    will be used and the process automatically reuses
    old locations.

4
Functions(1)
  • create Set up a new Round Robin Database (RRD).
  • Update Store new data values into an RRD.
  • Graph Create a graph from data stored in one or
    several RRD.
  • Dump Dump the contents of an RRD in plain ASCII.
  • Restore Restore an RRD in XML format to a binary
    rrd

5
Functions(2)
  • Fetch Get data for a certain time period from a
    RRD. The graph function uses fetch to retrieve
    its data from an rrd.
  • Tune Alter setup of an RRD.
  • Last Find last update time of an RRD.
  • Resize Change the size of individual RRAs
  • Cgi This is a standalone tool for producing rrd
    graphs on the fly.

6
Look into rrd file format
  • RRD file format is defined in rrd_format.h.
  • Just as you might guess, a rrd file include a
    header section, followed by DATA STORAGE AREA
    which is made up from Consolidated Data Points
    organized in Round Robin Archives. In the
    following format.

7
RRD file heads structure(1)
  • To properly describe the database structure lets
    define a few new words
  • ds - Data Source (ds) providing input to the
    database. A Data Source (ds) can be a traffic
    counter, a temperature, the number of users
    logged into a system. The rrd database format can
    handle the input of several Data Sources (ds) in
    a singe database.
  • dst - Data Source Type (dst). The Data Source
    Type (dst) defines the rules applied to Build
    Primary Data Points from the input provided by
    the data sources (ds).

8
RRD file heads structure(2)
  • pdp - Primary Data Point (pdp). After the
    database has accepted the input from the data
    sources (ds). It starts building Primary Data
    Points (pdp) from the data. Primary Data Points
    (pdp) are evenly spaced along the time axis
    (pdp_step). The values of the Primary Data Points
    are calculated from the values of the data source
    (ds) and the exact time these values were
    provided by the data source (ds).
  • pdp_st - PDP Start (pdp_st). The moments (pdp_st)
    in time where these steps occur are defined by
    the moments where the number of seconds since
    1970-jan-1 modulo pdp_step equals zero (pdp_st).

9
RRD file heads structure(3)
  • cf - Consolidation Function (cf). An arbitrary
    Consolidation Function (cf) (averaging, min,
    max) is applied to the primary data points (pdp)
    to calculate the consolidated data point.
  • cdp - Consolidated Data Point (cdp) is the long
    term storage format for data in the rrd database.
    Consolidated Data Points represent one or several
    primary data points collected along the time
    axis. The Consolidated Data Points (cdp) are
    stored in Round Robin Archives (rra).

10
RRD file heads structure(4)
  • rra - Round Robin Archive (rra). This is the
    place where cdp get stored. The data is organized
    in rows and columns. The Round Robin Archive got
    its name from the method data is stored in there.
    An RRD database can contain several Round Robin
    Archives. Each Round Robin Archive can have a
    different row spacing along the time axis
    (pdp_cnt) and a different consolidation function
    (cf) used to build its consolidated data points
    (cdp).
  • rra_st - RRA Start (rra_st). The moments (rra_st)
    in time where Consolidated Data Points (cdp) are
    added to an rra are defined by the moments where
    the number of seconds since1970-jan-1 modulo
    pdp_cntpdp_step equals zero (rra_st).
  • row - Row (row). A row represent all
    consolidated data points (cdp) in a round robin
    archive who are of the same age.
  • col - Column (col). A column (col) represent all
    consolidated data points (cdp) in a round robin
    archive (rra) who originated from the same data
    source (ds).
Write a Comment
User Comments (0)
About PowerShow.com