=head1 NAME rrdtool graph - Round Robin Database tool grapher functions WARNING: This is for version 1.1.x which is B> software. The software may contain serious bugs. Some of the items described in here may not yet exist (although this should be mentioned) or still be in the alpha stage. As with every other RRDtool release: use at your own risk. In contrast with the stable version of RRDtool, this release may contain bugs known to the authors. It is highly recommended that you subscribe to the mailing list. =head1 SYNOPSYS B I [EB>E ...] EB>E [EB>E ...] [EB>E ...] [EB>E ...] [EB>E ...] [EB>E ...] =head1 DESCRIPTION The B function of B is used to represent the data from an B to a human viewer. Its main purpose is to create a nice graphical representation but it can also generate a numerical report. =head1 OVERVIEW B needs data to work with, use one or more B> statements to collect this data. You are not limited to one database, it's perfectly legal to collect data from two or more databases (one per statement though). If you want to display averages, maxima, percentiles etcetera it is best to collect them now using the B> statement. At this stage, this command works at the unprocessed data from the B. I<(Note: this is not yet true; it works on consolidated information right now)> The data fetched from the B is then B so that there is exactly one datapoint per pixel in the graph. If you do not take care yourself, B will expand the range slightly if necessary (in that case the first pixel may very well become unknown!). Sometimes data is not exactly as you would like to display it. For instance, you might be collecting B per second but want to display B per second. This is where the B> command is designed for. After B the data, a copy is made and this copy is modified using a rather flexible B> command set. If you use B> statements after this, they work on the consolidated data and may return other values for maximum, minimum etcetera! When you are done fetching and processing the data, it is time to graph it (or print it). This ends the B sequence. =head1 OPTIONS It is expected that most options will move to the graph definition statements (after all, most of them do define graph elements...). =over 4 =item filename The name and path of the graph to generate. It is recommended to end this in C<.png> or C<.gif> but B does not enforce this. I can be 'C<->' to send the image to C. In that case, no other output is generated. Z<> =item Time range B<[-s|--start EtimeE]> B<[-e|--end EtimeE]> B<[--step EsecondsE]> The start and end of what you would like to display, and which B the data should come from. Defaults are: 1 day ago until now, with the best possible resolution. B and B can be specified in several formats, see L and L. By default, B calculates the width of one pixel in the time domain and tries to get data from an B with that resolution. With the B option you can alter this behaviour. If you want B to get data at a one-hour resolution from the B, set B to 3600. Note: a step smaller than one pixel will silently be ignored. Z<> =item Labels B<[-t|--title EstringE]> B<[-v|--vertical-label EstringE]> A horizontal string at the top of the graph and/or a vertically placed string at the left hand side of the graph. I The string can contain formatter options that are used to include variables (from Bs) and newlines. Z<> =item Size B<[-w|--width EpixelsE]> B<[-h|--heigth EpixelsE]> The width and height of the B (the part of the graph with the actual lines and such). Defaults are 400 pixels by 100 pixels. Z<> =item Limits I B<[-u|--upper-limit EvalueE]> B<[-l|--lower-limit EvalueE]> B<[-r|--rigid]> By default the graph will be autoscaling so that it displays the portion of the y-axis that is actually used. You can change this behaviour by setting the limits. The displayed y-axis will show at least from B to B. Autoscaling will still permit those boundaries to be stretched unless the B option is set. I B<[--maximum-upper-limit EvalueE]> B<[--minimum-upper-limit EvalueE]> B<[--maximum-lower-limit EvalueE]> B<[--minimum-lower-limit EvalueE]> By default the graph will be autoscaling so that it displays the portion of the y-axis that is actually used. You can change this behaviour by setting the limits. The displayed y-axis will show at most B and at least B at the top, and similarily at least B and at most B at the bottom. The default is to display at most B (so: no limit) and at least B (no minimal value) at the top. The bottom of the graph has similar defaults. Note that the minimum lower limit is the lowest one so you should compare this with maximum upper limit when you try to figure out what you should set. To make sure the graph shows the range of I<-1000> to I<2000>, optionally expanding to no more than I<-3000> to I<4000>, set the following options: --maximum-upper-limit 4000 --minimum-upper-limit 2000 --maximum-lower-limit -1000 --minimum-lower-limit -3000 To mimic the old B option, you can do: --maximum-upper-limit 4000 --minimum-upper-limit 4000 --maximum-lower-limit -3000 --minimum-lower-limit -3000 B<[--alt-autoscale]> Sometimes the default algorithm for selecting the y-axis scale is not performing very well. Normally the scale is selected from a predefined set of ranges and this fails miserably when you need to graph something like C<260 + 0.001 * sin(x)>. This option calculates the minimum and maximum y-axis from the actual minimum and maximum values. Our example would display slightly less than C<260-0.001> to slightly more than C<260+0.001> (Contributed by Sasha Mikheev). B<[--alt-autoscale-max]> Where C<--alt-autoscale> will modify both the absolute maximum AND minimum values, this option will only affect the maximum value. The minimum value, if not defined on the command line, will be 0. This option can be useful when graphing router traffic when the WAN line uses compression, and thus the throughput may be higher than the WAN line speed. Z<> =item Grid =over 4 =item X-Axis B<[-x|--x-grid EIGSTC<:>MTMC<:>MSTC<:>LTMC<:>LSTC<:>LPRC<:>LFM>E|C]> The x-axis label is quite complex to configure, if you don't have very special needs it is probably best to rely on the autoconfiguration to get this right. You can specify the string C to skip the grid and labels altogether. The grid is defined by specifying a certain amount of time in the I positions. You can choose from C, C, C, C, C, C or C. Then you define how many of these should pass between each line or label. This pair (I) needs to be specified for the base grid (I), the major grid (I) and the labels (I). For the labels you also need to define a precision in I and a I format string in I. I defines where each label will be placed. If it is zero, the label will be placed right under the corresponding line (useful for hours, dates etcetera). If you specify a number of seconds here the label is centered in this interval (useful for monday, januari etcetera). Example: C<--x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X> This places grid lines every 10 minutes, major grid lines every hour and labels every 4 hours. The labels are placed under the major grid lines as they specify exactly that time. Example: C<--x-grid HOUR:8:DAY:1:DAY:1:0:%A> This places grid lines every 8 hours, major grid lines and labels each day. The labels are placed exactly between two major grid lines as they specify the complete day and not just midnight. Z<> =item Y-Axis B<[-y|--y-grid Igrid stepE:Elabel factorE>|C]> Y-axis grid lines appear at each I interval. Labels are placed every I