one with is enough ...
[rrdtool.git] / doc / rrdtutorial.pod
index eaf7af6..f5ab0f3 100644 (file)
@@ -1,16 +1,14 @@
+=for changes please consult me first. Thanks, Alex
+
 =head1 NAME
 
 rrdtutorial - Alex van den Bogaerdt's RRDtool tutorial
 
-=for html <div align="right">Go <a href="rrdtutorial.es.html">Spanish</a></div> 
-
-=for html <div align="right"><a href="rrdtutorial.pdf">PDF</a> version.</div> 
-
 =head1 DESCRIPTION
 
-RRDtool is written by Tobias Oetiker <oetiker@ee.ethz.ch> with
+RRDtool is written by Tobias Oetiker E<lt>tobi@oetiker.chE<gt> with
 contributions from many people all around the world. This document is
-written by Alex van den Bogaerdt <alex@ergens.op.het.net> to help you
+written by Alex van den Bogaerdt E<lt>alex@vandenbogaerdt.nlE<gt> to help you
 understand what RRDtool is and what it can do for you.
 
 The documentation provided with RRDtool can be too technical for some
@@ -27,62 +25,88 @@ Please don't skip ahead in this document!  The first part of this
 document explains the basics and may be boring.  But if you don't
 understand the basics, the examples will not be as meaningful to you.
 
-=head2 What is RRDtool ?
+Sometimes things change.  This example used to provide numbers like
+"0.04" in stead of "4.00000e-02".  Those are really the same numbers,
+just written down differently.  Don't be alarmed if a future version
+of rrdtool displays a slightly different form of output. The examples
+in this document are correct for version 1.2.0 of RRDtool.
+
+Also, sometimes bugs do occur. They may also influence the outcome of
+the examples. Example speed4.png was suffering from this (the handling
+of unknown data in an if-statement was wrong). Normal data will be
+just fine (a bug in rrdtool wouldn't last long) but special cases like
+NaN, INF and so on may last a bit longer.  Try another version if you
+can, or just live with it.
+
+I fixed the speed4.png example (and added a note). There may be other
+examples which suffer from the same or a similar bug.  Try to fix it
+yourself, which is a great excercise. But please do not submit your
+result as a fix to the source of this document. Discuss it on the
+user's list, or write to me.
+
+=head2 What is RRDtool?
 
 RRDtool refers to Round Robin Database tool.
 Round robin is a technique that 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.
+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. This way, the database
+element. As we are on a circle there is neither a beginning nor an end, you can
+go on and on and on. After a while, all the available places will be used and
+the process automatically reuses old locations. This way, the dataset
 will not grow in size and therefore requires no maintenance.
-RRDtool works with with Round Robin Databases (RRDs). It stores and retrieves
+RRDtool works with Round Robin Databases (RRDs). It stores and retrieves
 data from them.
 
-=head2 What data can be put into an RRD ?
-
-You name it, it will probably fit. You should be able to measure some value
-at several points in time and provide this information to RRDtool. If you
-can do this, RRDtool will be able to store it. The values need to be
-numerical but don't have to be, as opposed to MRTG, integers.
-
-Many examples talk about SNMP which is an acronym for
-Simple Network Management Protocol. "Simple" refers to the protocol --
-it does not mean it is simple to manage or monitor a network. After working your
-way through this document, you should know enough to be able to understand
-what people are talking about. For now, just realize that SNMP is a way to
-ask devices for the values of counters they keep.
-It is the value from those counters that are kept in the RRD.
-
-=head2 What can I do with this tool ?
-
-RRDtool originated from MRTG (Multi Router Traffic Grapher).  MRTG started
-as a tiny little script for graphing the use of a connection
-to the Internet. MRTG evolved into a tool for graphing other data sources
-including temperature, speed, voltage, number of printouts and
-the like. Most likely you will start to use the RRDtool to store
-and process data collected via SNMP. The data will most likely be bytes
-(or bits) transfered from and to a network or a computer.
-RRDtool lets you create a database, store data in it, retrieve that data
-and create graphs in PNG format for display on a web browser. Those PNG
-images are dependent on the data you collected and could be, for instance,
-an overview of the average network usage, or the peaks that occurred.
-It can also be used to display tidal waves, solar radiation, power
-consumption, number of visitors at an exhibition, noise levels near an
-airport, temperature on your favorite holiday location, temperature in the
-fridge and whatever you imagination can come up with. You need a sensor to
-measure the data and be able to feed the numbers to RRDtool.
-
-=head2 What if I still have problems after reading this document ?
+=head2 What data can be put into an RRD?
+
+You name it, it will probably fit as long as it is some sort of
+time-series data. This means you have to be able to measure some value
+at several points in time and provide this information to RRDtool. If
+you can do this, RRDtool will be able to store it. The values must be
+numerical but don't have to be integers, as is the case with MRTG (the
+next section will give more details on this more specialized application).
+
+Many examples below talk about SNMP which is an acronym for Simple Network
+Management Protocol. "Simple" refers to the protocol. It does not
+mean it is simple to manage or monitor a network. After working your
+way through this document, you should know enough to be able to
+understand what people are talking about. For now, just realize that
+SNMP can be used to query devices for the values of counters they keep. It
+is the value from those counters that we want to store in the RRD.
+
+=head2 What can I do with this tool?
+
+RRDtool originated from MRTG (Multi Router Traffic Grapher). MRTG
+started as a tiny little script for graphing the use of a university's
+connection to the Internet. MRTG was later (ab-)used as a tool for
+graphing other data sources including temperature, speed, voltage,
+number of printouts and the like.
+
+Most likely you will start to use RRDtool to store and process data
+collected via SNMP. The data will most likely be bytes (or bits)
+transferred from and to a network or a computer.  But it can also be
+used to display tidal waves, solar radiation, power consumption,
+number of visitors at an exhibition, noise levels near an airport,
+temperature on your favorite holiday location, temperature in the
+fridge and whatever your imagination can come up with.
+
+You only need a sensor to measure the data and be able to feed the
+numbers into RRDtool. RRDtool then lets you create a database, store
+data in it, retrieve that data and create graphs in PNG format for
+display on a web browser. Those PNG images are dependent on the data
+you collected and could be, for instance, an overview of the average
+network usage, or the peaks that occurred.
+
+=head2 What if I still have problems after reading this document?
 
 First of all: read it again! You may have missed something.
 If you are unable to compile the sources and you have a fairly common
 OS, it will probably not be the fault of RRDtool. There may be pre-compiled
 versions around on the Internet. If they come from trusted sources, get
 one of those.
+
 If on the other hand the program works but does not give you the
 expected results, it will be a problem with configuring it. Review
 your configuration and compare it with the examples that follow.
@@ -91,21 +115,22 @@ There is a mailing list and an archive of it. Read the list for a few
 weeks and search the archive. It is considered rude to just ask
 a question without searching the archives: your problem may already have been
 solved for somebody else!  This is true for most, if not all, mailing lists
-and not only for this particular list! Look in the documentation that
+and not only for this particular one. Look in the documentation that
 came with RRDtool for the location and usage of the list.
 
 I suggest you take a moment to subscribe to the mailing list right now
-by sending an email to E<lt>rrd-users-request@list.ee.ethz.chE<gt> with a
-subject of "subscribe". If you ever want to leave this list, you write
+by sending an email to E<lt>rrd-users-request@lists.oetiker.chE<gt> with a
+subject of "subscribe". If you ever want to leave this list, just write
 an email to the same address but now with a subject of "unsubscribe".
 
-=head2 How will you help me ?
+=head2 How will you help me?
 
 By giving you some detailed descriptions with detailed examples.
-It is assumed that following the instructions in the order presented
+I assume that following the instructions in the order presented
 will give you enough knowledge of RRDtool to experiment for yourself.
 If it doesn't work the first time, don't give up. Reread the stuff that
 you did understand, you may have missed something.
+
 By following the examples you get some hands-on experience and, even
 more important, some background information of how it works.
 
@@ -125,18 +150,19 @@ all the same: some number over some time.
 
 Assume we have a device that transfers bytes to and from the Internet.
 This device keeps a counter that starts at zero when it is turned on,
-increasing with every byte that is transfered. This counter will have
-a maximum value, if that value is reached and an extra byte is counted,
-the counter starts all over at zero. This is the same as many counters
+increasing with every byte that is transferred. This counter will probably have
+a maximum value. If this value is reached and an extra byte is counted,
+the counter starts over at zero. This is the same as many counters
 in the world such as the mileage counter in a car.
+
 Most discussions about networking talk about bits per second so lets
 get used to that right away. Assume a byte is eight bits and start to
-think in bits not bytes. The counter, however, still counts bytes !
+think in bits not bytes. The counter, however, still counts bytes!
 In the SNMP world most of the counters are 32 bits. That means they are
 counting from 0 to 4294967295. We will use these values in the examples.
 The device, when asked, returns the current value of the counter. We
 know the time that has passes since we last asked so we now know how
-many bytes have been transfered ***on average*** per second. This is
+many bytes have been transferred ***on average*** per second. This is
 not very hard to calculate. First in words, then in calculations:
 
 =over 3
@@ -147,7 +173,7 @@ Take the current counter, subtract the previous value from it.
 
 =item 2.
 
-Do the same with the current time and the previous time.
+Do the same with the current time and the previous time (in seconds).
 
 =item 3.
 
@@ -159,48 +185,47 @@ number of bits per second (bps).
 
   bps = (counter_now - counter_before) / (time_now - time_before) * 8
 
-For some people it may help to translate this to a automobile example:
-Do not try this example, and if you do, don't blame me for the results.
+For some people it may help to translate this to an automobile example.
+Do not try this example, and if you do, don't blame me for the results!
 
 People who are not used to think in kilometers per hour can translate
 most into miles per hour by dividing km by 1.6 (close enough).
 I will use the following abbreviations:
 
M:    meter
KM:   kilometer (= 1000 meters).
H:    hour
S:    second
KM/H: kilometers per hour
M/S:  meters per second
-
-You're driving a car. At 12:05 you read the counter in the dashboard
-and it tells you that the car has moved 12345 KM until that moment.
-At 12:10 you look again, it reads 12357 KM. This means you have
-traveled 12 KM in five minutes. A scientist would translate that
m:    meter
km:   kilometer (= 1000 meters).
h:    hour
s:    second
km/h: kilometers per hour
m/s:  meters per second
+
+You are driving a car. At 12:05 you read the counter in the dashboard
+and it tells you that the car has moved 12345 km until that moment.
+At 12:10 you look again, it reads 12357 km. This means you have
+traveled 12 km in five minutes. A scientist would translate that
 into meters per second and this makes a nice comparison toward the
 problem of (bytes per five minutes) versus (bits per second).
 
 We traveled 12 kilometers which is 12000 meters. We did that in five
-minutes which translates into 300 seconds. Our speed is 12000M / 300S
-equals 40 M/S.
+minutes or 300 seconds. Our speed is 12000m / 300s or 40 m/s.
 
-We could also calculate the speed in KM/H: 12 times five minutes
-is an hour so we have to multiply 12 KM by 12 to get 144 KM/H.
-For our native English speaking friends: that's 90 MPH so don't
+We could also calculate the speed in km/h: 12 times 5 minutes
+is an hour, so we have to multiply 12 km by 12 to get 144 km/h.
+For our native English speaking friends: that's 90 mph so don't
 try this example at home or where I live :)
 
 Remember: these numbers are averages only.  There is no way to figure out
 from the numbers, if you drove at a constant speed.  There is an example
 later on in this tutorial that explains this.
 
-I hope you understand that there is no difference in calculating M/S or
-bps; only the way we collect the data is different. Even the K from kilo
+I hope you understand that there is no difference in calculating m/s or
+bps; only the way we collect the data is different. Even the k from kilo
 is the same as in networking terms k also means 1000.
 
 We will now create a database where we can keep all these interesting
 numbers. The method used to start the program may differ slightly from
-OS to OS but I assume you can figure it out if it works different on
-your OS. Make sure you do not overwrite any file on your system when
+OS to OS, but I assume you can figure it out if it works different on
+your's. Make sure you do not overwrite any file on your system when
 executing the following command and type the whole line as one long
 line (I had to split it for readability)
 and skip all of the '\' characters.
@@ -213,22 +238,22 @@ and skip all of the '\' characters.
 
 (So enter: C<rrdtool create test.rrd --start 920804400 DS ...>)
 
-=head2 What has been created ?
+=head2 What has been created?
 
-We created the round robin database called test (test.rrd)
-which starts at noon the day I started (7th of march, 1999) writing
-this document. It holds one data source (DS) named "speed" that gets
-built from a counter. This counter is read every five minutes (default)
-In the same database two round robin archives (RRAs) are kept, one
-averages the data every time it is read (e.g., there's nothing to average)
-and keeps 24 samples (24 times 5 minutes is 2 hours). The other averages
-6 values (half hour) and contains 10 of such averages (e.g., 5 hours)
-The remaining options will be discussed later on.
+We created the round robin database called test (test.rrd) which starts at
+noon the day I started writing this document, 7th of March, 1999 (this date
+translates to 920804400 seconds as explained below). Our database holds
+one data source (DS) named "speed" that represents a counter. This counter
+is read every five minutes (this is the default therefore you don't have to
+put C<--step=300>).  In the same database two round robin archives (RRAs)
+are kept, one averages the data every time it is read (e.g., there's nothing
+to average) and keeps 24 samples (24 times 5 minutes is 2 hours). The other
+averages 6 values (half hour) and contains 10 such averages (e.g. 5 hours).
 
 RRDtool works with special time stamps coming from the UNIX world.
 This time stamp is the number of seconds that passed since January
-1st 1970 UTC.  This time stamp is translated into local time and
-it will therefore look different for the different time zones.
+1st 1970 UTC.  The time stamp value is translated into local time and
+it will therefore look different for different time zones.
 
 Chances are that you are not in the same part of the world as I am.
 This means your time zone is different. In all examples where I talk
@@ -239,21 +264,21 @@ As an example: where I will see "12:05" the UK folks will see "11:05".
 We now have to fill our database with some numbers. We'll pretend to
 have read the following numbers:
 
- 12:05 12345 KM
- 12:10 12357 KM
- 12:15 12363 KM
- 12:20 12363 KM
- 12:25 12363 KM
- 12:30 12373 KM
- 12:35 12383 KM
- 12:40 12393 KM
- 12:45 12399 KM
- 12:50 12405 KM
- 12:55 12411 KM
- 13:00 12415 KM
- 13:05 12420 KM
- 13:10 12422 KM
- 13:15 12423 KM
+ 12:05 12345 km
+ 12:10 12357 km
+ 12:15 12363 km
+ 12:20 12363 km
+ 12:25 12363 km
+ 12:30 12373 km
+ 12:35 12383 km
+ 12:40 12393 km
+ 12:45 12399 km
+ 12:50 12405 km
+ 12:55 12411 km
+ 13:00 12415 km
+ 13:05 12420 km
+ 13:10 12422 km
+ 13:15 12423 km
 
 We fill the database as follows:
 
@@ -272,7 +297,7 @@ etcetera.
 
 As you can see, it is possible to feed more than one value into the
 database in one command. I had to stop at three for readability but
-the real maximum is OS dependent.
+the real maximum per line is OS dependent.
 
 We can now retrieve the data from our database using "rrdtool fetch":
 
@@ -300,20 +325,16 @@ It should return the following output:
  920809200: nan
 
 If it doesn't, something may be wrong.  Perhaps your OS will print
-"NaN" in a different form.  It represents "Not A Number".  If your OS
+"NaN" in a different form. "NaN" stands for "Not A Number".  If your OS
 writes "U" or "UNKN" or something similar that's okay.  If something
 else is wrong, it will probably be due to an error you made (assuming
 that my tutorial is correct of course :-). In that case: delete the
-database and try again.  Sometimes things change.  This example used
-to provide numbers like "0.04" in stead of "4.00000e-02".  Those are
-really the same numbers, just written down differently.  Don't be
-alarmed if a future version of rrdtool displays a slightly different
-form of output.  The examples in this document are correct for version
-1.2.0
+database and try again. 
+
 
-What this output represents will become clear in the rest of the tutorial.
+The meaning of the above output will become clear below.
 
-=head2 It is time to create some graphics
+=head2 Time to create some graphics
 
 Try the following command:
 
@@ -323,11 +344,13 @@ Try the following command:
          LINE2:myspeed#FF0000
 
 This will create speed.png which starts at 12:00 and ends at 13:00.
-There is a definition of variable myspeed, it is the data from RRA
-"speed" out of database "test.rrd". The line drawn is 2 pixels high,
-and comes from variable myspeed. The color is red.
-You'll notice that the start of the graph is not at 12:00 but at 12:05
-and this is because we have insufficient data to tell the average before
+There is a definition of a variable called myspeed, using the data from RRA
+"speed" out of database "test.rrd". The line drawn is 2 pixels high
+and represents the variable myspeed. The color is red (specified by
+its rgb-representation, see below).
+
+You'll notice that the start of the graph is not at 12:00 but at 12:05.
+This is because we have insufficient data to tell the average before
 that time. This will only happen when you miss some samples, this will
 not happen a lot, hopefully.
 
@@ -346,8 +369,8 @@ The "color" black is all colors off: 000000
    magenta #FF00FF     (mixed red with blue)
    gray    #555555     (one third of all components)
 
-Additionally you can add an alpha channel (transparency).  The default
-will be "FF" which means non-transparent.
+Additionally you can (with a recent RRDtool)  add an alpha channel
+(transparency).  The default will be "FF" which means non-transparent.
 
 The PNG you just created can be displayed using your favorite image
 viewer.  Web browsers will display the PNG via the URL
@@ -357,20 +380,23 @@ viewer.  Web browsers will display the PNG via the URL
 
 When looking at the image, you notice that the horizontal axis is labeled
 12:10, 12:20, 12:30, 12:40 and 12:50. Sometimes a label doesn't fit (12:00
-and 13:00 would be candidates) so they are skipped.
-The vertical axis displays the range we entered. We provided kilometers
-and when divided by 300 seconds, we get very small numbers. To be exact,
-the first value was 12 (12357-12345) and divided by 300 this makes 0.04,
-which is displayed by RRDtool as "40 m" meaning "40/1000". The "m" has
-nothing to do with meters, kilometers or millimeters! RRDtool doesn't
-know about all this, it just works with numbers and not with meters...
+and 13:00 would be likely candidates) so they are skipped.
+
+The vertical axis displays the range we entered. We provided
+kilometers and when divided by 300 seconds, we get very small
+numbers. To be exact, the first value was 12 (12357-12345) and divided
+by 300 this makes 0.04, which is displayed by RRDtool as "40 m"
+meaning "40/1000". The "m" (milli) has nothing to do with meters (also m),
+kilometers or millimeters! RRDtool doesn't know about the physical
+units of our data, it just works with dimensionless numbers.
 
-What we did wrong was that we should have measured in meters, this would
-have been (12357000-12345000)/300 = 12000/300 = 40.
+If we had measured our distances in meters, this would have been
+(12357000-12345000)/300 = 12000/300 = 40.
 
-Let's correct that. We could recreate our database and store the correct
-data but there is a better way: do some calculations while creating the
-png file !
+As most people have a better feel for numbers in this range, we'll
+correct that. We could recreate our database and store the correct
+data, but there is a better way: we do some calculations while creating
+the png file!
 
    rrdtool graph speed2.png                           \
       --start 920804400 --end 920808000               \
@@ -379,31 +405,47 @@ png file !
       CDEF:realspeed=myspeed,1000,\*                  \
       LINE2:realspeed#FF0000
 
-After viewing this PNG, you notice the "m" has disappeared. This it what
-the correct result would be. Also, a label has been added to the image.
-Apart from the things mentioned above, the PNG should be the same.
+Note: I need to escape the multiplication operator * with a backslash.
+If I don't, the operating system may interpret it and use it for file
+name expansion. You could also place the line within quotation marks
+like so:
+
+      "CDEF:realspeed=myspeed,1000,*"                  \
+
+It boils down to: it is RRDtool which should see *, not your shell.
+And it is your shell interpreting \, not RRDtool. You may need to
+adjust examples accordingly if you happen to use an operating
+system or shell which behaves differently.
+
+After viewing this PNG, you notice the "m" (milli) has
+disappeared. This it what the correct result would be. Also, a label
+has been added to the image.  Apart from the things mentioned above,
+the PNG should look the same.
 
-The calculations are in the CDEF part and are in Reverse Polish Notation
-("RPN"). What it says is: "take the data source myspeed and the number
-1000; multiply those". Don't bother with RPN yet, it will be explained
-later on in more detail. Also, you may want to read my tutorial on CDEFs
-and Steve Rader's tutorial on RPN. But first finish this tutorial.
+The calculations are specified in the CDEF part above and are in
+Reverse Polish Notation ("RPN"). What we requested RRDtool to do is:
+"take the data source myspeed and the number 1000; multiply
+those". Don't bother with RPN yet, it will be explained later on in
+more detail. Also, you may want to read my tutorial on CDEFs and Steve
+Rader's tutorial on RPN. But first finish this tutorial.
 
 Hang on! If we can multiply values with 1000, it should also be possible
 to display kilometers per hour from the same data!
 
 To change a value that is measured in meters per second:
- -*- Calculate meters per hour:     value * 3600
- -*- Calculate kilometers per hour: value / 1000
- -*- Together this makes:           value * (3600/1000) == value * 3.6
+
+ Calculate meters per hour:     value * 3600
+ Calculate kilometers per hour: value / 1000
+ Together this makes:           value * (3600/1000) or value * 3.6
 
 In our example database we made a mistake and we need to compensate for
 this by multiplying with 1000. Applying that correction:
- -*- value * 3.6  *1000 == value * 3600
+
+ value * 3.6  * 1000 == value * 3600
 
 Now let's create this PNG, and add some more magic ...
 
  rrdtool graph speed3.png                           \
rrdtool graph speed3.png                             \
       --start 920804400 --end 920808000               \
       --vertical-label km/h                           \
       DEF:myspeed=test.rrd:speed:AVERAGE              \
@@ -414,16 +456,21 @@ Now let's create this PNG, and add some more magic ...
       AREA:good#00FF00:"Good speed"                   \
       AREA:fast#FF0000:"Too fast"
 
-This looks much better. Speed in KM/H and even an extra line with the
-maximum allowed speed (on the road I travel at). I also changed the
-colors used to display speed and changed it from a line into an area.
+Note: here we use another means to escape the * operator by enclosing
+the whole string in double quotes.
 
-The calculations are more complex now. For the "good" speed they are:
+This graph looks much better. Speed is shown in km/h and there is even
+an extra line with the maximum allowed speed (on the road I travel
+on). I also changed the colors used to display speed and changed it
+from a line into an area.
+
+The calculations are more complex now. For speed measurements within
+the speed limit they are:
 
    Check if kmh is greater than 100    ( kmh,100 ) GT
    If so, return 0, else kmh           ((( kmh,100 ) GT ), 0, kmh) IF
 
-For the other speed:
+For values above the speed limit:
 
    Check if kmh is greater than 100    ( kmh,100 ) GT
    If so, return kmh, else return 0    ((( kmh,100) GT ), kmh, 0) IF
@@ -438,7 +485,8 @@ following PNG:
       --start 920804400 --end 920808000               \
       --vertical-label km/h                           \
       DEF:myspeed=test.rrd:speed:AVERAGE              \
-      "CDEF:kmh=myspeed,3600,*"                       \
+      CDEF:nonans=myspeed,UN,0,myspeed,IF             \
+      CDEF:kmh=nonans,3600,*                          \
       CDEF:fast=kmh,100,GT,100,0,IF                   \
       CDEF:over=kmh,100,GT,kmh,100,-,0,IF             \
       CDEF:good=kmh,100,GT,0,kmh,IF                   \
@@ -447,7 +495,11 @@ following PNG:
       AREA:fast#550000:"Too fast"                     \
       STACK:over#FF0000:"Over speed"
 
-Let's create a quick and dirty HTML page to view three PNGs:
+Remember the note in the beginning?  I had to remove unknown data from
+this example. The 'nonans' CDEF is new, and the 6th line (which used to
+be the 5th line) used to read 'CDEF:kmh=myspeed,3600,*'
+
+Let's create a quick and dirty HTML page to view the three PNGs:
 
    <HTML><HEAD><TITLE>Speed</TITLE></HEAD><BODY>
    <IMG src="speed2.png" alt="Speed in meters per second">
@@ -457,7 +509,7 @@ Let's create a quick and dirty HTML page to view three PNGs:
    <IMG src="speed4.png" alt="Traveled too fast?">
    </BODY></HTML>
 
-Name the file "speed.html" or similar, and view it.
+Name the file "speed.html" or similar, and look at it in your web browser.
 
 Now, all you have to do is measure the values regularly and update the
 database.  When you want to view the data, recreate the PNGs and make
@@ -467,47 +519,51 @@ or ctrl-F5).
 
 =head2 Updates in Reality
 
-We've already used the "update" command: it took one or more parameters
-in the form of "<time>:<value>". You'll be glad to know that you can
-get the current time by filling in a "N" as the time.
-If you wish, you can also use the "time" function in perl.
-The shortest example in this doc :)
+We've already used the C<update> command: it took one or more
+parameters in the form of "<time>:<value>". You'll be glad to know
+that you can specify the current time by filling in a "N" as the time.
+Or you could use the "time" function in Perl (the shortest example in
+this tutorial):
 
    perl -e 'print time, "\n" '
 
-How you can run a program on regular intervals is OS specific. But here's
+How to run a program on regular intervals is OS specific. But here is
 an example in pseudo code:
 
-   Get the value, put it in variable "$speed"
-   rrdtool update speed.rrd N:$speed
+   - Get the value and put it in variable "$speed"
+   rrdtool update speed.rrd N:$speed
 
-(Do not try this with our test database, it is used in further examples)
+(do not try this with our test database, we'll use it in further examples)
 
-This is all. Run this script every five minutes. When you need to know
-what the graphics look like, run the examples above. You could put them
-in a script. After running that script, view index.html
+This is all. Run the above script every five minutes. When you need to know
+what the graphs look like, run the examples above. You could put them
+in a script as well. After running that script, view the page
+index.html we created above.
 
 =head2 Some words on SNMP
 
-I can imagine very few people will be able to get real data from their
-car every five minutes, all other people will have to settle for some
-other kind of counter. You could measure the number of pages printed by
-a printer, the coffee made by the coffee machine, a device that counts
-the electricity used, whatever. Any incrementing counter can be monitored
-and graphed using the stuff you learned until now. Later on we will also
-be able to monitor other types of values like temperature.
-Most people will use the counter that keeps track
-of octets (bytes) transfered by a network device so we have to do just
-that. We will start with a description of how to collect data.
+I can imagine very few people that will be able to get real data from
+their car every five minutes. All other people will have to settle for
+some other kind of counter. You could measure the number of pages
+printed by a printer, for example, the cups of coffee made by the
+coffee machine, a device that counts the electricity used,
+whatever. Any incrementing counter can be monitored and graphed using
+the stuff you learned so far. Later on we will also be able to monitor
+other types of values like temperature.
+
+Many people interested in RRDtool will use the counter that keeps track
+of octets (bytes) transferred by a network device. So let's do just
+that next. We will start with a description of how to collect data.
+
 Some people will make a remark that there are tools which can do this data
-collection for you. They are right!  However, I feel it is important that
-you understand they are not necessary.  When you have to determine why
+collection for you. They are right! However, I feel it is important that
+you understand they are not necessary. When you have to determine why
 things went wrong you need to know how they work.
 
 One tool used in the example has been talked about very briefly in the
-beginning of this document, it is called SNMP. It is a way of talking to
-equipment. The tool I use below is called "snmpget" and this is how it
-works:
+beginning of this document, it is called SNMP. It is a way of talking
+to networked equipment. The tool I use below is called "snmpget" and
+this is how it works:
 
    snmpget device password OID
 
@@ -536,19 +592,19 @@ These names can also be written down as numbers and are 1 3 6 1 2 1.
 
 There is a lot of confusion about the leading dot that some programs
 use.  There is *no* leading dot in an OID.  However, some programs
-can use above part of OIDs as a default.  To indicate the difference
+can use the above part of OIDs as a default.  To indicate the difference
 between abbreviated OIDs and full OIDs they need a leading dot when
 you specify the complete OID.  Often those programs will leave out
 the default portion when returning the data to you.  To make things
 worse, they have several default prefixes ...
 
-Right, lets continue to the start of our OID: we had 1.3.6.1.2.1
+Ok, lets continue to the start of our OID: we had 1.3.6.1.2.1
 From there, we are especially interested in the branch "interfaces"
 which has number 2 (e.g., 1.3.6.1.2.1.2 or 1.3.6.1.2.1.interfaces).
 
 First, we have to get some SNMP program. First look if there is a
 pre-compiled package available for your OS. This is the preferred way.
-If not, you will have to get yourself the sources and compile those.
+If not, you will have to get the sources yourself and compile those.
 The Internet is full of sources, programs etc. Find information using
 a search engine or whatever you prefer.
 
@@ -562,9 +618,10 @@ adapt the example to make it work.
 
    snmpget -v2c -c public myrouter system.sysDescr.0
 
-The device should answer with a description of itself, perhaps empty.
-Until you got a valid answer from a device, perhaps using a different
-"password", or a different device, there is no point in continuing.
+The device should answer with a description of itself, perhaps an
+empty one. Until you got a valid answer from a device, perhaps using a
+different "password", or a different device, there is no point in
+continuing.
 
    snmpget -v2c -c public myrouter interfaces.ifNumber.0
 
@@ -584,7 +641,7 @@ Here's an example:
    interfaces.ifTable.ifEntry.ifDescr.5 = "Loopback0"
 
 On this cisco equipment, I would like to monitor the "Ethernet0"
-interface and see that it is number four. I try:
+interface and from the above output I see that it is number four. I try:
 
    [user@host /home/alex]$ snmpget -v2c -c public cisco 2.2.1.10.4 2.2.1.16.4
 
@@ -602,13 +659,13 @@ and
 both with an interface number of 4.
 
 Don't get fooled, this wasn't my first try. It took some time for me too
-to understand what all these numbers mean, it does help a lot when they
+to understand what all these numbers mean. It does help a lot when they
 get translated into descriptive text... At least, when people are talking
 about MIBs and OIDs you know what it's all about.
 Do not forget the interface number (0 if it is not interface dependent)
 and try snmpwalk if you don't get an answer from snmpget.
 
-If you understand above part, and get numbers from your device, continue
+If you understand the above section and get numbers from your device, continue
 on with this tutorial. If not, then go back and re-read this part.
 
 =head2 A Real World Example
@@ -625,19 +682,19 @@ starting point, which is the same as five minutes.
  24 samples averaged become one average on 2 hours
  288 samples averaged become one average on 1 day
 
-Lets try to be compatible with MRTG:
-MRTG stores about the following amount of data:
+Lets try to be compatible with MRTG which stores about the following
+amount of data:
 
  600 5-minute samples:    2   days and 2 hours
  600 30-minute samples:  12.5 days
  600 2-hour samples:     50   days
  732 1-day samples:     732   days
 
-These ranges are appended so the total amount of data kept is approximately
-797 days.  RRDtool stores the data differently, it doesn't start the "weekly"
-archive where the "daily" archive stopped.  For both archives the most recent
-data will be near "now" and therefore we will need to keep more data than
-MRTG does!
+These ranges are appended, so the total amount of data stored in the
+database is approximately 797 days. RRDtool stores the data
+differently, it doesn't start the "weekly" archive where the "daily"
+archive stopped. For both archives the most recent data will be near
+"now" and therefore we will need to keep more data than MRTG does!
 
 We will need:
 
@@ -658,8 +715,8 @@ We will need:
             RRA:MAX:0.5:24:775         \
             RRA:MAX:0.5:288:797
 
-Next thing to do is collect data and store it. Here is an example.
-It is written partially in pseudo code so you will have to find out what
+Next thing to do is to collect data and store it. Here is an example.
+It is written partially in pseudo code you will have to find out what
 to do exactly on your OS to make it work.
 
    while not the end of the universe
@@ -692,12 +749,11 @@ an area for the "in" traffic and a line for the "out" traffic.
 
 View the image and keep logging data for a few more days.
 If you like, you could try the examples from the test database and
-see if you can get various options and calculations working.
-
-Suggestion:
+see if you can get various options and calculations to work.
 
-Display in bytes per second and in bits per second. Make the Ethernet
-graphics go red if they are over four megabits per second.
+Suggestion: Display in bytes per second and in bits per second. Make
+the Ethernet graphics go red if they are over four megabits per
+second.
 
 =head2 Consolidation Functions
 
@@ -705,21 +761,20 @@ A few paragraphs back I mentioned the possibility of keeping
 the maximum values instead of the average values. Let's go
 into this a bit more.
 
-
 Recall all the stuff about the speed of the car. Suppose we drove at 144
-KM/H during 5 minutes and then were stopped by the police for 25 minutes.
-At the end of the lecture we would take our laptop and create+view the
+km/h during 5 minutes and then were stopped by the police for 25 minutes.
+At the end of the lecture we would take our laptop and create and view the
 image taken from the database. If we look at the second RRA we did
 create, we would have the average from 6 samples. The samples measured
 would be 144+0+0+0+0+0=144, divided by 30 minutes, corrected for the
-error by 1000, translated into KM/H, with a result of 24 KM/H.
+error by 1000, translated into km/h, with a result of 24 km/h.
 I would still get a ticket but not for speeding anymore :)
 
-Obviously, in this case, we shouldn't look at the averages. In some
-cases they are handy. If you want to know how much KM you had traveled,
-the picture would be the right one to look at. On the other hand, for
-the speed that we traveled at, the maximum number seen is much more
-valuable. (later we will see more types)
+Obviously, in this case we shouldn't look at the averages. In some
+cases they are handy. If you want to know how many km you had traveled,
+the averaged picture would be the right one to look at. On the other hand, for
+the speed that we traveled at, the maximum numbers seen is much more
+interesting. Later we will see more types.
 
 It is the same for data. If you want to know the amount, look at the
 averages. If you want to know the rate, look at the maximum.
@@ -727,9 +782,10 @@ Over time, they will grow apart more and more. In the last database
 we have created, there are two archives that keep data per day. The
 archive that keeps averages will show low numbers, the archive that
 shows maxima will have higher numbers.
-For my car this would translate in averages per day of 96/24=4 KM/H
-(as I travel about 94 kilometers on a day) during week days, and
-maximum of 120 KM/H on weekdays (my top speed that I reach every day).
+
+For my car this would translate in averages per day of 96/24=4 km/h
+(as I travel about 94 kilometers on a day) during working days, and
+maxima of 120 km/h (my top speed that I reach every day).
 
 Big difference. Do not look at the second graph to estimate the
 distances that I travel and do not look at the first graph to
@@ -737,11 +793,12 @@ estimate my speed. This will work if the samples are close together,
 as they are in five minutes, but not if you average.
 
 On some days, I go for a long ride. If I go across Europe and travel
-for over 12 hours, the first graph will rise to about 60 KM/H. The
-second one will show 180 KM/H. This means that I traveled a distance
-of 60 KM/H times 24 H = 1440 KM. I did this with a higher speed and
-a maximum around 180 KM/H. This doesn't mean that I traveled for 8
-hours at a constant speed of 180 KM/H !
+for 12 hours, the first graph will rise to about 60 km/h. The second
+one will show 180 km/h. This means that I traveled a distance of 60
+km/h times 24 h = 1440 km. I did this with a higher speed and a
+maximum around 180 km/h. However, it probably doesn't mean that I
+traveled for 8 hours at a constant speed of 180 km/h!
+
 This is a real example: go with the flow through Germany (fast!) and stop
 a few times for gas and coffee. Drive slowly through Austria and the
 Netherlands. Be careful in the mountains and villages. If you would
@@ -751,38 +808,38 @@ average and maximum graphs (provided I measured every 300 seconds).
 You would be able to see when I stopped, when I was in top gear, when
 I drove over fast highways etc. The granularity of the data is much
 higher, so you can see more. However, this takes 12 samples per hour,
-or 288 values per day, so it would be too much to keep for a long
+or 288 values per day, so it would be a lot of data over a longer
 period of time. Therefore we average it, eventually to one value per
-day. From this one value, we cannot see much detail.
+day. From this one value, we cannot see much detail, of course.
 
 Make sure you understand the last few paragraphs. There is no value
 in only a line and a few axis, you need to know what they mean and
-interpret the data in a good way. This is true for all data.
+interpret the data in an appropriate way. This is true for all data.
 
 The biggest mistake you can make is to use the collected data for
 something that it is not suitable for. You would be better off if
-you would not have the graphics at all in that case.
+you didn't have the graph at all.
 
 
-=head2 Let's review what you now should know.
+=head2 Let's review what you now should know
 
-You now know how to create a database. You can put the numbers in it,
-get them out again by creating an image, do math on the data from the
-database and view the outcome instead of the raw data.
-You know about the difference between averages and maxima, and when
-to use which (or at least you have an idea).
+You know how to create a database and can put data in it. You can get
+the numbers out again by creating an image, do math on the data from
+the database and view the result instead of the raw data.  You know
+about the difference between averages and maximum, and when to use
+which (or at least you should have an idea).
 
 RRDtool can do more than what we have learned up to now. Before you
 continue with the rest of this doc, I recommend that you reread from
 the start and try some modifications on the examples. Make sure you
 fully understand everything. It will be worth the effort and helps
-you not only with the rest of this doc but also in your day to day
+you not only with the rest of this tutorial, but also in your day to day
 monitoring long after you read this introduction.
 
 =head2 Data Source Types
 
 All right, you feel like continuing. Welcome back and get ready
-for an increased speed in the examples and explanation.
+for an increased speed in the examples and explanations.
 
 You know that in order to view a counter over time, you have to
 take two numbers and divide the difference of them between the
@@ -792,16 +849,16 @@ temperature from my router in three places namely the inlet, the
 so called hot-spot and the exhaust.  These values are not counters.
 If I take the difference of the two samples and divide that by
 300 seconds I would be asking for the temperature change per second.
-Hopefully this is zero! If not, the computer room is on fire :)
+Hopefully this is zero! If not, the computer room is probably on fire :)
 
-So, what can we do ?  We can tell RRDtool to store the values we measure
+So, what can we do?  We can tell RRDtool to store the values we measure
 directly as they are (this is not entirely true but close enough). The
 graphs we make will look much better, they will show a rather constant
 value. I know when the router is busy (it
 works -> it uses more electricity -> it generates more heat -> the
 temperature rises). I know when the doors are left open (the room is
-cooled -> the warm air from the rest of the building flows into the
-computer room -> the inlet temperature rises) etc. The data type we
+air conditioned) -> the warm air from the rest of the building flows into the
+computer room -> the inlet temperature rises). Etc. The data type we
 use when creating the database before was counter, we now have a
 different data type and thus a different name for it. It is called
 GAUGE. There are more such data types:
@@ -811,7 +868,7 @@ GAUGE. There are more such data types:
  - DERIVE
  - ABSOLUTE
 
-The two new types are DERIVE and ABSOLUTE. Absolute can be used like
+The two additional types are DERIVE and ABSOLUTE. Absolute can be used like
 counter with one difference: RRDtool assumes the counter is reset when
 it's read. That is: its delta is known without calculation by RRDtool
 whereas RRDtool needs to calculate it for the counter type.
@@ -852,8 +909,8 @@ Let's try them all:
 
 =item *
 
-Line A is a counter so it should continuously increment and RRDtool
-should calculate the differences. Also, RRDtool needs to divide the
+Line A is a COUNTER type, so it should continuously increment and RRDtool
+must calculate the differences. Also, RRDtool needs to divide the
 difference by the amount of time lapsed. This should end up as a
 straight line at 1 (the deltas are 300, the time is 300).
 
@@ -864,28 +921,29 @@ what we put in: a sort of a wave.
 
 =item *
 
-Line C is derive. It should be a counter that can decrease. It does
+Line C is of type DERIVE. It should be a counter that can decrease. It does
 so between 2400 and 0, with 1800 in-between.
 
 =item *
 
-Line D is of type absolute. This is like counter but it works on
+Line D is of type ABSOLUTE. This is like counter but it works on
 values without calculating the difference. The numbers are the same
 and as you can see (hopefully) this has a different result.
 
 =back
 
 This translates in the following values, starting at 23:10 and ending
-at 00:10 the next day (where U means unknown/unplotted):
+at 00:10 the next day (where "u" means unknown/unplotted):
 
  - Line A:  u  u  1  1  1  1  1  1  1  1  1  u
  - Line B:  u  1  3  5  3  1  2  4  6  4  2  u
  - Line C:  u  u  2  2  2  0 -2 -6  2  0  2  u
  - Line D:  u  1  2  3  4  5  6  7  8  9 10  u
 
-If your PNG shows all this, you know you have typed the data correct,
-the RRDtool executable is working properly, your viewer doesn't fool you
+If your PNG shows all this, you know you have entered the data correctly,
+the RRDtool executable is working properly, your viewer doesn't fool you,
 and you successfully entered the year 2000 :)
+
 You could try the same example four times, each time with only one of
 the lines.
 
@@ -896,34 +954,35 @@ Let's go over the data again:
 =item *
 
 Line A: 300,600,900 and so on. The counter delta is a constant 300 and
-so it the time delta. A number divided by itself is always 1 (except
+so is the time delta. A number divided by itself is always 1 (except
 when dividing by zero which is undefined/illegal).
-Why is it that the first point is unknown ? We do know what we put into
-the database ? True ! But we didn't have a value to calculate the delta
-from so we don't know where we started. It would be wrong to assume we
-started at zero so we don't !
+
+Why is it that the first point is unknown? We do know what we put into
+the database, right? True, But we didn't have a value to calculate the delta
+from, so we don't know where we started. It would be wrong to assume we
+started at zero so we don't!
 
 =item *
 
-Line B: There is nothing to calculate. The numbers are as is.
+Line B: There is nothing to calculate. The numbers are as they are.
 
 =item *
 
-Line C: Again, the start-out value is unknown. The same story is valid
-like for line A. In this case the deltas are not constant so the line
-is not. If we would put the same numbers in the database as we did for
+Line C: Again, the start-out value is unknown. The same story is holds
+as for line A. In this case the deltas are not constant, therefore the line
+is not either. If we would put the same numbers in the database as we did for
 line A, we would have gotten the same line. Unlike type counter,
 this type can decrease and I hope to show you later on why
-there is a difference.
+this makes a difference.
 
 =item *
 
 Line D: Here the device calculates the deltas. Therefore we DO know the
-first delta and it is plotted. We had the same input as with line A but
-the meaning of this input is different. Therefore the line is different.
+first delta and it is plotted. We had the same input as with line A, but
+the meaning of this input is different and thus the line is different.
 In this case the deltas increase each time with 300. The time delta
 stays at a constant 300 and therefore the division of the two gives
-increasing results.
+increasing values.
 
 =back
 
@@ -931,14 +990,14 @@ increasing results.
 
 There are a few more basics to show. Some important options are still to
 be covered and we haven't look at counter wraps yet. First the counter wrap:
-In our car we notice that our counter shows 999987. We travel 20 KM and
+In our car we notice that the counter shows 999987. We travel 20 km and
 the counter should go to 1000007. Unfortunately, there are only six digits
 on our counter so it really shows 000007. If we would plot that on a type
-DERIVE, it would mean that the counter was set back 999980 KM. It wasn't,
+DERIVE, it would mean that the counter was set back 999980 km. It wasn't,
 and there has to be some protection for this. This protection is only
 available for type COUNTER which should be used for this kind of counter
-anyways. How does it work ? Type counter should never decrease and
-therefore RRDtool must assume it wrapped if it does decrease !
+anyways. How does it work? Type counter should never decrease and
+therefore RRDtool must assume it wrapped if it does decrease!
 If the delta is negative, this can be compensated for by adding the
 maximum value of the counter + 1. For our car this would be:
 
@@ -953,7 +1012,7 @@ following different values:
  - 32 bits: 0 ..           4294967295
  - 64 bits: 0 .. 18446744073709551615
 
-If these numbers look strange to you, you would like to view them in
+If these numbers look strange to you, you can view them in
 their hexadecimal form:
 
  - 32 bits: 0 ..         FFFFFFFF
@@ -963,15 +1022,16 @@ RRDtool handles both counters the same. If an overflow occurs and
 the delta would be negative, RRDtool first adds the maximum of a small
 counter + 1 to the delta. If the delta is still negative, it had to be
 the large counter that wrapped. Add the maximum possible value of the
-large counter + 1 and subtract the falsely added small value.
+large counter + 1 and subtract the erroneously added small value.
+
 There is a risk in this: suppose the large counter wrapped while adding
-a huge delta, it could happen in theory that adding the smaller value
+a huge delta, it could happen, theoretically, that adding the smaller value
 would make the delta positive. In this unlikely case the results would
 not be correct. The increase should be nearly as high as the maximum
-counter value for that to happen so chances are you would have several
+counter value for that to happen, so chances are you would have several
 other problems as well and this particular problem would not even be
-worth thinking about. Even though I did include an example of it so you
-can judge that for yourself.
+worth thinking about. Even though, I did include an example, so you
+can judge for yourself.
 
 The next section gives you some numerical examples for counter-wraps.
 Try to do the calculations yourself or just believe me if your calculator
@@ -979,29 +1039,32 @@ can't handle the numbers :)
 
 Correction numbers:
 
- - 32 bits: (4294967295+1) =                                 4294967296
- - 64 bits: (18446744073709551615+1)-correction1 = 18446744069414584320
+ - 32 bits: (4294967295 + 1) =                                4294967296
+ - 64 bits: (18446744073709551615 + 1)
+                                   - correction1 = 18446744069414584320
 
  Before:        4294967200
- Increase:             100
+ Increase:                100
  Should become: 4294967300
- But really is:          4
+ But really is:             4
  Delta:        -4294967196
- Correction1:  -4294967196 +4294967296 = 100
+ Correction1:  -4294967196 + 4294967296 = 100
 
  Before:        18446744073709551000
- Increase:                       800
+ Increase:                             800
  Should become: 18446744073709551800
- But really is:                  184
+ But really is:                        184
  Delta:        -18446744073709550816
- Correction1:  -18446744073709550816 +4294967296 = -18446744069414583520
- Correction2:  -18446744069414583520 +18446744069414584320 = 800
+ Correction1:  -18446744073709550816
+                               + 4294967296 = -18446744069414583520
+ Correction2:  -18446744069414583520
+                  + 18446744069414584320 = 800
 
  Before:        18446744073709551615 ( maximum value )
  Increase:      18446744069414584320 ( absurd increase, minimum for
  Should become: 36893488143124135935             this example to work )
  But really is: 18446744069414584319
- Delta:                  -4294967296
+ Delta:                     -4294967296
  Correction1:  -4294967296 + 4294967296 = 0
  (not negative -> no correction2)
 
@@ -1009,48 +1072,50 @@ Correction numbers:
  Increase:      18446744069414584319 ( one less increase )
  Should become: 36893488143124135934
  But really is: 18446744069414584318
- Delta:                  -4294967297
- Correction1:  -4294967297 +4294967296 = -1
- Correction2:  -1 +18446744069414584320 = 18446744069414584319
+ Delta:                     -4294967297
+ Correction1:  -4294967297 + 4294967296 = -1
+ Correction2:  -1 + 18446744069414584320 = 18446744069414584319
 
 As you can see from the last two examples, you need strange numbers
-for RRDtool to fail (provided it's bug free of course) so this should
-not happen.  However, SNMP or whatever method you choose to collect the
-data might also report wrong numbers occasionally.  We can't prevent all
-errors but there are some things we can do.  The RRDtool "create" command
+for RRDtool to fail (provided it's bug free of course), so this should
+not happen. However, SNMP or whatever method you choose to collect the
+data, might also report wrong numbers occasionally.  We can't prevent all
+errors, but there are some things we can do. The RRDtool "create" command
 takes two special parameters for this. They define
-the minimum and maximum allowed value. Until now, we used "U", meaning
+the minimum and maximum allowed values. Until now, we used "U", meaning
 "unknown". If you provide values for one or both of them and if RRDtool
-receives values that are outside these limits, it will ignore those
+receives data points that are outside these limits, it will ignore those
 values. For a thermometer in degrees Celsius, the absolute minimum is
 just under -273. For my router, I can assume this minimum is much higher
-so I would say it is 10. The maximum temperature for my router I would
-state as 80. Any higher and the device would be out of order.
-For my car, I would never expect negative numbers and also I would not
-expect numbers to be higher than 230. Anything else, and there must have
-been an error. Remember: the opposite is not true, if the numbers pass
-this check it doesn't mean that they are correct. Always judge the
-graph with a healthy dose of paranoia if it looks weird.
+so I would set it to 10, where as the maximum temperature I would
+set to 80. Any higher and the device would be out of order.
+
+For the speed of my car, I would never expect negative numbers and
+also I would not expect a speed  higher than 230. Anything else,
+and there must have been an error. Remember: the opposite is not true,
+if the numbers pass this check, it doesn't mean that they are
+correct. Always judge the graph with a healthy dose of suspicion if it
+seems weird to you.
 
 =head2 Data Resampling
 
-One important feature of RRDtool has not been explained yet:
-It is virtually impossible to collect the data and feed it into RRDtool
-on exact intervals. RRDtool therefore interpolates the data so it is on
-exact intervals. If you do not know what this means or how it works,
-then here's the help you seek:
+One important feature of RRDtool has not been explained yet: it is
+virtually impossible to collect data and feed it into RRDtool on exact
+intervals. RRDtool therefore interpolates the data, so they are stored
+on exact intervals. If you do not know what this means or how it
+works, then here's the help you seek:
 
-Suppose a counter increases with exactly one for every second. You want
+Suppose a counter increases by exactly one for every second. You want
 to measure it in 300 seconds intervals. You should retrieve values
 that are exactly 300 apart. However, due to various circumstances you
 are a few seconds late and the interval is 303. The delta will also be
-303 in that case. Obviously RRDtool should not put 303 in the database
-and make you believe that the counter increased 303 in 300 seconds.
+303 in that case. Obviously, RRDtool should not put 303 in the database
+and make you believe that the counter increased by 303 in 300 seconds.
 This is where RRDtool interpolates: it alters the 303 value as if it
 would have been stored earlier and it will be 300 in 300 seconds.
 Next time you are at exactly the right time. This means that the current
-interval is 297 seconds and also the counter increased with 297. Again
-RRDtool alters the value and stores 300 as it should be.
+interval is 297 seconds and also the counter increased by 297. Again,
+RRDtool interpolates and stores 300 as it should be.
 
       in the RRD                 in reality
 
@@ -1100,28 +1165,29 @@ Create output
       AREA:unknown#FF0000
 
 View both images together (add them to your index.html file)
-and compare.  Both graphs should show the same, despite the
-input being different.  
+and compare. Both graphs should show the same, despite the
+input being different.
 
 =head1 WRAPUP
 
-It's time to wrap up this document. You now know all the basics to be
-able to work with RRDtool and to read the documentation available.
-There is plenty more to discover about RRDtool and you will find more and
-more uses for the package. You could create easy graphics using just the
-examples provided and using only RRDtool. You could also use the front
-ends that are available.
+It's time now to wrap up this tutorial. We covered all the basics for
+you to be able to work with RRDtool and to read the additional
+documentation available. There is plenty more to discover about
+RRDtool and you will find more and more uses for this package. You can
+easily create graphs using just the examples provided and using only
+RRDtool. You can also use one of the front ends to RRDtool that are
+available.
 
 =head1 MAILINGLIST
 
-Remember to subscribe to the mailing-list. Even if you are not answering
-the mails that come by, it helps both you and the rest. A lot of the stuff
-that I know about MRTG (and therefore about RRDtool) I've learned while
-just reading the list without posting to it. I did not need to ask the
-basic questions as they are answered in the FAQ (read it!) and
-in various mails by other users.
-With thousands of users all over the world, there will always be people
-who ask questions that you can answer because you read this and other
+Remember to subscribe to the RRDtool mailing list. Even if you are not
+answering to mails that come by, it helps both you and the rest of the
+users. A lot of the stuff that I know about MRTG (and therefore about
+RRDtool) I've learned while just reading the list without posting to
+it. I did not need to ask the basic questions as they are answered in
+the FAQ (read it!) and in various mails by other users. With
+thousands of users all over the world, there will always be people who
+ask questions that you can answer because you read this and other
 documentation and they didn't.
 
 =head1 SEE ALSO
@@ -1132,9 +1198,9 @@ The RRDtool manpages
 
 I hope you enjoyed the examples and their descriptions. If you do, help
 other people by pointing them to this document when they are asking
-basic questions. They will not only get their answer but at the same
+basic questions. They will not only get their answers, but at the same
 time learn a whole lot more.
 
 Alex van den Bogaerdt
-E<lt>alex@ergens.op.het.netE<gt>
+E<lt>alex@vandenbogaerdt.nlE<gt>