X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Frrdgraph.txt;fp=doc%2Frrdgraph.txt;h=8c7717da9689d68f1e8177b692c585770454eb9c;hb=645054bac6187b0e83fd4125fd59e4feda216b64;hp=6bb25bc92343feb5e3251312887bd6c0fa1ef545;hpb=ffa00ac697dccce18dca8880ca7a14066521ac5c;p=pkg-rrdtool.git diff --git a/doc/rrdgraph.txt b/doc/rrdgraph.txt index 6bb25bc..8c7717d 100644 --- a/doc/rrdgraph.txt +++ b/doc/rrdgraph.txt @@ -12,8 +12,8 @@ SSYYNNOOPPSSIISS DDEESSCCRRIIPPTTIIOONN The ggrraapphh function of RRRRDDttooooll is used to present the data from an RRRRDD - to a human viewer. Its main purpose is to create a nice graphical rep- - resentation, but it can also generate a numerical report. + to a human viewer. Its main purpose is to create a nice graphical + representation, but it can also generate a numerical report. OOVVEERRVVIIEEWW rrrrddttooooll ggrraapphh needs data to work with, so you must use one or more ddaattaa @@ -22,9 +22,9 @@ OOVVEERRVVIIEEWW databases (one per statement, though). If you want to display averages, maxima, percentiles, etcetera it is - best to collect them now using the vvaarriiaabbllee ddeeffiinniittiioonn statement. Cur- - rently this makes no difference, but in a future version of rrdtool you - may want to collect these values before consolidation. + best to collect them now using the vvaarriiaabbllee ddeeffiinniittiioonn statement. + Currently this makes no difference, but in a future version of rrdtool + you may want to collect these values before consolidation. The data fetched from the RRRRAA is then ccoonnssoolliiddaatteedd so that there is exactly one datapoint per pixel in the graph. If you do not take care @@ -45,54 +45,50 @@ OOVVEERRVVIIEEWW more information. OOPPTTIIOONNSS - _f_i_l_e_n_a_m_e - + _f_i_l_e_n_a_m_e The name and path of the graph to generate. It is recommended to end this in ".png", ".svg" or ".eps", but RRRRDDttooooll does not enforce this. _f_i_l_e_n_a_m_e can be '"-"' to send the image to "stdout". In this case, no other output is generated. - TTiimmee rraannggee - + TTiimmee rraannggee [--ss|----ssttaarrtt _t_i_m_e] [--ee|----eenndd _t_i_m_e] [--SS|----sstteepp _s_e_c_o_n_d_s] The start and end of the time series you would like to display, and which RRRRAA the data should come from. Defaults are: 1 day ago until now, with the best possible resolution. SSttaarrtt and eenndd can be specified - in several formats, see AT-STYLE TIME SPECIFICATION and rrdgraph_exam- - ples. By default, rrrrddttooooll ggrraapphh calculates the width of one pixel in - the time domain and tries to get data from an RRRRAA with that resolution. - With the sstteepp option you can alter this behaviour. If you want rrrrddttooooll - ggrraapphh to get data at a one-hour resolution from the RRRRDD, set sstteepp to - 3'600. Note: a step smaller than one pixel will silently be ignored. - - LLaabbeellss - + in several formats, see AT-STYLE TIME SPECIFICATION and + rrdgraph_examples. By default, rrrrddttooooll ggrraapphh calculates the width of + one pixel in the time domain and tries to get data from an RRRRAA with + that resolution. With the sstteepp option you can alter this behaviour. + If you want rrrrddttooooll ggrraapphh to get data at a one-hour resolution from the + RRRRDD, set sstteepp to 3'600. Note: a step smaller than one pixel will + silently be ignored. + + LLaabbeellss [--tt|----ttiittllee _s_t_r_i_n_g] [--vv|----vveerrttiiccaall--llaabbeell _s_t_r_i_n_g] A horizontal string at the top of the graph and/or a vertically placed string at the left hand side of the graph. - SSiizzee - + SSiizzee [--ww|----wwiiddtthh _p_i_x_e_l_s] [--hh|----hheeiigghhtt _p_i_x_e_l_s] [--jj|----oonnllyy--ggrraapphh] [--DD|----ffuullll--ssiizzee--mmooddee] By default, the width and height of the ccaannvvaass (the part with the actual data and such). This defaults to 400 pixels by 100 pixels. - If you specify the ----ffuullll--ssiizzee--mmooddee option, the width and height spec- - ify the final dimensions of the output image and the canvas is automat- - ically resized to fit. + If you specify the ----ffuullll--ssiizzee--mmooddee option, the width and height + specify the final dimensions of the output image and the canvas is + automatically resized to fit. If you specify the ----oonnllyy--ggrraapphh option and set the height < 32 pixels you will get a tiny graph image (thumbnail) to use as an icon for use in an overview, for example. All labeling will be stripped off the graph. - LLiimmiittss - + LLiimmiittss [--uu|----uuppppeerr--lliimmiitt _v_a_l_u_e] [--ll|----lloowweerr--lliimmiitt _v_a_l_u_e] [--rr|----rriiggiidd] By default the graph will be autoscaling so that it will adjust the @@ -113,19 +109,21 @@ OOPPTTIIOONNSS [--JJ|----aalltt--aauuttoossccaallee--mmiinn] - Where "--alt-autoscale" will modify both the absolute maximum AND mini- - mum values, this option will only affect the minimum value. The maximum - 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 compres- - sion, and thus the throughput may be higher than the WAN line speed. + Where "--alt-autoscale" will modify both the absolute maximum AND + minimum values, this option will only affect the minimum value. The + maximum 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. [--MM|----aalltt--aauuttoossccaallee--mmaaxx] - Where "--alt-autoscale" will modify both the absolute maximum AND mini- - mum 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 compres- - sion, and thus the throughput may be higher than the WAN line speed. + Where "--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. [--NN|----nnoo--ggrriiddffiitt] @@ -136,8 +134,7 @@ OOPPTTIIOONNSS Gridfitting is turned off for PDF, EPS, SVG output by default. - XX--AAxxiiss - + XX--AAxxiiss [--xx|----xx--ggrriidd _G_T_M::_G_S_T::_M_T_M::_M_S_T::_L_T_M::_L_S_T::_L_P_R::_L_F_M] [--xx|----xx--ggrriidd nnoonnee] @@ -150,13 +147,13 @@ OOPPTTIIOONNSS The grid is defined by specifying a certain amount of time in the _?_T_M positions. You can choose from "SECOND", "MINUTE", "HOUR", "DAY", "WEEK", "MONTH" or "YEAR". Then you define how many of these should - pass between each line or label. This pair (_?_T_M_:_?_S_T) needs to be spec- - ified for the base grid (_G_?_?), the major grid (_M_?_?) and the labels + pass between each line or label. This pair (_?_T_M_:_?_S_T) needs to be + specified for the base grid (_G_?_?), the major grid (_M_?_?) and the labels (_L_?_?). For the labels you also must define a precision in _L_P_R and a _s_t_r_f_t_i_m_e format string in _L_F_M. _L_P_R defines where each label will be - placed. If it is zero, the label will be placed right under the corre- - sponding line (useful for hours, dates etcetera). If you specify a - number of seconds here the label is centered on this interval (useful + 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 on this interval (useful for Monday, January etcetera). --x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X @@ -171,16 +168,15 @@ OOPPTTIIOONNSS day. The labels are placed exactly between two major grid lines as they specify the complete day and not just midnight. - YY--AAxxiiss - + YY--AAxxiiss [--yy|----yy--ggrriidd _g_r_i_d _s_t_e_p::_l_a_b_e_l _f_a_c_t_o_r] [--yy|----yy--ggrriidd nnoonnee] Y-axis grid lines appear at each _g_r_i_d _s_t_e_p interval. Labels are placed every _l_a_b_e_l _f_a_c_t_o_r lines. You can specify "-y none" to suppress the - grid and labels altogether. The default for this option is to automat- - ically select sensible values. + grid and labels altogether. The default for this option is to + automatically select sensible values. If you have set --y-grid to 'none' not only the labels get suppressed, also the space reserved for the labels is removed. You can still add @@ -189,12 +185,12 @@ OOPPTTIIOONNSS [--YY|----aalltt--yy--ggrriidd] - Place the Y grid dynamically based on the graph's Y range. The algo- - rithm ensures that you always have a grid, that there are enough but - not too many grid lines, and that the grid is metric. That is the grid - lines are placed every 1, 2, 5 or 10 units. This parameter will also - ensure that you get enough decimals displayed even if your graph goes - from 69.998 to 70.001. (contributed by Sasha Mikheev). + Place the Y grid dynamically based on the graph's Y range. The + algorithm ensures that you always have a grid, that there are enough + but not too many grid lines, and that the grid is metric. That is the + grid lines are placed every 1, 2, 5 or 10 units. This parameter will + also ensure that you get enough decimals displayed even if your graph + goes from 69.998 to 70.001. (contributed by Sasha Mikheev). [--oo|----llooggaarriitthhmmiicc] @@ -202,15 +198,15 @@ OOPPTTIIOONNSS [--XX|----uunniittss--eexxppoonneenntt _v_a_l_u_e] - This sets the 10**exponent scaling of the y-axis values. Normally, val- - ues will be scaled to the appropriate units (k, M, etc.). However, you - may wish to display units always in k (Kilo, 10e3) even if the data is - in the M (Mega, 10e6) range, for instance. Value should be an integer - which is a multiple of 3 between -18 and 18 inclusively. It is the - exponent on the units you wish to use. For example, use 3 to display - the y-axis values in k (Kilo, 10e3, thousands), use -6 to display the - y-axis values in u (Micro, 10e-6, millionths). Use a value of 0 to - prevent any scaling of the y-axis values. + This sets the 10**exponent scaling of the y-axis values. Normally, + values will be scaled to the appropriate units (k, M, etc.). However, + you may wish to display units always in k (Kilo, 10e3) even if the data + is in the M (Mega, 10e6) range, for instance. Value should be an + integer which is a multiple of 3 between -18 and 18 inclusively. It is + the exponent on the units you wish to use. For example, use 3 to + display the y-axis values in k (Kilo, 10e3, thousands), use -6 to + display the y-axis values in u (Micro, 10e-6, millionths). Use a value + of 0 to prevent any scaling of the y-axis values. This option is very effective at confusing the heck out of the default rrdtool autoscaler and grid painter. If rrdtool detects that it is not @@ -226,11 +222,10 @@ OOPPTTIIOONNSS [----uunniittss==ssii] With this option y-axis values on logarithmic graphs will be scaled to - the appropriate units (k, M, etc.) instead of using exponential nota- - tion. Note that for linear graphs, SI notation is used by default. - - RRiigghhtt YY AAxxiiss + the appropriate units (k, M, etc.) instead of using exponential + notation. Note that for linear graphs, SI notation is used by default. + RRiigghhtt YY AAxxiiss [----rriigghhtt--aaxxiiss _s_c_a_l_e::_s_h_i_f_t] [----rriigghhtt--aaxxiiss--llaabbeell _l_a_b_e_l] A second axis will be drawn to the right of the graph. It is tied to @@ -243,8 +238,7 @@ OOPPTTIIOONNSS If you want todo this your self, use this option with the same %lf arguments you know from the PRING and GPRINT commands. - LLeeggeenndd - + LLeeggeenndd [--gg|----nnoo--lleeggeenndd] Suppress generation of the legend; only render the graph. @@ -262,12 +256,11 @@ OOPPTTIIOONNSS [----lleeggeenndd--ddiirreeccttiioonn=(topdown|bottomup)] - Place the legend items in the given vertical order. The default is top- - down. Using bottomup the legend items appear in the same vertical + Place the legend items in the given vertical order. The default is + topdown. Using bottomup the legend items appear in the same vertical order as a stack of lines or areas. - MMiisscceellllaanneeoouuss - + MMiisscceellllaanneeoouuss [--zz|----llaazzyy] Only generate the graph if the current graph is out of date or not @@ -307,14 +300,20 @@ OOPPTTIIOONNSS the right and bottom border, "GRID", "MGRID" for the major grid, "FONT" for the color of the font, "AXIS" for the axis of the graph, "FRAME" for the line around the color spots, and finally "ARROW" for the arrow - head pointing up and forward. Each color is composed out of three hex- - adecimal numbers specifying its rgb color component (00 is off, FF is - maximum) of red, green and blue. Optionally you may add another hex- - adecimal number specifying the transparency (FF is solid). You may set - this option several times to alter multiple defaults. + head pointing up and forward. Each color is composed out of three + hexadecimal numbers specifying its rgb color component (00 is off, FF + is maximum) of red, green and blue. Optionally you may add another + hexadecimal number specifying the transparency (FF is solid). You may + set this option several times to alter multiple defaults. A green arrow is made by: "--color ARROW#00FF00" + [----bboorrddeerr _w_i_d_t_h]] + + Width in pixels for the 3d border drawn around the image. Default 2, 0 + disables the border. See "SHADEA" and "SHADEB" above for setting the + border color. + [----zzoooomm _f_a_c_t_o_r] Zoom the graphics by the given amount. The factor must be > 0 @@ -323,12 +322,15 @@ OOPPTTIIOONNSS This lets you customize which font to use for the various text elements on the RRD graphs. "DEFAULT" sets the default value for all elements, - "TITLE" for the title, "AXIS" for the axis labels, "UNIT" for the ver- - tical unit label, "LEGEND" for the graph legend, "WATERMARK" for the + "TITLE" for the title, "AXIS" for the axis labels, "UNIT" for the + vertical unit label, "LEGEND" for the graph legend, "WATERMARK" for the watermark on the edge of the graph. Use Times for the title: "--font TITLE:13:Times" + Note that you need to quote the argument to ----ffoonntt if the font-name + contains whitespace: --font "TITLE:13:Some Font" + If you do not give a font string you can modify just the size of the default font: "--font TITLE:13:". @@ -344,8 +346,8 @@ OOPPTTIIOONNSS full Pango syntax when selecting your font: The font name has the form "[_F_A_M_I_L_Y_-_L_I_S_T] [_S_T_Y_L_E_-_O_P_T_I_O_N_S] [_S_I_Z_E]", - where _F_A_M_I_L_Y_-_L_I_S_T is a comma separated list of families optionally ter- - minated by a comma, _S_T_Y_L_E___O_P_T_I_O_N_S is a whitespace separated list of + where _F_A_M_I_L_Y_-_L_I_S_T is a comma separated list of families optionally + terminated by a comma, _S_T_Y_L_E___O_P_T_I_O_N_S is a whitespace separated list of words where each WORD describes one of style, variant, weight, stretch, or gravity, and _S_I_Z_E is a decimal number (size in points) or optionally followed by the unit modifier "px" for absolute size. Any one of the @@ -390,8 +392,8 @@ OOPPTTIIOONNSS tt Monospace font u Underline - More details on . + More details on + . [--GG|----ggrraapphh--rreennddeerr--mmooddee {nnoorrmmaall,mmoonnoo}] @@ -410,10 +412,10 @@ OOPPTTIIOONNSS [--aa|----iimmggffoorrmmaatt PPNNGG|SSVVGG|EEPPSS|PPDDFF] Image format for the generated graph. For the vector formats you can - choose among the standard Postscript fonts Courier-Bold, - Courier-BoldOblique, Courier-Oblique, Courier, Helvetica-Bold, Hel- - vetica-BoldOblique, Helvetica-Oblique, Helvetica, Symbol, Times-Bold, - Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats. + choose among the standard Postscript fonts Courier-Bold, Courier- + BoldOblique, Courier-Oblique, Courier, Helvetica-Bold, Helvetica- + BoldOblique, Helvetica-Oblique, Helvetica, Symbol, Times-Bold, Times- + BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats. [--ii|----iinntteerrllaacceedd] @@ -436,8 +438,7 @@ OOPPTTIIOONNSS Adds the given string as a watermark, horizontally centered, at the bottom of the graph. - DDaattaa aanndd vvaarriiaabblleess - + DDaattaa aanndd vvaarriiaabblleess DDEEFF::_v_n_a_m_e==_r_r_d_f_i_l_e::_d_s_-_n_a_m_e::_C_F[::sstteepp==_s_t_e_p][::ssttaarrtt==_t_i_m_e][::eenndd==_t_i_m_e] CCDDEEFF::_v_n_a_m_e==_R_P_N _e_x_p_r_e_s_s_i_o_n @@ -454,16 +455,15 @@ OOPPTTIIOONNSS least one print statement to generate a report. See rrdgraph_graph for the exact format. - ggrraapphhvv - + ggrraapphhvv Calling rrdtool with the graphv option will return information in the rrdtool info format. On the command line this means that all output will be in key=value format. When used from the Perl and Ruby bindings a hash pointer will be returned from the call. When the filename '-' is given, the contents of the graph itself will - also be returned through this interface (hash key 'image'). On the com- - mand line the output will look like this: + also be returned through this interface (hash key 'image'). On the + command line the output will look like this: print[0] = "0.020833" print[1] = "0.0440833" @@ -509,4 +509,4 @@ AAUUTTHHOORR -1.3.99909060808 2009-05-21 RRDGRAPH(1) +1.3.999 2009-09-24 RRDGRAPH(1)