User Tools

Site Tools


rembrandt:tom_s_rrd_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rembrandt:tom_s_rrd_notes [2008/09/05 10:53] tomgeerembrandt:tom_s_rrd_notes [2008/09/05 14:02] (current) tomgee
Line 1: Line 1:
-===== Tom'RRd Notes =====+===== Tom'RRD Notes =====
  
 This is an informal collection of notes to help me understand an RRD database. This is an informal collection of notes to help me understand an RRD database.
 +
 +
  
 ==== Definition ==== ==== Definition ====
-An RRD database is a circular database whose size is predetermined at creation. RRD database has a set of commands to add new data, fetch data and graph data from the database. The data base expects a time series of data. Each value is saved with a timestamp+An RRD database is a circular database whose size is predetermined at creation. The RRD database tool has a set of commands to add new data, fetch data and graph data from the database. The data base expects a time series sequence of data. Each value is saved with a time stamp 
 + 
  
  
Line 35: Line 39:
 Because our step size is 300, or every 5 minutes, 12 of the data points would make one hour and one days worth of archive would be 24 hours. In other words, 12 of the readings would be averaged making up one hours worth of averaged data and 24 one hour averages would be archived. This is represented by the two parameters 12:24\\ Because our step size is 300, or every 5 minutes, 12 of the data points would make one hour and one days worth of archive would be 24 hours. In other words, 12 of the readings would be averaged making up one hours worth of averaged data and 24 one hour averages would be archived. This is represented by the two parameters 12:24\\
 The next RRA stores 31 days (one month) worth of data using 288 which is the number of readings averaged for one day (12 readings per hour times 24 hours = 288), so we have the two parameters 288:31. The next RRA stores 31 days (one month) worth of data using 288 which is the number of readings averaged for one day (12 readings per hour times 24 hours = 288), so we have the two parameters 288:31.
 +
 +
 +
 +
 +
 +
  
 ==== Operationally ==== ==== Operationally ====
Line 41: Line 51:
 Running a program at regular intervals is OS specific. But here is an example in pseudo code: Running a program at regular intervals is OS specific. But here is an example in pseudo code:
  
-   Get the value and put it in variable "$speed" +   Get the value and put it in variable "$speed" 
-   rrdtool update speed.rrd N:$speed+   rrdtool update speed.rrd N:$speed
  
 (**N** is an RRD keyword for system time) (**N** is an RRD keyword for system time)
  
-This is all. Run the above script every five minutes. When you need to know what the graphs look likerun the examples above. You could put them in a script as wellAfter running that scriptview the page index.html we created above.+Run the above script every five minutes. \\ 
 +After running the scriptcreate the graph and view it in an html page, index.htmlwhich contains the graph in speed.png. 
 + 
 +Contents of index.html
 + 
 +    <HTML><HEAD><TITLE>Speed</TITLE></HEAD><BODY>\\ 
 +    <IMG src="speed.png" alt="Speed in meters per second">\\    
 +    </BODY></HTML>\\ 
 + 
rembrandt/tom_s_rrd_notes.1220626414.txt.gz · Last modified: 2008/09/05 10:53 by tomgee