X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=doc%2Frrdtutorial.pod;h=a63c74ab38a9e47e0cf19eccc64686624ee8342c;hb=3919b6d8c40073f47fc37424d0c022752ce85f29;hp=0ad0f74e37444bc4b3cdb42dbfe6d84de268bfa1;hpb=5837606887a6d81e8b1f7588525cb1c8783fb62b;p=rrdtool.git diff --git a/doc/rrdtutorial.pod b/doc/rrdtutorial.pod index 0ad0f74..a63c74a 100644 --- a/doc/rrdtutorial.pod +++ b/doc/rrdtutorial.pod @@ -67,7 +67,7 @@ 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 GIF format for display on a web browser. Those GIF +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 @@ -312,12 +312,12 @@ What this output represents will become clear in the rest of the tutorial. Try the following command: - rrdtool graph speed.gif \ + rrdtool graph speed.png \ --start 920804400 --end 920808000 \ DEF:myspeed=test.rrd:speed:AVERAGE \ LINE2:myspeed#FF0000 -This will create speed.gif which starts at 12:00 and ends at 13:00. +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. @@ -341,9 +341,9 @@ The "color" black is all colors off: 000000 magenta #FF00FF (mixed red with blue) gray #555555 (one third of all components) -The GIF you just created can be displayed using your favorite image -viewer. Web browsers will display the GIF via the URL -"file://the/path/to/speed.gif" +The PNG you just created can be displayed using your favorite image +viewer. Web browsers will display the PNG via the URL +"file://the/path/to/speed.png" =head2 Graphics with some math @@ -362,18 +362,18 @@ 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 -gif file ! +png file ! - rrdtool graph speed2.gif \ + rrdtool graph speed2.png \ --start 920804400 --end 920808000 \ --vertical-label m/s \ DEF:myspeed=test.rrd:speed:AVERAGE \ - CDEF:realspeed=myspeed,1000,* \ + CDEF:realspeed=myspeed,1000,\* \ LINE2:realspeed#FF0000 -After viewing this GIF, you notice the "m" has disappeared. This it what +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 GIF should be the same. +Apart from the things mentioned above, the PNG should be 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 @@ -393,9 +393,9 @@ 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 -Now let's create this GIF, and add some more magic ... +Now let's create this PNG, and add some more magic ... - rrdtool graph speed3.gif \ + rrdtool graph speed3.png \ --start 920804400 --end 920808000 \ --vertical-label km/h \ DEF:myspeed=test.rrd:speed:AVERAGE \ @@ -424,9 +424,9 @@ For the other speed: I like to believe there are virtually no limits to how RRDtool graph can manipulate data. I will not explain how it works, but look at the -following GIF: +following PNG: - rrdtool graph speed4.gif \ + rrdtool graph speed4.png \ --start 920804400 --end 920808000 \ --vertical-label km/h \ DEF:myspeed=test.rrd:speed:AVERAGE \ @@ -439,20 +439,20 @@ following GIF: AREA:fast#550000:"Too fast" \ STACK:over#FF0000:"Over speed" -Let's create a quick and dirty HTML page to view three GIFs: +Let's create a quick and dirty HTML page to view three PNGs: