Code

Imported upstream version 1.4~rc2.
[pkg-rrdtool.git] / doc / rrd-beginners.1
index d36a4ce19904331530ecda6a915a4f87bd342756..5c10b1008aa6e55042af6db52b9f432c18778e97 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\"
 .\" 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 Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
 ..
 .\" 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-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(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-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" 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.
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" 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.
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRD-BEGINNERS 1"
 .\" ========================================================================
 .\"
 .IX Title "RRD-BEGINNERS 1"
-.TH RRD-BEGINNERS 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRD-BEGINNERS 1 "2008-03-15" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrd\-beginners \- RRDtool Beginners' Guide
 .SH "SYNOPSIS"
 .SH "NAME"
 rrd\-beginners \- RRDtool Beginners' Guide
 .SH "SYNOPSIS"
@@ -142,7 +143,7 @@ databases. With help of an example, it explains the structure of RRDtool
 database. This is followed by an overview of the \*(L"graph\*(R" feature of RRDtool.
 At the end, it has sample scripts that illustrate the
 usage/wrapping of RRDtool within Shell or Perl scripts.
 database. This is followed by an overview of the \*(L"graph\*(R" feature of RRDtool.
 At the end, it has sample scripts that illustrate the
 usage/wrapping of RRDtool within Shell or Perl scripts.
-.SS "What makes RRDtool so special?"
+.Sh "What makes RRDtool so special?"
 .IX Subsection "What makes RRDtool so special?"
 RRDtool is \s-1GNU\s0 licensed software developed by Tobias Oetiker, a system
 manager at the Swiss Federal Institute of Technology. Though it is a
 .IX Subsection "What makes RRDtool so special?"
 RRDtool is \s-1GNU\s0 licensed software developed by Tobias Oetiker, a system
 manager at the Swiss Federal Institute of Technology. Though it is a
@@ -180,7 +181,7 @@ various operations on \s-1RRD\s0 databases. This command set can be accessed
 from the command line, as well as from Shell or Perl scripts. The
 scripts act as wrappers for accessing data stored in RRDtool
 databases.
 from the command line, as well as from Shell or Perl scripts. The
 scripts act as wrappers for accessing data stored in RRDtool
 databases.
-.SS "Understanding by an example"
+.Sh "Understanding by an example"
 .IX Subsection "Understanding by an example"
 The structure of an \s-1RRD\s0 database is different than other linear databases.
 Other databases define tables with columns, and many other parameters. These
 .IX Subsection "Understanding by an example"
 The structure of an \s-1RRD\s0 database is different than other linear databases.
 Other databases define tables with columns, and many other parameters. These
@@ -306,7 +307,7 @@ individual \s-1RRA\s0 will save data for all the DSs in the database. For
 example, if a database has 3 DSs and daily, weekly, monthly, and
 yearly RRAs are declared, then each \s-1RRA\s0 will hold data from all 3 data
 sources.
 example, if a database has 3 DSs and daily, weekly, monthly, and
 yearly RRAs are declared, then each \s-1RRA\s0 will hold data from all 3 data
 sources.
-.SS "Graphical Magic"
+.Sh "Graphical Magic"
 .IX Subsection "Graphical Magic"
 Another important feature of RRDtool is its ability to create
 graphs. The \*(L"graph\*(R" command uses the \*(L"fetch\*(R" command internally to
 .IX Subsection "Graphical Magic"
 Another important feature of RRDtool is its ability to create
 graphs. The \*(L"graph\*(R" command uses the \*(L"fetch\*(R" command internally to
@@ -342,7 +343,7 @@ plotted in the order they are defined in the graph command. Therefore
 care must be taken to define \s-1STACK\s0 only after defining \s-1AREA/LINE\s0. It
 is also possible to put formatted comments within the graph.  Detailed
 instructions can be found in the graph manual.
 care must be taken to define \s-1STACK\s0 only after defining \s-1AREA/LINE\s0. It
 is also possible to put formatted comments within the graph.  Detailed
 instructions can be found in the graph manual.
-.SS "Wrapping RRDtool within Shell/Perl script"
+.Sh "Wrapping RRDtool within Shell/Perl script"
 .IX Subsection "Wrapping RRDtool within Shell/Perl script"
 After understanding RRDtool it is now a time to actually use RRDtool
 in scripts. Tasks involved in network management are data collection,
 .IX Subsection "Wrapping RRDtool within Shell/Perl script"
 After understanding RRDtool it is now a time to actually use RRDtool
 in scripts. Tasks involved in network management are data collection,
@@ -354,20 +355,20 @@ generation is done using Perl scripts. These scripts are shown below:
 \fIShell script (collects data, updates database)\fR
 .IX Subsection "Shell script (collects data, updates database)"
 .PP
 \fIShell script (collects data, updates database)\fR
 .IX Subsection "Shell script (collects data, updates database)"
 .PP
-.Vb 10
+.Vb 14
 \& #!/bin/sh
 \& a=0
 \& while [ "$a" == 0 ]; do
 \& snmpwalk \-c public 192.168.1.250 hrSWRunPerfMem > snmp_reply
 \& #!/bin/sh
 \& a=0
 \& while [ "$a" == 0 ]; do
 \& snmpwalk \-c public 192.168.1.250 hrSWRunPerfMem > snmp_reply
-\&     total_mem=\`awk \*(AqBEGIN {tot_mem=0}
+\&     total_mem=`awk 'BEGIN {tot_mem=0}
 \&                           { if ($NF == "KBytes")
 \&                             {tot_mem=tot_mem+$(NF\-1)}
 \&                           }
 \&                           { if ($NF == "KBytes")
 \&                             {tot_mem=tot_mem+$(NF\-1)}
 \&                           }
-\&                     END {print tot_mem}\*(Aq snmp_reply\`
+\&                     END {print tot_mem}' snmp_reply`
 \&     # I can use N as a replacement for the current time
 \&     rrdtool update target.rrd N:$total_mem
 \&     # sleep until the next 300 seconds are full
 \&     # I can use N as a replacement for the current time
 \&     rrdtool update target.rrd N:$total_mem
 \&     # sleep until the next 300 seconds are full
-\&     perl \-e \*(Aqsleep 300 \- time % 300\*(Aq
+\&     perl \-e 'sleep 300 \- time % 300'
 \& done # end of while loop
 .Ve
 .PP
 \& done # end of while loop
 .Ve
 .PP
@@ -378,14 +379,18 @@ generation is done using Perl scripts. These scripts are shown below:
 \& #!/usr/bin/perl \-w
 \& # This script fetches data from target.rrd, creates a graph of memory
 \& # consumption on the target (Dual P3 Processor 1 GHz, 656 MB RAM)
 \& #!/usr/bin/perl \-w
 \& # This script fetches data from target.rrd, creates a graph of memory
 \& # consumption on the target (Dual P3 Processor 1 GHz, 656 MB RAM)
-\&
+.Ve
+.PP
+.Vb 6
 \& # call the RRD perl module
 \& use lib qw( /usr/local/rrdtool\-1.0.41/lib/perl ../lib/perl );
 \& use RRDs;
 \& my $cur_time = time();                # set current time
 \& my $end_time = $cur_time \- 86400;     # set end time to 24 hours ago
 \& my $start_time = $end_time \- 2592000; # set start 30 days in the past
 \& # call the RRD perl module
 \& use lib qw( /usr/local/rrdtool\-1.0.41/lib/perl ../lib/perl );
 \& use RRDs;
 \& my $cur_time = time();                # set current time
 \& my $end_time = $cur_time \- 86400;     # set end time to 24 hours ago
 \& my $start_time = $end_time \- 2592000; # set start 30 days in the past
-\&
+.Ve
+.PP
+.Vb 58
 \& # fetch average values from the RRD database between start and end time
 \& my ($start,$step,$ds_names,$data) =
 \&     RRDs::fetch("target.rrd", "AVERAGE",
 \& # fetch average values from the RRD database between start and end time
 \& my ($start,$step,$ds_names,$data) =
 \&     RRDs::fetch("target.rrd", "AVERAGE",