Code

800dcca6e79b3e6ad018559caaec01b2486793f8
[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
41        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]
42            Depending on the context, either the value component or the time
43            component of a V\bVD\bDE\bEF\bF is printed using _\bf_\bo_\br_\bm_\ba_\bt. It is an error to
44            specify a _\bv_\bn_\ba_\bm_\be generated by a D\bDE\bEF\bF or C\bCD\bDE\bEF\bF.
46            Any text in _\bf_\bo_\br_\bm_\ba_\bt is printed literally with one exception: The
47            percent character introduces a formatter string. This string can
48            be:
50            For printing values:
52            %\b%%\b% - just prints a literal '%' character
54            %\b%#\b#.\b.#\b#l\ble\be - prints numbers like 1.2346e+04. The optional integers #
55            denote field width and decimal precision.
57            %\b%#\b#.\b.#\b#l\blf\bf - prints numbers like 12345.6789, with optional field width
58            and 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 accord-
62            ingly (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 define
66            one (just like %\b%s\bs) unless the value is zero, in which case the
67            magnitude unit stays undefined. Thus, formatter strings using %\b%S\bS
68            and no %\b%s\bs will all use the same magnitude unit except for zero val-
69            ues.
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
92            to 23).
94            %\b%I\bI - The hour as a decimal number using a 12-hour clock (range 01
95            to 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 as
105            `pm' and midnight as `am'.  Note that in many locales and `pm'
106            notation is unsupported and in such cases %p will return an empty
107            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 of
113            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 has
117            at least 4 days in the current year, and with Monday as the first
118            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
121            0.  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 of
125            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
149        G\bGP\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bf_\bo_\br_\bm_\ba_\bt
150            This is the same as "PRINT", but printed inside the graph.
152        G\bGP\bPR\bRI\bIN\bNT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bC_\bF:\b:_\bf_\bo_\br_\bm_\ba_\bt
153            _\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
154            is the same as "PRINT", but printed inside the graph.
156        C\bCO\bOM\bMM\bME\bEN\bNT\bT:\b:_\bt_\be_\bx_\bt
157            Text is printed literally in the legend section of the graph. Note
158            that in RRDtool 1.2 you have to escape colons in COMMENT text in
159            the same way you have to escape them in *\b*P\bPR\bRI\bIN\bNT\bT commands by writing
160            '\b'\\b\:\b:'\b'.
162        V\bVR\bRU\bUL\bLE\bE:\b:_\bt_\bi_\bm_\be#\b#_\bc_\bo_\bl_\bo_\br [:\b:_\bl_\be_\bg_\be_\bn_\bd ]
163            Draw a vertical line at _\bt_\bi_\bm_\be.  Its color is composed from three
164            hexadecimal numbers specifying the rgb color components (00 is off,
165            FF is maximum) red, green and blue followed by an optional alpha.
166            Optionally, a legend box and string is printed in the legend sec-
167            tion. _\bt_\bi_\bm_\be may be a number or a variable from a V\bVD\bDE\bEF\bF. It is an
168            error to use _\bv_\bn_\ba_\bm_\bes from D\bDE\bEF\bF or C\bCD\bDE\bEF\bF here.
170        H\bHR\bRU\bUL\bLE\bE:\b:_\bv_\ba_\bl_\bu_\be#\b#_\bc_\bo_\bl_\bo_\br [ :_\bl_\be_\bg_\be_\bn_\bd ]
171            Draw a horizontal line at _\bv_\ba_\bl_\bu_\be.  HRULE acts much like LINE except
172            that will have no effect on the scale of the graph. If a HRULE is
173            outside the graphing area it will just not be visible.
175        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]]
176            Draw a line of the specified width onto the graph. _\bw_\bi_\bd_\bt_\bh can be a
177            floating point number. If the color is not specified, the drawing
178            is done 'invisibly'. This is useful when stacking something else on
179            top of this line. Also optional is the legend box and string which
180            will be printed in the legend section if specified. The v\bva\bal\blu\bue\be can
181            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-
182            fier is used, this line is stacked on top of the previous element
183            which can be a L\bLI\bIN\bNE\bE or an A\bAR\bRE\bEA\bA.
185            When you do not specify a color, you cannot specify a legend.
186            Should you want to use STACK, use the "LINEx:<value>::STACK" form.
188        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]]
189            See L\bLI\bIN\bNE\bE, however the area between the x-axis and the line will be
190            filled.
192        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]]
193            Plot a tick mark (a vertical line) for each value of _\bv_\bn_\ba_\bm_\be that is
194            non-zero and not *UNKNOWN*. The _\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn argument specifies the
195            length of the tick mark as a fraction of the y-axis; the default
196            value is 0.1 (10% of the axis). Note that the color specification
197            is not optional. The TICK marks normaly start at the lower edge of
198            the graphing area. If the fraction is negative they start at the
199            upper border of the graphing area.
201        S\bSH\bHI\bIF\bFT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b:_\bo_\bf_\bf_\bs_\be_\bt
202            Using this command R\bRR\bRD\bDt\bto\boo\bol\bl will graph the following elements with
203            the specified offset.  For instance, you can specify an offset of
204            ( 7*24*60*60 = ) 604'800 seconds to "look back" one week. Make sure
205            to tell the viewer of your graph you did this ...  As with the
206            other graphing elements, you can specify a number or a variable
207            here.
209        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]
210            _\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.
212        S\bSo\bom\bme\be n\bno\bot\bte\bes\bs o\bon\bn s\bst\bta\bac\bck\bki\bin\bng\bg
214        When stacking, an element is not placed above the X-axis but rather on
215        top of the previous element.  There must be something to stack upon.
217        You can use an i\bin\bnv\bvi\bis\bsi\bib\bbl\ble\be LINE or AREA to stacked upon.
219        An u\bun\bnk\bkn\bno\bow\bwn\bn value makes the entire stack unknown from that moment on.
220        You don't know where to begin (the unknown value) and therefore do not
221        know where to end.
223        If you want to make sure you will be displaying a certain variable,
224        make sure never to stack upon the unknown value.  Use a CDEF instruc-
225        tion with I\bIF\bF and U\bUN\bN to do so.
227 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
228        E\bEs\bsc\bca\bap\bpi\bin\bng\bg t\bth\bhe\be c\bco\bol\blo\bon\bn
230        A colon ':' in a _\bl_\be_\bg_\be_\bn_\bd argument will mark the end of the legend. To
231        enter a ':' as part of a legend, the colon must be escaped with a back-
232        slash '\:'.  Beware that many environments process backslashes them-
233        selves, so it may be necessary to write two backslashes in order to one
234        being passed onto rrd_graph.
236        S\bSt\btr\bri\bin\bng\bg F\bFo\bor\brm\bma\bat\btt\bti\bin\bng\bg
238        The text printed below the actual graph can be formatted by appending
239        special escape characters at the end of a text. When ever such a char-
240        acter occurs, all pending text is pushed onto the graph according to
241        the character specified.
243        Valid markers are: \\b\j\bj for justified, \\b\l\bl for left aligned, \\b\r\br for right
244        aligned, and \\b\c\bc for centered. In the next section there is an example
245        showing how to use centered formatting.
247        \\b\n\bn is a valid alias for \\b\l\bl since incomplete parsing in earlier versions
248        of rrdtool lead to this behaviour and a number of people has been using
249        it.
251        Normally there are two space characters inserted between every two
252        items printed into the graph. The space following a string can be sup-
253        pressed by putting a \\b\g\bg at the end of the string. The \\b\g\bg also ignores
254        any space inside the string if it is at the very end of the string.
255        This can be used in connection with %\b%s\bs to suppress empty unit strings.
257         GPRINT:a:MAX:%lf%s\g
259        A special case is COMMENT:\\b\s\bs which inserts some additional vertical
260        space before placing the next row of legends.
262        If you are using the proportional font in your graph, you can use tab
263        characters or the sequence \\b\t\bt to line-up legend elements. Note that the
264        tabs inserted are relative to the start of the current legend element!
266 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
267        rrdgraph gives an overview of how r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh works.  rrdgraph_data
268        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
269        language used in the ?\b?D\bDE\bEF\bF statements.  rrdgraph_graph page describes
270        all of the graph and print functions.
272        Make sure to read rrdgraph_examples for tips&tricks.
274 A\bAU\bUT\bTH\bHO\bOR\bR
275        Program by Tobias Oetiker <tobi@oetiker.ch>
277        This manual page by Alex van den Bogaerdt <alex@ergens.op.het.net>
281 1.2.27                            2008-02-17                 RRDGRAPH_GRAPH(1)