.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "RRDGRAPH_EXAMPLES 1" .TH RRDGRAPH_EXAMPLES 1 "2007-11-20" "1.2.26" "rrdtool" .SH "NAME" rrdgraph_examples \- Examples for rrdtool graph .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBrrdtool graph /home/httpd/html/test.png \-\-img\-format \s-1PNG\s0\fR .PP followed by any of the examples below .SH "DESCRIPTION" .IX Header "DESCRIPTION" For your convenience some of the commands are explained here by using detailed examples. They are not always cut-and-paste ready because comments are intermixed with the examples. .SH "EXAMPLES" .IX Header "EXAMPLES" .Sh "Data with multiple resolutions" .IX Subsection "Data with multiple resolutions" .Vb 7 \& \-\-end now \-\-start end\-120000s \-\-width 400 \& DEF:ds0a=/home/rrdtool/data/router1.rrd:ds0:AVERAGE \& DEF:ds0b=/home/rrdtool/data/router1.rrd:ds0:AVERAGE:step=1800 \& DEF:ds0c=/home/rrdtool/data/router1.rrd:ds0:AVERAGE:step=7200 \& LINE1:ds0a#0000FF:"default resolution\el" \& LINE1:ds0b#00CCFF:"resolution 1800 seconds per interval\el" \& LINE1:ds0c#FF00FF:"resolution 7200 seconds per interval\el" .Ve .Sh "Nicely formatted legend section" .IX Subsection "Nicely formatted legend section" .Vb 10 \& DEF:ds0=/home/rrdtool/data/router1.rrd:ds0:AVERAGE \& DEF:ds1=/home/rrdtool/data/router1.rrd:ds1:AVERAGE \& VDEF:ds0max=ds0,MAXIMUM \& VDEF:ds0avg=ds0,AVERAGE \& VDEF:ds0min=ds0,MINIMUM \& VDEF:ds0pct=ds0,95,PERCENT \& VDEF:ds1max=ds1,MAXIMUM \& VDEF:ds1avg=ds1,AVERAGE \& VDEF:ds1min=ds1,MINIMUM \& VDEF:ds1pct=ds1,95,PERCENT .Ve .PP Note: consolidation occurs here. .PP .Vb 2 \& CDEF:ds0bits=ds0,8,* \& CDEF:ds1bits=ds1,8,* .Ve .PP Note: 10 spaces to move text to the right .PP .Vb 1 \& COMMENT:" " .Ve .PP Note: the column titles have to be as wide as the columns .PP .Vb 3 \& COMMENT:"Maximum " \& COMMENT:"Average " \& COMMENT:"Minimum " .Ve .PP .Vb 11 \& COMMENT:"95th percentile\el" \& AREA:ds0bits#00C000:"Inbound " \& GPRINT:ds0max:"%6.2lf %Sbps" \& GPRINT:ds0avg:"%6.2lf %Sbps" \& GPRINT:ds0min:"%6.2lf %Sbps" \& GPRINT:ds0pct:"%6.2lf %Sbps\el" \& LINE1:ds1bits#0000FF:"Outbound" \& GPRINT:ds1max:"%6.2lf %Sbps" \& GPRINT:ds1avg:"%6.2lf %Sbps" \& GPRINT:ds1min:"%6.2lf %Sbps" \& GPRINT:ds1pct:"%6.2lf %Sbps\el" .Ve .Sh "Offsetting a line on the y\-axis" .IX Subsection "Offsetting a line on the y-axis" Depending on your needs you can do this in two ways: .IP "\(bu" 4 Offset the data, then graph this .Sp .Vb 1 \& DEF:mydata=my.rrd:ds:AVERAGE .Ve .Sp Note: this will also influence any other command that uses \*(L"data\*(R" .Sp .Vb 2 \& CDEF:data=mydata,100,+ \& LINE1:data#FF0000:"Data with offset" .Ve .IP "\(bu" 4 Graph the original data, with an offset .Sp .Vb 1 \& DEF:mydata=my.rrd:ds:AVERAGE .Ve .Sp Note: no color in the first line so it is not visible .Sp .Vb 1 \& LINE1:100 .Ve .Sp Note: the second line gets stacked on top of the first one .Sp .Vb 1 \& LINE1:data#FF0000:"Data with offset":STACK .Ve .Sh "Time ranges" .IX Subsection "Time ranges" .Vb 6 \& Last four weeks: \-\-start end\-4w \-\-end 00:00 \& January 2001: \-\-start 20010101 \-\-end start+31d \& January 2001: \-\-start 20010101 \-\-end 20010201 \& Last hour: \-\-start end\-1h \& Last 24 hours: \& Yesterday: \-\-end 00:00 .Ve .Sh "Viewing the current and previous week together" .IX Subsection "Viewing the current and previous week together" .Vb 3 \& \-\-end now \-\-start end\-1w \& DEF:thisweek=router.rrd:ds0:AVERAGE \& DEF:lastweek=router.rrd:ds0:AVERAGE:end=now\-1w:start=end\-1w .Ve .PP Shift the data forward by one week (604800 seconds) .PP .Vb 4 \& SHIFT:lastweek:604800 \& [ more of the usual VDEF and CDEF stuff if you like ] \& AREA:lastweek#0000FF:Last\e week \& LINE1:thisweek#FF0000:This\e week .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" rrdgraph gives an overview of how \fBrrdtool graph\fR works. rrdgraph_data describes \fB\s-1DEF\s0\fR,\fB\s-1CDEF\s0\fR and \fB\s-1VDEF\s0\fR in detail. rrdgraph_rpn describes the \fB\s-1RPN\s0\fR language used in the \fBxDEF\fR statements. rrdgraph_graph page describes all the graph and print functions. .PP Make sure to read rrdgraph_examples for tips&tricks. .SH "AUTHOR" .IX Header "AUTHOR" Program by Tobias Oetiker .PP This manual page by Alex van den Bogaerdt