Code

Imported upstream version 1.2.26
[pkg-rrdtool.git] / doc / rrdgraph_graph.txt
1 RRDGRAPH_GRAPH(1)                   rrdtool                  RRDGRAPH_GRAPH(1)
5 N\bNA\bAM\bME\bE
6        rrdgraph_graph - rrdtool graph command reference
8 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
9        P\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bf_\bo_\br_\bm_\ba_\bt
11        G\bGP\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bf_\bo_\br_\bm_\ba_\bt
13        C\bCO\bOM\bMM\bME\bEN\bNT\bT:\b:_\bt_\be_\bx_\bt
15        V\bVR\bRU\bUL\bLE\bE:\b:_\bt_\bi_\bm_\be#\b#_\bc_\bo_\bl_\bo_\br[:\b:_\bl_\be_\bg_\be_\bn_\bd]
17        H\bHR\bRU\bUL\bLE\bE:\b:_\bv_\ba_\bl_\bu_\be#\b#_\bc_\bo_\bl_\bo_\br[:\b:_\bl_\be_\bg_\be_\bn_\bd]
19        L\bLI\bIN\bNE\bE[_\bw_\bi_\bd_\bt_\bh]:\b:_\bv_\ba_\bl_\bu_\be[#\b#_\bc_\bo_\bl_\bo_\br][:\b:[_\bl_\be_\bg_\be_\bn_\bd][:\b:S\bST\bTA\bAC\bCK\bK]]
21        A\bAR\bRE\bEA\bA:\b:_\bv_\ba_\bl_\bu_\be[#\b#_\bc_\bo_\bl_\bo_\br][:\b:[_\bl_\be_\bg_\be_\bn_\bd][:\b:S\bST\bTA\bAC\bCK\bK]]
23        T\bTI\bIC\bCK\bK:\b:_\bv_\bn_\ba_\bm_\be#\b#_\br_\br_\bg_\bg_\bb_\bb[_\ba_\ba][:\b:_\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn[:\b:_\bl_\be_\bg_\be_\bn_\bd]]
25        S\bSH\bHI\bIF\bFT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bo_\bf_\bf_\bs_\be_\bt
27        P\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bC_\bF:\b:_\bf_\bo_\br_\bm_\ba_\bt (deprecated)
29        G\bGP\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bC_\bF:\b:_\bf_\bo_\br_\bm_\ba_\bt (deprecated)
31        S\bST\bTA\bAC\bCK\bK:\b:_\bv_\bn_\ba_\bm_\be#\b#_\bc_\bo_\bl_\bo_\br[:\b:_\bl_\be_\bg_\be_\bn_\bd] (deprecated)
33 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
34        These instructions allow you to generate your image or report.  If you
35        don't use any graph elements, no graph is generated.  Similarly, no
36        report is generated if you don't use print options.
38 P\bPR\bRI\bIN\bNT\bT
39        P\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bf_\bo_\br_\bm_\ba_\bt[:\b:s\bst\btr\brf\bft\bti\bim\bme\be]
40            Depending on the context, either the value component or the time
41            component of a V\bVD\bDE\bEF\bF is printed using _\bf_\bo_\br_\bm_\ba_\bt. It is an error to
42            specify a _\bv_\bn_\ba_\bm_\be generated by a D\bDE\bEF\bF or C\bCD\bDE\bEF\bF.
44            Any text in _\bf_\bo_\br_\bm_\ba_\bt is printed literally with one exception: The
45            percent character introduces a formatter string. This string can
46            be:
48            For printing values:
50            %\b%%\b%  just prints a literal '%' character
52            %\b%#\b#.\b.#\b#l\ble\be
53                prints numbers like 1.2346e+04. The optional integers # denote
54                field width and decimal precision.
56            %\b%#\b#.\b.#\b#l\blf\bf
57                prints numbers like 12345.6789, with optional field width and
58                precision.
60            %\b%s\bs  place this after %\b%l\ble\be, %\b%l\blf\bf or %\b%l\blg\bg. This will be replaced by the
61                appropriate SI magnitude unit and the value will be scaled
62                accordingly (123456 -> 123.456 k).
64            %\b%S\bS  is similar to %\b%s\bs. It does, however, use a previously defined
65                magnitude unit. If there is no such unit yet, it tries to
66                define one (just like %\b%s\bs) unless the value is zero, in which
67                case the magnitude unit stays undefined. Thus, formatter
68                strings using %\b%S\bS and no %\b%s\bs will all use the same magnitude unit
69                except for zero values.
71            If you PRINT a VDEF value, you can also print the time associated
72            with it by appending the string :\b:s\bst\btr\brf\bft\bti\bim\bme\be to the format. Note that
73            rrdtool uses the strftime function of your OSs clibrary. This means
74            that the conversion specifier may vary. Check the manual page if
75            you are uncertain. The following is a list of conversion specifiers
76            usually supported across the board.
78            %\b%a\ba  The abbreviated weekday name according to the current locale.
80            %\b%A\bA  The full weekday name according to the current locale.
82            %\b%b\bb  The abbreviated month name according to the current locale.
84            %\b%B\bB  The full month name according to the current locale.
86            %\b%c\bc  The preferred date and time representation for the current
87                locale.
89            %\b%d\bd  The day of the month as a decimal number (range 01 to 31).
91            %\b%H\bH  The hour as a decimal number using a 24-hour clock (range 00 to
92                23).
94            %\b%I\bI  The hour as a decimal number using a 12-hour clock (range 01 to
95                12).
97            %\b%j\bj  The day of the year as a decimal number (range 001 to 366).
99            %\b%m\bm  The month as a decimal number (range 01 to 12).
101            %\b%M\bM  The minute as a decimal number (range 00 to 59).
103            %\b%p\bp  Either `AM' or `PM' according to the given time value, or the
104                corresponding strings for the current locale.  Noon is treated
105                as `pm' and midnight as `am'.  Note that in many locales and
106                `pm' notation is unsupported and in such cases %p will return
107                an empty string.
109            %\b%S\bS  The second as a decimal number (range 00 to 61).
111            %\b%U\bU  The  week  number  of  the current year as a decimal number,
112                range 00 to 53, starting with the first Sunday as the first day
113                of week 01. See also %V and %W.
115            %\b%V\bV  The ISO 8601:1988 week number of the current year as a decimal
116                number, range 01 to  53,  where week  1 is the first week that
117                has at least 4 days in the current year, and with Monday as the
118                first day of the week. See also %U and %W.
120            %\b%w\bw  The day of the week as a decimal, range 0 to 6, Sunday being 0.
121                See also %u.
123            %\b%W\bW  The week number of the current year as a decimal number, range
124                00 to  53,  starting  with  the first Monday as the first day
125                of week 01.
127            %\b%x\bx  The preferred date representation for the current locale with-
128                out the time.
130            %\b%X\bX  The preferred time representation for the current locale with-
131                out the date.
133            %\b%y\by  The year as a decimal number without a century (range 00 to
134                99).
136            %\b%Y\bY  The year as a decimal number including the century.
138            %\b%Z\bZ  The time zone or name or abbreviation.
140            %\b%%\b%  A literal `%' character.
142        P\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bC_\bF:\b:_\bf_\bo_\br_\bm_\ba_\bt
143            _\bD_\be_\bp_\br_\be_\bc_\ba_\bt_\be_\bd_\b. _\bU_\bs_\be _\bt_\bh_\be _\bn_\be_\bw _\bf_\bo_\br_\bm _\bo_\bf _\bt_\bh_\bi_\bs _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bi_\bn _\bn_\be_\bw _\bs_\bc_\br_\bi_\bp_\bt_\bs_\b.  The
144            first form of this command is to be used with C\bCD\bDE\bEF\bF _\bv_\bn_\ba_\bm_\bes.
146 G\bGR\bRA\bAP\bPH\bH
147        G\bGP\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bf_\bo_\br_\bm_\ba_\bt
148            This is the same as "PRINT", but printed inside the graph.
150        G\bGP\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bC_\bF:\b:_\bf_\bo_\br_\bm_\ba_\bt
151            _\bD_\be_\bp_\br_\be_\bc_\ba_\bt_\be_\bd_\b. _\bU_\bs_\be _\bt_\bh_\be _\bn_\be_\bw _\bf_\bo_\br_\bm _\bo_\bf _\bt_\bh_\bi_\bs _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bi_\bn _\bn_\be_\bw _\bs_\bc_\br_\bi_\bp_\bt_\bs_\b.  This
152            is the same as "PRINT", but printed inside the graph.
154        C\bCO\bOM\bMM\bME\bEN\bNT\bT:\b:_\bt_\be_\bx_\bt
155            Text is printed literally in the legend section of the graph. Note
156            that in RRDtool 1.2 you have to escape colons in COMMENT text in
157            the same way you have to escape them in *\b*P\bPR\bRI\bIN\bNT\bT commands by writing
158            '\b'\\b\:\b:'\b'.
160        V\bVR\bRU\bUL\bLE\bE:\b:_\bt_\bi_\bm_\be#\b#_\bc_\bo_\bl_\bo_\br [:\b:_\bl_\be_\bg_\be_\bn_\bd ]
161            Draw a vertical line at _\bt_\bi_\bm_\be.  Its color is composed from three
162            hexadecimal numbers specifying the rgb color components (00 is off,
163            FF is maximum) red, green and blue followed by an optional alpha.
164            Optionally, a legend box and string is printed in the legend sec-
165            tion. _\bt_\bi_\bm_\be may be a number or a variable from a V\bVD\bDE\bEF\bF. It is an
166            error to use _\bv_\bn_\ba_\bm_\bes from D\bDE\bEF\bF or C\bCD\bDE\bEF\bF here.
168        H\bHR\bRU\bUL\bLE\bE:\b:_\bv_\ba_\bl_\bu_\be#\b#_\bc_\bo_\bl_\bo_\br [ :_\bl_\be_\bg_\be_\bn_\bd ]
169            Draw a horizontal line at _\bv_\ba_\bl_\bu_\be.  HRULE acts much like LINE except
170            that will have no effect on the scale of the graph. If a HRULE is
171            outside the graphing area it will just not be visible.
173        L\bLI\bIN\bNE\bE[_\bw_\bi_\bd_\bt_\bh]:\b:_\bv_\ba_\bl_\bu_\be[#\b#_\bc_\bo_\bl_\bo_\br][:\b:[_\bl_\be_\bg_\be_\bn_\bd][:\b:S\bST\bTA\bAC\bCK\bK]]
174            Draw a line of the specified width onto the graph. _\bw_\bi_\bd_\bt_\bh can be a
175            floating point number. If the color is not specified, the drawing
176            is done 'invisibly'. This is useful when stacking something else on
177            top of this line. Also optional is the legend box and string which
178            will be printed in the legend section if specified. The v\bva\bal\blu\bue\be can
179            be generated by D\bDE\bEF\bF, V\bVD\bDE\bEF\bF, and C\bCD\bDE\bEF\bF.  If the optional S\bST\bTA\bAC\bCK\bK modi-
180            fier is used, this line is stacked on top of the previous element
181            which can be a L\bLI\bIN\bNE\bE or an A\bAR\bRE\bEA\bA.
183            When you do not specify a color, you cannot specify a legend.
184            Should you want to use STACK, use the "LINEx:<value>::STACK" form.
186        A\bAR\bRE\bEA\bA:\b:_\bv_\ba_\bl_\bu_\be[#\b#_\bc_\bo_\bl_\bo_\br][:\b:[_\bl_\be_\bg_\be_\bn_\bd][:\b:S\bST\bTA\bAC\bCK\bK]]
187            See L\bLI\bIN\bNE\bE, however the area between the x-axis and the line will be
188            filled.
190        T\bTI\bIC\bCK\bK:\b:_\bv_\bn_\ba_\bm_\be#\b#_\br_\br_\bg_\bg_\bb_\bb[_\ba_\ba][:\b:_\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn[:\b:_\bl_\be_\bg_\be_\bn_\bd]]
191            Plot a tick mark (a vertical line) for each value of _\bv_\bn_\ba_\bm_\be that is
192            non-zero and not *UNKNOWN*. The _\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn argument specifies the
193            length of the tick mark as a fraction of the y-axis; the default
194            value is 0.1 (10% of the axis). Note that the color specification
195            is not optional. The TICK marks normaly start at the lower edge of
196            the graphing area. If the fraction is negative they start at the
197            upper border of the graphing area.
199        S\bSH\bHI\bIF\bFT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bo_\bf_\bf_\bs_\be_\bt
200            Using this command R\bRR\bRD\bDt\bto\boo\bol\bl will graph the following elements with
201            the specified offset.  For instance, you can specify an offset of
202            ( 7*24*60*60 = ) 604'800 seconds to "look back" one week. Make sure
203            to tell the viewer of your graph you did this ...  As with the
204            other graphing elements, you can specify a number or a variable
205            here.
207        S\bST\bTA\bAC\bCK\bK:\b:_\bv_\bn_\ba_\bm_\be#\b#_\bc_\bo_\bl_\bo_\br[:\b:_\bl_\be_\bg_\be_\bn_\bd]
208            _\bD_\be_\bp_\br_\be_\bc_\ba_\bt_\be_\bd_\b.  _\bU_\bs_\be _\bt_\bh_\be _\bS\bS_\bT\bT_\bA\bA_\bC\bC_\bK\bK _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs _\bo_\bn _\bt_\bh_\be _\bo_\bt_\bh_\be_\br _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\bs_\b.
210        S\bSo\bom\bme\be n\bno\bot\bte\bes\bs o\bon\bn s\bst\bta\bac\bck\bki\bin\bng\bg
212        When stacking, an element is not placed above the X-axis but rather on
213        top of the previous element.  There must be something to stack upon.
215        You can use an i\bin\bnv\bvi\bis\bsi\bib\bbl\ble\be LINE or AREA to stacked upon.
217        An u\bun\bnk\bkn\bno\bow\bwn\bn value makes the entire stack unknown from that moment on.
218        You don't know where to begin (the unknown value) and therefore do not
219        know where to end.
221        If you want to make sure you will be displaying a certain variable,
222        make sure never to stack upon the unknown value.  Use a CDEF instruc-
223        tion with I\bIF\bF and U\bUN\bN to do so.
225 N\bNO\bOT\bTE\bES\bS o\bon\bn l\ble\beg\bge\ben\bnd\bd a\bar\brg\bgu\bum\bme\ben\bnt\bts\bs
226        E\bEs\bsc\bca\bap\bpi\bin\bng\bg t\bth\bhe\be c\bco\bol\blo\bon\bn
228        A colon ':' in a _\bl_\be_\bg_\be_\bn_\bd argument will mark the end of the legend. To
229        enter a ':' as part of a legend, the colon must be escaped with a back-
230        slash '\:'.  Beware that many environments process backslashes them-
231        selves, so it may be necessary to write two backslashes in order to one
232        being passed onto rrd_graph.
234        S\bSt\btr\bri\bin\bng\bg F\bFo\bor\brm\bma\bat\btt\bti\bin\bng\bg
236        The text printed below the actual graph can be formatted by appending
237        special escape characters at the end of a text. When ever such a char-
238        acter occurs, all pending text is pushed onto the graph according to
239        the character specified.
241        Valid markers are: \\b\j\bj for justified, \\b\l\bl for left aligned, \\b\r\br for right
242        aligned, and \\b\c\bc for centered. In the next section there is an example
243        showing how to use centered formatting.
245        \\b\n\bn is a valid alias for \\b\l\bl since incomplete parsing in earlier versions
246        of rrdtool lead to this behaviour and a number of people has been using
247        it.
249        Normally there are two space characters inserted between every two
250        items printed into the graph. The space following a string can be sup-
251        pressed by putting a \\b\g\bg at the end of the string. The \\b\g\bg also ignores
252        any space inside the string if it is at the very end of the string.
253        This can be used in connection with %\b%s\bs to suppress empty unit strings.
255         GPRINT:a:MAX:%lf%s\g
257        A special case is COMMENT:\\b\s\bs which inserts some additional vertical
258        space before placing the next row of legends.
260        If you are using the proportional font in your graph, you can use tab
261        characters or the sequence \\b\t\bt to line-up legend elements. Note that the
262        tabs inserted are relative to the start of the current legend element!
264 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
265        rrdgraph gives an overview of how r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh works.  rrdgraph_data
266        describes D\bDE\bEF\bF,C\bCD\bDE\bEF\bF and V\bVD\bDE\bEF\bF in detail.  rrdgraph_rpn describes the R\bRP\bPN\bN
267        language used in the ?\b?D\bDE\bEF\bF statements.  rrdgraph_graph page describes
268        all of the graph and print functions.
270        Make sure to read rrdgraph_examples for tips&tricks.
272 A\bAU\bUT\bTH\bHO\bOR\bR
273        Program by Tobias Oetiker <tobi@oetiker.ch>
275        This manual page by Alex van den Bogaerdt <alex@ergens.op.het.net>
279 1.2.26                            2007-11-20                 RRDGRAPH_GRAPH(1)