diff --git a/doc/rrd-beginners.1 b/doc/rrd-beginners.1
index d36a4ce19904331530ecda6a915a4f87bd342756..5c10b1008aa6e55042af6db52b9f432c18778e97 100644 (file)
--- a/doc/rrd-beginners.1
+++ b/doc/rrd-beginners.1
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" 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
..
.\" 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 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
-.\" 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.
-.ie \nF \{\
+.if \nF \{\
. 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.
.\" ========================================================================
.\"
.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"
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
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
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
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,
\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
-\& total_mem=\`awk \*(AqBEGIN {tot_mem=0}
+\& total_mem=`awk 'BEGIN {tot_mem=0}
\& { 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
-\& perl \-e \*(Aqsleep 300 \- time % 300\*(Aq
+\& perl \-e 'sleep 300 \- time % 300'
\& done # end of while loop
.Ve
.PP
\& #!/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
-\&
+.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",