From blair at orcaware.com Tue Feb 4 12:04:55 2003
From: blair at orcaware.com (blair at orcaware.com)
Date: Tue, 4 Feb 2003 12:04:55 -0800
Subject: [Orca-checkins] rev 200 - trunk/orca/data_gatherers/orcallator
Message-ID: <200302042004.h14K4tbD007589@orcaware.com>
Author: blair
Date: 2003-02-04 12:04:21 -0800 (Tue, 04 Feb 2003)
New Revision: 200
Modified:
trunk/orca/data_gatherers/orcallator/orcallator.cfg.in
Log:
* data_gatherers/orcallator/orcallator.cfg.in:
Add a new plot, the system uptime, showing the number of days that
the system has been up.
Modified: trunk/orca/data_gatherers/orcallator/orcallator.cfg.in
==============================================================================
--- trunk/orca/data_gatherers/orcallator/orcallator.cfg.in (original)
+++ trunk/orca/data_gatherers/orcallator/orcallator.cfg.in 2003-02-04 12:04:45.000000000 -0800
@@ -131,6 +131,18 @@
}
plot {
+title %g Uptime
+source orcallator
+data uptime / 86400
+line_type area
+legend Uptime
+y_legend Days
+data_min 0
+plot_min 0
+href http://www.orcaware.com/orca/docs/orcallator.html#system_uptime
+}
+
+plot {
title %g Average # Processes in Run Queue (Load Average)
source orcallator
data 1runq
From blair at orcaware.com Thu Feb 20 15:24:05 2003
From: blair at orcaware.com (blair at orcaware.com)
Date: Thu, 20 Feb 2003 15:24:05 -0800
Subject: [Orca-checkins]
rev 201 - in trunk/orca: . packages packages/rrdtool-1.0.41
packages/rrdtool-1.0.41/src
packages/rrdtool-1.0.41/contrib/rrdfetchnames
packages/rrdtool-1.0.41/contrib/rrdlastds
packages/rrdtool-1.0.41/contrib/add_ds
packages/rrdtool-1.0.41/perl-piped packages/rrdtool-1.0.41/doc
packages/rrdtool-1.0.41/perl-shared packages/rrdtool-1.0.41/gd1.3
Message-ID: <200302202324.h1KNO5rX004988@orcaware.com>
Author: blair
Date: 2003-02-20 12:13:18 -0800 (Thu, 20 Feb 2003)
New Revision: 201
Added:
trunk/orca/packages/rrdtool-1.0.41/
Removed:
trunk/orca/packages/rrdtool-1.0.40/
Modified:
trunk/orca/INSTALL
trunk/orca/configure.in
trunk/orca/packages/rrdtool-1.0.41/CHANGES
trunk/orca/packages/rrdtool-1.0.41/CONTRIBUTORS
trunk/orca/packages/rrdtool-1.0.41/Makefile.am
trunk/orca/packages/rrdtool-1.0.41/Makefile.in
trunk/orca/packages/rrdtool-1.0.41/configure
trunk/orca/packages/rrdtool-1.0.41/configure.in
trunk/orca/packages/rrdtool-1.0.41/contrib/add_ds/batch.pl
trunk/orca/packages/rrdtool-1.0.41/contrib/rrdfetchnames/rrdfetchnames.pl
trunk/orca/packages/rrdtool-1.0.41/contrib/rrdlastds/rrdlastds.pl
trunk/orca/packages/rrdtool-1.0.41/doc/RRDp.html
trunk/orca/packages/rrdtool-1.0.41/doc/RRDp.txt
trunk/orca/packages/rrdtool-1.0.41/doc/RRDs.html
trunk/orca/packages/rrdtool-1.0.41/doc/RRDs.txt
trunk/orca/packages/rrdtool-1.0.41/doc/bin_dec_hex.html
trunk/orca/packages/rrdtool-1.0.41/doc/bin_dec_hex.txt
trunk/orca/packages/rrdtool-1.0.41/doc/cdeftutorial.html
trunk/orca/packages/rrdtool-1.0.41/doc/cdeftutorial.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rpntutorial.html
trunk/orca/packages/rrdtool-1.0.41/doc/rpntutorial.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdcgi.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdcgi.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdcreate.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdcreate.pod
trunk/orca/packages/rrdtool-1.0.41/doc/rrdcreate.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrddump.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrddump.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdfetch.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdfetch.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdgraph.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdgraph.pod
trunk/orca/packages/rrdtool-1.0.41/doc/rrdgraph.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdinfo.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdinfo.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdlast.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdlast.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdresize.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdresize.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdrestore.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdrestore.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtool.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtool.pod
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtool.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtune.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtune.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.es.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.es.pod
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.es.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdupdate.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdupdate.txt
trunk/orca/packages/rrdtool-1.0.41/doc/rrdxport.html
trunk/orca/packages/rrdtool-1.0.41/doc/rrdxport.txt
trunk/orca/packages/rrdtool-1.0.41/gd1.3/gd.c
trunk/orca/packages/rrdtool-1.0.41/perl-piped/RRDp.pm
trunk/orca/packages/rrdtool-1.0.41/perl-shared/RRDs.pm
trunk/orca/packages/rrdtool-1.0.41/rrdtool.spec
trunk/orca/packages/rrdtool-1.0.41/src/gdpng.c
trunk/orca/packages/rrdtool-1.0.41/src/gifsize.c
trunk/orca/packages/rrdtool-1.0.41/src/parsetime.c
trunk/orca/packages/rrdtool-1.0.41/src/pngsize.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd.h
trunk/orca/packages/rrdtool-1.0.41/src/rrd_cgi.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_create.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_diff.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_dump.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_error.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_fetch.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_format.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_format.h
trunk/orca/packages/rrdtool-1.0.41/src/rrd_graph.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_graph.h
trunk/orca/packages/rrdtool-1.0.41/src/rrd_info.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_last.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_open.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_resize.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_restore.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_tool.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_tool.h
trunk/orca/packages/rrdtool-1.0.41/src/rrd_tune.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_update.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_xport.c
trunk/orca/packages/rrdtool-1.0.41/src/rrd_xport.h
Log:
Update rrdtool from 1.0.40 to 1.0.41. This should fix the problem
seen on Solaris systems where rrdtool's configure script cannot handle
when Perl's C compiler is set to 'gcc -B/usr/ccs/bin'.
* configure.in:
Bump the required RRDs Perl VERSION number from 1.000401 to 1.000411
and update the directory to find rrdtool in from rrdtool-1.0.40 to
rrdtool-1.0.41.
* INSTALL (Determine which Perl modules need compiling and installing):
Bump the required RRDs Perl VERSION number from 1.000401 to 1.000411
and update the RRDs package version from 1.0.40 to 1.0.41.
* packages/rrdtool-1.0.41:
Renamed from packages/rrdtool-1.0.40. Directory contents updated
from rrdtool-1.0.41.tar.gz.
Modified: trunk/orca/configure.in
==============================================================================
--- trunk/orca/configure.in (original)
+++ trunk/orca/configure.in 2003-02-20 15:23:56.000000000 -0800
@@ -37,8 +37,8 @@
DIGEST_MD5_VER=2.23
MATH_INTERVALSEARCH_DIR=Math-Interpolate-1.05
MATH_INTERVALSEARCH_VER=1.05
-RRDTOOL_DIR=rrdtool-1.0.40
-RRDTOOL_VER=1.000401
+RRDTOOL_DIR=rrdtool-1.0.41
+RRDTOOL_VER=1.000411
STORABLE_DIR=Storable-2.06
STORABLE_VER=2.06
TIME_HIRES_DIR=Time-HiRes-1.42
Modified: trunk/orca/INSTALL
==============================================================================
--- trunk/orca/INSTALL (original)
+++ trunk/orca/INSTALL 2003-02-20 15:23:56.000000000 -0800
@@ -174,7 +174,7 @@
Devel::DProf Not required by Orca 19990108
Digest::MD5 >= 2.23 >= 2.23 2.23
Math::IntervalSearch >= 1.05 >= 1.05 1.05
- RRDs >= 1.000401 >= 1.0.40 1.0.40
+ RRDs >= 1.000411 >= 1.0.41 1.0.41
Storable >= 2.06 >= 2.06 2.06
Time::HiRes Not required by Orca 1.42
Copied: rrdtool-1.0.41 (from rev 200, trunk/orca/packages/rrdtool-1.0.40)
Modified: trunk/orca/packages/rrdtool-1.0.41/configure
==============================================================================
--- trunk/orca/packages/rrdtool-1.0.40/configure (original)
+++ trunk/orca/packages/rrdtool-1.0.41/configure 2003-02-20 15:23:56.000000000 -0800
@@ -11,7 +11,7 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
-ac_default_prefix=/usr/local/rrdtool-1.0.40
+ac_default_prefix=/usr/local/rrdtool-1.0.41
ac_help="$ac_help
--with-tcllib=DIR location of the tclConfig.sh"
ac_help="$ac_help
@@ -799,7 +799,7 @@
PACKAGE=rrdtool
-VERSION=1.0.40
+VERSION=1.0.41
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -948,7 +948,7 @@
echo "$ac_t""$SO_EXT" 1>&6
echo $ac_n "checking for the C compiler perl wants to use to build its modules""... $ac_c" 1>&6
echo "configure:951: checking for the C compiler perl wants to use to build its modules" >&5
- PROBLEMCC=`$PERL -e 'use Config; exit 0 if -x $Config{cc}; map {if (-x "$_/$Config{cc}"){exit 0}} split /:/, $ENV{PATH};print $Config{cc}'`
+ PROBLEMCC=`$PERL -e 'use Config; ($cc = $Config{cc}) =~ s/\s.*//; exit 0 if -x $cc; map {if (-x "$_/$cc"){exit 0}} split /:/, $ENV{PATH};print $Config{cc}'`
if test x$PROBLEMCC != x; then
echo "$ac_t""no" 1>&6
echo Could not find the Compiler: '"'$PROBLEMCC'"'
@@ -3421,10 +3421,10 @@
else
echo "$ac_t""no" 1>&6
- CFLAGS="$_cflags -OPT:IEEE_comparisons=ON"
- echo $ac_n "checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch""... $ac_c" 1>&6
-echo "configure:3427: checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch" >&5
-if eval "test \"`echo '$''{'rd_cv_ieee_ieeecmpswitch'+set}'`\" = set"; then
+ CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON"
+ echo $ac_n "checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch""... $ac_c" 1>&6
+echo "configure:3427: checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch" >&5
+if eval "test \"`echo '$''{'rd_cv_ieee_ieeenaninfswitch'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
@@ -3501,6 +3501,103 @@
EOF
if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
+ rd_cv_ieee_ieeenaninfswitch=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ rd_cv_ieee_ieeenaninfswitch=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+if test x${rd_cv_ieee_ieeenaninfswitch} = "xyes"; then
+ echo "$ac_t""yes" 1>&6
+
+else
+ echo "$ac_t""no" 1>&6
+ CFLAGS="$_cflags -OPT:IEEE_comparisons=ON"
+ echo $ac_n "checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch""... $ac_c" 1>&6
+echo "configure:3524: checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch" >&5
+if eval "test \"`echo '$''{'rd_cv_ieee_ieeecmpswitch'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <
- rrdtutorial - Tutorial sobre RRDtool por Alex van den Bogaerdt
-(Traducido al castellano por Jes?s Couto Fandi?o)
- RRDtool es un programa escrito por Tobias Oetiker con la
+
+ rrdtutorial - Tutorial sobre RRDtool por Alex van den Bogaerdt
+(Traducido al castellano por Jes?s Couto Fandi?o)
+ RRDtool es un programa escrito por Tobias Oetiker con la
colaboraci?n de muchas personas en diversas partes del mundo. Alex van
den Bogaerdt escribi? este documento para ayudarte a entender que es
-RRDtool y que es lo que puede hacer por ti. La documentaci?n que viene con RRDtool puede ser demasiado t?cnica
+RRDtool y que es lo que puede hacer por ti. La documentaci?n que viene con RRDtool puede ser demasiado t?cnica
para algunos. Este tutorial existe para ayudarte a entender las
funciones b?sicas de RRdtool. Debe servirte de preparaci?n para leer la
documentaci?n, y adem?s explica algunas ideas generales sobre
-estad?stica, con un enfoque particular hacia las redes.
-
- ?Por favor, no te adelantes en la lectura de este documento! Esta
+estad?stica, con un enfoque particular hacia las redes.
+
+ ?Por favor, no te adelantes en la lectura de este documento! Esta
primera parte explica los fundamentos b?sicos. Puede ser aburrida,
pero si te saltas los fundamentos, los ejemplos no te van a tener
-mucho sentido.
- RRDtool significa ``herramienta de bases de datos en round robin''.
+mucho sentido.
+ RRDtool significa ``herramienta de bases de datos en round robin''.
``Round robin'' es una t?cnica que implica un n?mero fijo de datos, y un
apuntador al elemento m?s reciente. Piensa en un circulo con unos
cuantos puntos dibujados alrededor del borde; estos puntos son los
@@ -87,14 +93,15 @@
proceso empieza a reutilizar las antiguas. De esta forma, la base de datos
no crece en tama?o y, por lo tanto, no requiere ning?n mantenimiento.
RRDtool trabaja con estas bases de datos en ``round-robin'', guardando y
-recuperando datos de ellas.
- Lo que se te ocurra. Debes poder medir alg?n valor dado en distintos
+recuperando datos de ellas.
+ Lo que se te ocurra. Debes poder medir alg?n valor dado en distintos
momentos en el tiempo y proveer a RRDtool de estos valores. Si puedes
hacer esto, RRDtool puede guardar los datos. Los valores tienen que
-ser num?ricos, pero no necesariamente enteros, como en MRTG. Muchos ejemplos mencionan SNMP, que es el acr?nimo de
+ser num?ricos, pero no necesariamente enteros, como en MRTG. Muchos ejemplos mencionan SNMP, que es el acr?nimo de
``Simple Network Management Protocol'' (Protocolo Simple de
Administraci?n de Redes). Lo de ``simple'' se refiere al protocolo - no
se supone que sea f?cil administrar o monitorizar una red. Cuando
@@ -103,10 +110,11 @@
SNMP. Por ahora, simplemente considera a
SNMP como una forma de preguntarle a los dispositivos
por los valores de ciertos contadores que mantienen. Son estos valores
-de estos contadores los que vamos a almacenar en la RRD.
- RRDtool se deriva de MRTG (Multi Router
+de estos contadores los que vamos a almacenar en la RRD.
+ RRDtool se deriva de MRTG (Multi Router
Traffic Grapher, Graficador De Tr?fico de M?ltiples Enrutadores).
MRTG empez? como un peque?o script para poder
graficar el uso de una conexi?n a la Internet. Luego evolucion?,
@@ -126,48 +134,51 @@
aeropuerto, la temperatura en tu lugar de vacaciones favorito, o en
la nevera, o cualquier otra cosa que te puedas imaginar, mientras
tengas alg?n sensor con el cual medir los datos y seas capaz de
-pasarle los n?meros a RRDtool.
- Lo primero, ?l?elo otra vez!. Puede que te hayas perdido de algo.
+pasarle los n?meros a RRDtool.
+ Lo primero, ?l?elo otra vez!. Puede que te hayas perdido de algo.
Si no puedes compilar el c?digo fuente y usas un sistema operativo
bastante com?n, casi seguro que no es la culpa de RRDtool.
Probablemente consigas versiones pre-compiladas por la Internet. Si
provienen de una fuente confiable, ?salas. Si, por otro lado, el
programa funciona, pero no te da los resultados que tu esperabas,
puede ser un problema con la configuraci?n; rev?sala y
-comp?rala con los ejemplos. Hay una lista de correo electr?nico y una archivo de la misma. Lee
+comp?rala con los ejemplos. Hay una lista de correo electr?nico y una archivo de la misma. Lee
la lista durante unas cuantas semanas, y busca en el archivo. Es
descort?s hacer una pregunta sin haber revisado el archivo; ?puede que
tu problema ya haya sido resuelto antes! Normalmente ocurre as? en todas
las listas de correo, no s?lo esta. Examina la documentaci?n que vino
-con RRDtool para ver donde est? el archivo y como usarlo. Te sugiero que te tomes un momento y te subscribas a la lista ahora
-mismo, enviando un mensaje a rrd-users-request at list.ee.ethz.ch
-con t?tulo
- D?ndote descripciones y ejemplos detallados. Asumimos que el seguir
+con RRDtool para ver donde est? el archivo y como usarlo. Te sugiero que te tomes un momento y te subscribas a la lista ahora
+mismo, enviando un mensaje a rrd-users-request at list.ee.ethz.ch
+con t?tulo
+ D?ndote descripciones y ejemplos detallados. Asumimos que el seguir
las instrucciones en el orden en que se presentan aqu? te dar?
suficiente conocimiento de RRDtool como para que experimentes por tu
cuenta. Si no funciona a la primera, puede que te hallas saltado algo;
siguiendo los ejemplos obtendr?s algo de experiencia pr?ctica y, lo
que es m?s importante, un poco de informaci?n sobre como funciona el
-programa. Necesitar?s saber algo sobre n?meros hexadecimales. Si no, empieza
-por leer ``bin_dec_hex'' antes de continuar.
- En mi opini?n, la mejor forma de aprender algo es haci?ndolo. ?Por
+programa. Necesitar?s saber algo sobre n?meros hexadecimales. Si no, empieza
+por leer ``bin_dec_hex'' antes de continuar.
+ En mi opini?n, la mejor forma de aprender algo es haci?ndolo. ?Por
qu? no empezamos ya? Vamos a crear una base de datos, poner unos cuantos
valores en ella y extraerlos despu?s. La salida que obtengas debe ser
-igual a la que aparece en este documento. Empezaremos con algo f?cil, comparando un coche con un enrutador, o
+igual a la que aparece en este documento. Empezaremos con algo f?cil, comparando un coche con un enrutador, o
por decirlo de otra forma, comparando kil?metros con bits y bytes. A
-nosotros nos da lo mismo; son unos n?meros obtenidos en un espacio de tiempo. Asumamos que tenemos un dispositivo que transfiere bytes desde y
+nosotros nos da lo mismo; son unos n?meros obtenidos en un espacio de tiempo. Asumamos que tenemos un dispositivo que transfiere bytes desde y
hacia la Internet. Este dispositivo tiene un contador que empieza en 0
al encenderse y se incrementa con cada byte transferido. Este contador
tiene un valor m?ximo; si ese valor se alcanza y se cuenta un byte
@@ -182,70 +193,71 @@
4294967295. Usaremos estos valores en los ejemplos. El dispositivo, cuando
le preguntamos, retorna el valor actual del contador. Como sabemos el
tiempo transcurrido desde la ?ltima vez que le preguntamos, sabemos
-cuantos bytes se han transferido NAME
-
-DESCRIPTION / DESCRIPCI?N
-NAME
+
+DESCRIPTION
+
-TUTORIAL
-Importante
-
+TUTORIAL
+Importante
+?Qu? es RRDtool?
-?Qu? es RRDtool?
+?Qu? datos pueden guardarse en una RRD?
-?Qu? datos pueden guardarse en una RRD?
+?Qu? puedo hacer con esta herramienta?
-?Qu? puedo hacer con esta herramienta?
+?Y si a?n tengo problemas despu?s de leer este documento?
-?Y si a?n tengo problemas despu?s de leer este documento?
+subscribe. Si eventualmente deseas salirte de la lista,
-env?a otro correo a la misma direcci?n, con t?tulo unsubscribe.?C?mo me vas a ayudar?
-subscribe. Si eventualmente deseas salirte de la lista,
+env?a otro correo a la misma direcci?n, con t?tulo unsubscribe.?C?mo me vas a ayudar?
+Tu primera base de datos en round-robin
-Tu primera base de datos en round-robin
+***en promedio*** por
+cuantos bytes se han transferido ***en promedio*** por
segundo. Esto no es muy dif?cil de calcular; primero en palabras,
-luego en operaciones:
-
- bps = (contador_actual - contador_anterior) / (fecha_actual - fecha_anterior) * 8-
Para algunos ser? de ayuda traducir esto a un ejemplo automotor. +
++ bps = (contador_actual - contador_anterior) / (fecha_actual - fecha_anterior) * 8+
Para algunos ser? de ayuda traducir esto a un ejemplo automotor. No prueben estas velocidades en la pr?ctica, y si lo hacen, no me -echen la culpa por los resultados.
-Usaremos las siguientes abreviaturas:
-+echen la culpa por los resultados. ++Usaremos las siguientes abreviaturas:
+M: metros KM: kil?metros (= 1000 metros). H: horas S: segundos KM/H: kil?metros por hora - M/S: metros por segundo-Vas conduciendo un coche. A las 12:05, miras el contador en el + M/S: metros por segundo
Vas conduciendo un coche. A las 12:05, miras el contador en el salpicadero y ves que el coche ha recorrido 12345 KM. A las 12:10 vuelves a mirar otra vez, y dice 12357 KM. Quiere decir, que has recorrido 12 KM en cinco minutos. Un cient?fico convertir?a esto en metros por segundos; esto es bastante parecido al problema de -pasar de bytes transferidos en 5 minutos a bits por segundo.
-Viajamos 12 kil?metros, que son 12000 metros. Tardamos 5 minutos, o -sea 300 segundos. Nuestra velocidad es 12000M / 300S igual a 40 M/S.
-Tambi?n podemos calcular la velocidad en KM/H: 12 veces 5 minutos +pasar de bytes transferidos en 5 minutos a bits por segundo.
+Viajamos 12 kil?metros, que son 12000 metros. Tardamos 5 minutos, o +sea 300 segundos. Nuestra velocidad es 12000M / 300S igual a 40 M/S.
+Tambi?n podemos calcular la velocidad en KM/H: 12 veces 5 minutos es una hora, as? que multiplicando los 12 KM por 12 obtenemos 144 -KM/H. No intentes esto en casa, o por donde vivo :-)
-Recuerda que estos n?meros son tan s?lo promedios. No hay forma de +KM/H. No intentes esto en casa, o por donde vivo :-)
+Recuerda que estos n?meros son tan s?lo promedios. No hay forma de deducir, viendo s?lo los n?meros, si fuiste a una velocidad constante. -Hay un ejemplo m?s adelante en el tutorial que explica esto.
-Espero que entiendas que no hay diferencia entre calcular la +Hay un ejemplo m?s adelante en el tutorial que explica esto.
+Espero que entiendas que no hay diferencia entre calcular la velocidad en M/S o bps; s?lo la forma en que recogemos los datos es distinta. Inclusive, la K de kilo en este -caso es exactamente la misma, ya que en redes k es 1000
-Ahora vamos a crear una base de datos en la que guardar todos estos +caso es exactamente la misma, ya que en redes k es 1000
+Ahora vamos a crear una base de datos en la que guardar todos estos interesantes valores. El m?todo a usar para arrancar el programa puede variar de un sistema de operaci?n a otro, pero asumamos que lo puedes resolver tu mismo en caso que se diferente en el sistema que usas. Aseg?rate de no sobreescribir ning?n archivo en tu sistema al ejecutarlo y escribe todo como una sola l?nea (tuve que partirlo para -que fuera legible), salt?ndote todos los caracteres '\'
-+que fuera legible), salt?ndote todos los caracteres '\' ++rrdtool create test.rrd \ --start 920804400 \ DS:speed:COUNTER:600:U:U \ RRA:AVERAGE:0.5:1:24 \ - RRA:AVERAGE:0.5:6:10-(o sea, escribe:
-rrdtool create test.rrd --start 920804400 DS ...)-
?Qu? hemos creado?
-Hemos creado una base de datos en round robin llamada test + RRA:AVERAGE:0.5:6:10
(o sea, escribe: rrdtool create test.rrd --start 920804400 DS ...)
+
+Hemos creado una base de datos en round robin llamada test (test.rrd), que empieza desde el mediod?a del d?a en que empec? a escribir este documento (7 de marzo de 1999). En ella se guarda una fuente de datos (DS), llamada ``speed'', que se @@ -254,21 +266,21 @@ sea, no hay nada que promediar), y mantiene 24 muestras (24 por 5 minutos = 2 horas de muestras). El otro promedia 6 muestras (media hora), y guarda 10 de estos promedios (o sea, 5 horas). Las opciones -restantes las veremos m?s adelante.
-RRDtool usa un formato de ``fecha'' especial que viene del mundo de +restantes las veremos m?s adelante.
+RRDtool usa un formato de ``fecha'' especial que viene del mundo de UNIX. Estas ``fechas'' son el n?mero de segundos que han pasado desde el primero de enero de 1970, zona UTC. Este n?mero de segundos se convierte luego en la fecha local, por lo que -varia seg?n la franja horaria.
-Lo m?s probable es que tu no vivas en la misma parte del mundo que +varia seg?n la franja horaria.
+Lo m?s probable es que tu no vivas en la misma parte del mundo que yo, por lo que tu franja horaria ser? diferente. En los ejemplos, cuando mencione horas, puede que no sean las mismas para ti; esto no afecta mucho los resultados, s?lo tienes que corregir las horas mientras lees. Por ejemplo, las 12:05 para m? son las 11:05 para los -amigos en la Gran Breta?a.
-Ahora tenemos que llenar nuestra base de datos con valores. Vamos a -suponer que le?mos estos datos:
-+amigos en la Gran Breta?a. ++Ahora tenemos que llenar nuestra base de datos con valores. Vamos a +suponer que le?mos estos datos:
+12:05 12345 KM 12:10 12357 KM 12:15 12363 KM @@ -283,35 +295,31 @@ 13:00 12415 KM 13:05 12420 KM 13:10 12422 KM - 13:15 12423 KM-Llenaremos la base de datos as?:
-+ 13:15 12423 KM+Llenaremos la base de datos as?:
+rrdtool update test.rrd 920804700:12345 920805000:12357 920805300:12363 rrdtool update test.rrd 920805600:12363 920805900:12363 920806200:12373 rrdtool update test.rrd 920806500:12383 920806800:12393 920807100:12399 rrdtool update test.rrd 920807400:12405 920807700:12411 920808000:12415 - rrdtool update test.rrd 920808300:12420 920808600:12422 920808900:12423-Lo que significa: actualiza nuestra base de datos test con los -siguientes valores:
-+ rrdtool update test.rrd 920808300:12420 920808600:12422 920808900:12423+Lo que significa: actualiza nuestra base de datos test con los +siguientes valores:
+fecha 920804700, valor 12345 fecha 920805000, valor 12357 --- - etc?tera.-Como ves, pueden introducirse m?s de un valor en la base de datos + + etc?tera.
Como ves, pueden introducirse m?s de un valor en la base de datos por ejecuci?n del comando. Yo los agrupo de tres en tres para hacerlo -legible, pero en realidad el m?ximo depende del sistema de operaci?n.
-Ahora podemos recuperar los datos usando ``rrdtool fetch'':
-- rrdtool fetch test.rrd AVERAGE --start 920804400 --end 920809200-
Debes obtener esto como salida:
-+legible, pero en realidad el m?ximo depende del sistema de operaci?n. ++Ahora podemos recuperar los datos usando ``rrdtool fetch'':
++ rrdtool fetch test.rrd AVERAGE --start 920804400 --end 920809200+Debes obtener esto como salida:
+speed --- + 920804400: NaN 920804700: NaN 920805000: 4.0000000000e-02 @@ -328,49 +336,51 @@ 920808300: 1.6666666667e-02 920808600: 6.6666666667e-03 920808900: 3.3333333333e-03 - 920809200: NaN-Si no, hay algo mal. Probablemente tu sistema de operaci?n muestre ``NaN'' + 920809200: NaN
Si no, hay algo mal. Probablemente tu sistema de operaci?n muestre ``NaN'' de otra forma; representa ``Not a Number'', o sea ``No es un n?mero''. Si aparece ``U'' o ``UNKN'' o algo parecido, es lo mismo. Si hay alguna otra diferencia, probablemente te equivocaste al introducir alg?n P valor (asumiendo que mi tutorial est? bien, por supuesto :-). En ese caso, borra -la base de datos y prueba de nuevo.
-Lo que representa exactamente esta salida lo vamos m?s adelante en el tutorial.
--
Prueba este comando:
-+la base de datos y prueba de nuevo. ++Lo que representa exactamente esta salida lo vamos m?s adelante en el tutorial.
++
+Hora de hacer algunos gr?ficos
+Prueba este comando:
+rrdtool graph speed.gif \ --start 920804400 --end 920808000 \ DEF:myspeed=test.rrd:speed:AVERAGE \ - LINE2:myspeed#FF0000-Este comando crea speed.gif, un gr?fico de los datos desde las + LINE2:myspeed#FF0000
Este comando crea speed.gif, un gr?fico de los datos desde las 12:00 hasta las 13:00. Contiene una definici?n de la variable myspeed y define el color como rojo. Notar?s que el gr?fico no comienza exactamente a las 12:00 sino a las 12:05, y es porque no tenemos datos suficientes como para calcular el promedio de velocidad antes de ese momento. Esto s?lo ocurre en caso de que se pierdan alg?n muestreo, lo -que esperamos que no debe ocurrir muy a menudo.
-Si ha funcionado, ?felicitaciones!. Si no, revisa qu? puede estar mal.
-La definici?n de colores se construye a partir del rojo, verde y +que esperamos que no debe ocurrir muy a menudo.
+Si ha funcionado, ?felicitaciones!. Si no, revisa qu? puede estar mal.
+La definici?n de colores se construye a partir del rojo, verde y azul. Especificas cuanto de cada uno de estos componentes vas a usar en hexadecimal: 00 significa ``nada de este color'' y FF significa ``este color a m?xima intensidad''. El ``color'' blanco es la mezcla del rojo, verde y azul a toda intensidad: -FFFFFF; el negro es la ausencia de todos los colores: 000000.
-+FFFFFF; el negro es la ausencia de todos los colores: 000000. ++rojo #FF0000 verde #00FF00 azul #0000FF violeta #FF00FF (mezcla de rojo y azul) - gris #555555 (un tercio de cada uno de los colores)-El archivo GIF que acabas de crear puede + gris #555555 (un tercio de cada uno de los colores)
El archivo GIF que acabas de crear puede verse con tu visor de archivos de imagen favorito. Los navegadores lo mostrar?n usando la URL -``file://el/camino/de/directorios/hasta/speed.gif''
--
Cuando veas la imagen, notar?s que el eje horizontal tiene unas +``file://el/camino/de/directorios/hasta/speed.gif''
++
+Cuando veas la imagen, notar?s que el eje horizontal tiene unas etiquetas marcando las 12:10, 12:20, 12:30, 12:40 y 12:50. Los otros dos momentos (12:00 y 13:00) no se pueden mostrar bien por falta de datos, as? que el programa se los salta. El eje vertical muestra el rango de los valores que @@ -380,41 +390,41 @@ 0.04, lo que RRDtool muestra como ``40m'', o sea ``40/1000''. ?La ``m''' no tiene nada que ver con metros, kil?metros o mil?metros!. RRDtool no sabe nada de unidades, el s?lo trabaja con n?meros, no con -metros.
-Donde nos equivocamos fue en que debimos medir en metros. As?, -(12357000-12345000)/300 = 12000/300 = 40.
-Vamos a corregirlo. Podr?amos recrear la base de datos con los +metros.
+Donde nos equivocamos fue en que debimos medir en metros. As?, +(12357000-12345000)/300 = 12000/300 = 40.
+Vamos a corregirlo. Podr?amos recrear la base de datos con los valores correctos, pero hay una forma mejor: ?haciendo los c?lculos -mientras creamos el archivo gif!
-+mientras creamos el archivo gif! ++rrdtool graph speed2.gif \ --start 920804400 --end 920808000 \ --vertical-label m/s \ DEF:myspeed=test.rrd:speed:AVERAGE \ CDEF:realspeed=myspeed,1000,* \ - LINE2:realspeed#FF0000-Cuando veas esta imagen, notar?s que la ``m'' ha desaparecido, y + LINE2:realspeed#FF0000
Cuando veas esta imagen, notar?s que la ``m'' ha desaparecido, y ahora tienes los resultados correctos. Adem?s hemos a?adido una -etiqueta a la imagen. Apartando esto, el archivo GIF es el mismo.
-Las operaciones est?n en la secci?n del CDEF +etiqueta a la imagen. Apartando esto, el archivo GIF es el mismo.
+Las operaciones est?n en la secci?n del CDEF y est?n escritas en Notaci?n Polaca Inversa (Reverse Polish Notation o ``RPN''). En palabras, dice: ``toma la fuente de datos myspeed y el numero 1000, y multipl?calos''. No te molestes en meterte con RPN todav?a, la veremos con m?s detalle m?s adelante. Adem?s, puede que quieras leer mi tutorial sobre -los CDEF y el tutorial de Steve Rader sobre RPN, pero primero terminemos con este.
-?Un momento! Si podemos multiplicar los valores por mil, entonces, +los CDEF y el tutorial de Steve Rader sobre RPN, pero primero terminemos con este.
+?Un momento! Si podemos multiplicar los valores por mil, entonces, ?tambi?n deber?a ser posible el mostrar la velocidad en kil?metros por -hora usando los mismos datos!
-Para cambiar el valor que medimos en metros por segundo, calculamos +hora usando los mismos datos!
+Para cambiar el valor que medimos en metros por segundo, calculamos los metros por hora (valor * 3600) y dividimos entre 1000 para sacar los kil?metros por hora. Todo junto hace valor * (3600/1000) == valor -* 3.6.
-Como en nuestra base de datos cometimos un error guardando los +* 3.6.
+Como en nuestra base de datos cometimos un error guardando los valores en kil?metros, debemos compensar por ello, multiplicando por -100, por lo que al aplicar esta correcci?n nos queda valor * 3600.
-Ahora vamos a crear este gif, agre?ndole un poco m?s de magia...
-+100, por lo que al aplicar esta correcci?n nos queda valor * 3600. ++Ahora vamos a crear este gif, agre?ndole un poco m?s de magia...
+rrdtool graph speed3.gif \ --start 920804400 --end 920808000 \ --vertical-label km/h \ @@ -424,24 +434,25 @@ CDEF:good=kmh,100,GT,0,kmh,IF \ HRULE:100#0000FF:"Maximum allowed" \ AREA:good#00FF00:"Good speed" \ - AREA:fast#FF0000:"Too fast"-Esto luce mucho mejor. La velocidad en KM/H, + AREA:fast#FF0000:"Too fast"
Esto luce mucho mejor. La velocidad en KM/H, y adem?s tenemos una l?nea extra mostrando la velocidad m?xima permitida (en el camino por donde conduzco). Tambi?n le cambie los -colores de la velocidad, y ahora paso de ser una l?nea a un ?rea.
-Los c?lculos son m?s complejos ahora. Para calcular la velocidad ``aceptable'':
-+colores de la velocidad, y ahora paso de ser una l?nea a un ?rea. ++Los c?lculos son m?s complejos ahora. Para calcular la velocidad ``aceptable'':
+Verifica si la velocidad en kmh es mayor que 100 ( kmh,100 ) GT - Si es as?, retorna 0, si no, retorna la velocidad ((( kmh,100 ) GT ), 0, kmh) IF-Para calcular la parte de velocidad ``excesiva'':
-+ Si es as?, retorna 0, si no, retorna la velocidad ((( kmh,100 ) GT ), 0, kmh) IF+Para calcular la parte de velocidad ``excesiva'':
+Verifica si la velocidad en kmh es mayor que 100 ( kmh,100 ) GT - Si es as?, retorna la velocidad, si no, retorna 0 ((( kmh,100) GT ), kmh, 0) IF--
Magia gr?fica
-Me gusta creer que virtualmente no hay limites para lo que RRDtool puede -hacer con los datos. No voy a explicarlo en detalle, pero mira este GIF:
-+ Si es as?, retorna la velocidad, si no, retorna 0 ((( kmh,100) GT ), kmh, 0) IF++
+Magia gr?fica
+Me gusta creer que virtualmente no hay limites para lo que RRDtool puede +hacer con los datos. No voy a explicarlo en detalle, pero mira este GIF:
+rrdtool graph speed4.gif \ --start 920804400 --end 920808000 \ --vertical-label km/h \ @@ -453,48 +464,50 @@ HRULE:100#0000FF:"Maximum allowed" \ AREA:good#00FF00:"Good speed" \ AREA:fast#550000:"Too fast" \ - STACK:over#FF0000:"Over speed"-Vamos a crear una p?gina HTML simple para ver los tres archivos GIF:
-+ STACK:over#FF0000:"Over speed"+Vamos a crear una p?gina HTML simple para ver los tres archivos GIF:
+<HTML><HEAD><TITLE>Velocidad</TITLE></HEAD><BODY> <IMG src="speed2.gif" alt="Speed in meters per second"> <BR> <IMG src="speed3.gif" alt="Speed in kilometers per hour"> <BR> <IMG src="speed4.gif" alt="Traveled too fast?"> - </BODY></HTML>-Gu?rdalo como ``speed.html'' o algo parecido, y exam?nalo con un navegador.
-Ahora, todo lo que tienes que hacer es medir los datos regularmente + </BODY></HTML>
Gu?rdalo como ``speed.html'' o algo parecido, y exam?nalo con un navegador.
+Ahora, todo lo que tienes que hacer es medir los datos regularmente y actualizar la base de datos. Cuando quieras verlos, vuelve a crear los archivos GIF y aseg?rate que se carguen de nuevo en tu navegador (Nota: presionar el bot?n de ``refrescar'' puede no ser suficiente; en particular, Netscape tiene un problema al respecto, por lo que -necesitaras darle al bot?n mientras presionas la tecla de may?sculas.
--
Ya hemos usado el comando ``update''; vimos que recibia uno o m?s +necesitaras darle al bot?n mientras presionas la tecla de may?sculas.
++
+Ya hemos usado el comando ``update''; vimos que recibia uno o m?s par?metros en el formato: ``<fecha>:<valor>''. Para facilitarte las cosas, puedes obtener la fecha actual colocando ``N'' en la fecha. Tambi?n podr?as usar la funci?n ``time'' de Perl para obtenerla. El ejemplo m?s corto de todo el -tutorial :)
-- perl -e 'print time, "\n" '-
Ahora, la forma de poner a correr un programa a intervalos +tutorial :)
++ perl -e 'print time, "\n" '+
Ahora, la forma de poner a correr un programa a intervalos regulares de tiempo depende del sistema de operaci?n. La -actualizaci?n, en pseudo-c?digo, ser?a:
-+actualizaci?n, en pseudo-c?digo, ser?a: ++Toma el valor, col?calo en la variable "$speed" - rrdtool update speed.rrd N:$speed-(Pero no lo hagas sobre nuestra base de datos de pruebas, que a?n -la vamos a usar en otros ejemplos.
-Eso es todo. Ejecutando este script cada 5 minutos, lo ?nico que + rrdtool update speed.rrd N:$speed
(Pero no lo hagas sobre nuestra base de datos de pruebas, que a?n +la vamos a usar en otros ejemplos.
+Eso es todo. Ejecutando este script cada 5 minutos, lo ?nico que tienes que hacer para ver los gr?ficos actuales es correr los ejemplos anteriores, que tambi?n puedes poner en un script. Luego de correrlo, -basta con cargar index.html
--
Me imagino que muy pocas personas ser?n capaces de obtener en su +basta con cargar index.html
++
+Me imagino que muy pocas personas ser?n capaces de obtener en su ordenador datos reales de su coche cada 5 minutos; los dem?s nos tendremos que conformar con alg?n otro contador. Puedes, por ejemplo, medir la cantidad de p?ginas que ha hecho una impresora, cuanto caf? @@ -508,23 +521,23 @@ como recoger los datos. Hay quien dir? que hay herramientas que pueden recoger estos datos por ti. ?Es cierto! Pero, creo que es importante darse cuenta de que no son necesarias. Cuando tienes que determinar -porqu? algo no funciona, necesitas saber c?mo funciona en primer lugar.
-Una herramienta que mencionamos brevemente al principio del +porqu? algo no funciona, necesitas saber c?mo funciona en primer lugar.
+Una herramienta que mencionamos brevemente al principio del documento es SNMP. SNMP es una forma de comunicarse con tus equipos. La herramienta particular que voy a usar m?s adelante se llama -``snmpget'', y funciona as?:
-- snmpget dispositivo clave OID-
En ``dispositivo'' colocas el nombre o direcci?n IP del equipo a +``snmpget'', y funciona as?:
++ snmpget dispositivo clave OID+
En ``dispositivo'' colocas el nombre o direcci?n IP del equipo a monitorizar. En clave, colocas la ``cadena de caracteres de la comunidad de lectura'', como se le denomina en el mundillo SNMP. Muchos dispositivos aceptar?n ``public'' como cadena por defecto, pero por razones de privacidad y seguridad esta clave puede estar deshabilitada. Consulta la documentaci?n -correspondiente al dispositivo o programa.
-Luego esta el tercer par?metro, llamado OID -(Object IDentifier, identificador de objeto).
-Al principio, cuando empiezas a aprender sobre SNMP, parece muy +correspondiente al dispositivo o programa.
+Luego esta el tercer par?metro, llamado OID +(Object IDentifier, identificador de objeto).
+Al principio, cuando empiezas a aprender sobre SNMP, parece muy confuso. No lo es tanto cuando le hechas una ojeada a los ``MIB'' (Manager Information Base, o Base de Informaci?n Administrativa). Es un ?rbol invertido que describe los @@ -533,115 +546,111 @@ rama tiene un nombre, y forman un camino que nos lleva hasta el fondo del ?rbol. En este ejemplo, las ramas que vamos a tomar se llaman iso, org, dod, internet, mgmt y mib-2. Tambi?n pueden accederse por su -n?mero relativo; en este caso, estos n?meros son 1, 3, 6, 1, 2 y 1:
-- iso.org.dod.internet.mgmt.mib-2 (1.3.6.1.2.1)-
En algunos programas se usa un punto al iniciar el OID. Esto puede +n?mero relativo; en este caso, estos n?meros son 1, 3, 6, 1, 2 y 1:
++ iso.org.dod.internet.mgmt.mib-2 (1.3.6.1.2.1)+
En algunos programas se usa un punto al iniciar el OID. Esto puede ser confuso; no hay ning?n punto inicial en la especificaci?n de los OID... sin embargo, algunos programas usan por defecto un prefijo inicial. Para indicar la diferencia entre los OID abreviados (o sea, a los que se le pondr? el prefijo inicial) y los completos, estos programas necesitan que los OID completos empiecen por un punto. Para -empeorar las cosas, se usan varios prefijos distintos...
-De acuerdo, sigamos con el inicio de nuestro OID: ten?amos +empeorar las cosas, se usan varios prefijos distintos...
+De acuerdo, sigamos con el inicio de nuestro OID: ten?amos 1.3.6.1.2.1 . Ahora, nos interesa la rama ``interfaces'', que tiene el -n?mero dos (o sea, 1.3.6.1.2.1.2, o 1.3.6.1.2.1.interfaces).
-Lo primero es hacernos con un programa SNMP. Busca alg?n +n?mero dos (o sea, 1.3.6.1.2.1.2, o 1.3.6.1.2.1.interfaces).
+Lo primero es hacernos con un programa SNMP. Busca alg?n paquete pre-compilado para tu plataforma, si no, puedes buscar el c?digo fuente y compilarlo tu mismo. En Internet encontrar?s muchos programas, b?scalos con un motor de b?squeda o como prefieras. -Mi sugerencia es que busques el paquete CMU-SNMP, que esta bastante difundido.
-Asumamos que ya tienes el programa. Empecemos por tomar ciertos +Mi sugerencia es que busques el paquete CMU-SNMP, que esta bastante difundido.
+Asumamos que ya tienes el programa. Empecemos por tomar ciertos datos que est?n disponibles en la mayor?a de los sistemas. Recuerda: -hay un nombre abreviado para la parte del ?rbol que m?s nos interesa.
-Voy a usar la versi?n corta, ya que creo que este documento ya es +hay un nombre abreviado para la parte del ?rbol que m?s nos interesa.
+Voy a usar la versi?n corta, ya que creo que este documento ya es lo bastante largo. Si no te funciona, a??dele el prefijo .1.3.6.1.2.1 y prueba de nuevo. O prueba leyendo el manual; s?ltate las partes que no entiendas a?n, y busca las secciones que hablan de como arrancar y -usar el programa.
-- snmpget myrouter public system.sysdescr.0-
El dispositivo deber? contestarte con una descripci?n, probablemente +usar el programa.
++ snmpget myrouter public system.sysdescr.0+
El dispositivo deber? contestarte con una descripci?n, probablemente vac?a, de s? mismo. Si no consigues una respuesta v?lida, prueba con otra ``clave'' u otro dispositivo; no podemos seguir hasta tener un -resultado.
-- snmpget myrouter public interfaces.ifnumber.0-
Con suerte, usando este comando obtendr?s un n?mero como resultado: +resultado.
++ snmpget myrouter public interfaces.ifnumber.0+
Con suerte, usando este comando obtendr?s un n?mero como resultado: el n?mero de interfaces del dispositivo. Si es as?, seguiremos -adelante con otro programa, llamado ``snmpwalk''
-- snmpwalk myrouter public interfaces.iftable.ifentry.ifdescr-
Si obtienes una lista de interfaces, ya casi hemos llegado. Aqu? -tienes un ejemplo del resultado:
-+adelante con otro programa, llamado ``snmpwalk'' +++ snmpwalk myrouter public interfaces.iftable.ifentry.ifdescr+Si obtienes una lista de interfaces, ya casi hemos llegado. Aqu? +tienes un ejemplo del resultado:
+[user at host /home/alex]$ snmpwalk cisco public 2.2.1.2 interfaces.ifTable.ifEntry.ifDescr.1 = "BRI0: B-Channel 1" interfaces.ifTable.ifEntry.ifDescr.2 = "BRI0: B-Channel 2" interfaces.ifTable.ifEntry.ifDescr.3 = "BRI0" Hex: 42 52 49 30 interfaces.ifTable.ifEntry.ifDescr.4 = "Ethernet0" - interfaces.ifTable.ifEntry.ifDescr.5 = "Loopback0"-En este equipo CISCO, quiero monitorizar la interfaz ``Ethernet0''. -Viendo que es la cuarta, pruebo con:
-+ interfaces.ifTable.ifEntry.ifDescr.5 = "Loopback0"+En este equipo CISCO, quiero monitorizar la interfaz ``Ethernet0''. +Viendo que es la cuarta, pruebo con:
+[user at host /home/alex]$ snmpget cisco public 2.2.1.10.4 2.2.1.16.4 --- + interfaces.ifTable.ifEntry.ifInOctets.4 = 2290729126 - interfaces.ifTable.ifEntry.ifOutOctets.4 = 1256486519-Entonces, tengo 2 OIDs que monitorizar, y son (en el formato largo, ahora):
-+ interfaces.ifTable.ifEntry.ifOutOctets.4 = 1256486519+Entonces, tengo 2 OIDs que monitorizar, y son (en el formato largo, ahora):
+1.3.6.1.2.1.2.2.1.10 --- - y-- - 1.3.6.1.2.1.2.2.1.16-, ambas con el n?mero de interfaz de 4
-No te enga?es, esto no lo logre yo al primer intento. Me tom? un + + y + + 1.3.6.1.2.1.2.2.1.16
, ambas con el n?mero de interfaz de 4
+No te enga?es, esto no lo logre yo al primer intento. Me tom? un tiempo entender lo que significaban todos estos n?meros; ayuda cuando se traducen en un texto descriptivo... por lo menos, cuando oigas hablar de MIBs y OIDs, ahora sabr?s de qu? se trata. No te olvides del n?mero de interfaz (0 si el valor no depende de una interfaz), y -prueba con snmpwalk si no obtienes una respuesta clara con snmpget.
-Si entendiste todo esto, y obtienes resultados del dispositivo con +prueba con snmpwalk si no obtienes una respuesta clara con snmpget.
+Si entendiste todo esto, y obtienes resultados del dispositivo con el que est?s probando, sigue adelante con el tutorial. Si no, vuelve a -leer esta secci?n; es importante
--
Ok, empecemos con la diversi?n. Primero, crea una base de datos +leer esta secci?n; es importante
++
+Ok, empecemos con la diversi?n. Primero, crea una base de datos nueva. Vamos a guardar en ella 2 contadores, ``input'' y ``ouput''. Los datos los vamos a guardar en archivos que los promediar?n, tomando grupos de 1, 6, 24 o 288 muestras. Tambi?n archivaremos los valores m?ximos. Lo explicaremos con m?s detalle despu?s. El intervalo de -tiempo entre las muestras ser? de 300 segundos (5 minutos).
-+tiempo entre las muestras ser? de 300 segundos (5 minutos). ++1 muestra "promediada" sigue siendo 1 muestra cada 5 minutos 6 muestras promediadas son un promedio de cada 30 minutos 24 muestras promediadas son un promedio de cada 2 horas - 288 muestras promediadas son un promedio de cada d?a-Vamos a tratar de ser compatibles con MRTG, que guarda m?s o menos -esta cantidad de datos:
-+ 288 muestras promediadas son un promedio de cada d?a+Vamos a tratar de ser compatibles con MRTG, que guarda m?s o menos +esta cantidad de datos:
+600 muestras de 5 minutos: 2 d?as y 2 horas 600 promedios de 30 minutos: 12.5 d?as 600 promedios de 2 horas: 50 d?as - 600 promedios de 1 d?a: 732 d?as-Uniendo todos estos rangos tenemos que en total guardamos datos de + 600 promedios de 1 d?a: 732 d?as
Uniendo todos estos rangos tenemos que en total guardamos datos de unos 797 d?as. RRDtool guarda los datos de una forma distinta a MRTG; no empieza el archivo ``semanal'' donde acaba el ``diario'', sino que ambos archivos contienen la informaci?n m?s reciente, ?por lo que con -RRDtool archivamos m?s datos que con MRTG!
-Necesitaremos:
-+RRDtool archivamos m?s datos que con MRTG! ++Necesitaremos:
+600 muestras de 5 minutos (2 d?as y 2 horas) 700 entradas de 30 minutos (2 d?as y 2 horas, m?s 12.5 d?as) 775 entradas de 2 horas (lo anterior + 50 d?as) - 797 entradas de 1 d?a (lo anterior + 732 d?as, redondeando)-+ 797 entradas de 1 d?a (lo anterior + 732 d?as, redondeando)+rrdtool create myrouter.rrd \ DS:input:COUNTER:600:U:U \ DS:output:COUNTER:600:U:U \ @@ -652,11 +661,11 @@ RRA:MAX:0.5:1:600 \ RRA:MAX:0.5:6:700 \ RRA:MAX:0.5:24:775 \ - RRA:MAX:0.5:288:797-Lo siguiente es recoger los datos y guardarlos, como en el ejemplo + RRA:MAX:0.5:288:797
Lo siguiente es recoger los datos y guardarlos, como en el ejemplo siguiente. Esta parcialmente en pseudo-c?digo, por lo que tendr?s que -buscar exactamente como hacerlo funcionar en tu sistema operativo.
-+buscar exactamente como hacerlo funcionar en tu sistema operativo. ++mientras no sea el fin del universo hacer tomar el resultado de @@ -667,34 +676,35 @@ en la variable $out rrdtool update myrouter.rrd N:$in:$out esperar 5 minutos - hecho-Luego, tras recoger datos por un d?a, crea una imagen, usando:
-+ hecho+Luego, tras recoger datos por un d?a, crea una imagen, usando:
+rrdtool graph myrouter-day.gif --start -86400 \ DEF:inoctets=myrouter.rrd:input:AVERAGE \ DEF:outoctets=myrouter.rrd:output:AVERAGE \ AREA:inoctets#00FF00:"In traffic" \ - LINE1:outoctets#0000FF:"Out traffic"-Este comando debe producir un gr?fico del tr?fico del d?a. Un d?a + LINE1:outoctets#0000FF:"Out traffic"
Este comando debe producir un gr?fico del tr?fico del d?a. Un d?a son 24 horas, de 60 minutos, de 60 segundos: 24*60*60=86400, o sea que empezamos a ``ahora'' menos 86400 segundos. Definimos (con los DEFs) ``inoctets'' y ``outoctets'' como los valores promedio de la base da datos myrouter.rrd, dibujando un ?rea para el tr?fico de entrada y una l?nea -para el tr?fico de salida.
-Mira la imagen y sigue recogiendo datos por unos cuantos d?as. Si +para el tr?fico de salida.
+Mira la imagen y sigue recogiendo datos por unos cuantos d?as. Si lo deseas, puedes probar con los ejemplos de la base de datos de pruebas y ver si puedes hacer trabajar las diversas opciones y -operaciones.
-Sugerencia:
-Haz un gr?fico que muestre el tr?fico en bytes por segundo y en +operaciones.
+Sugerencia:
+Haz un gr?fico que muestre el tr?fico en bytes por segundo y en bits por segundo. Colorea el tr?fico Ethernet rojo si sobrepasa los -cuatro megabits por segundo.
--
Unos cuantos p?rrafos atr?s habl?bamos sobre la posibilidad de +cuatro megabits por segundo.
++
+Unos cuantos p?rrafos atr?s habl?bamos sobre la posibilidad de guardar el valor m?ximo en vez del promedio. Profundicemos un poco en -este tema.
-Recordemos lo que habl?bamos sobre la velocidad de un coche. +este tema.
+Recordemos lo que habl?bamos sobre la velocidad de un coche. Supongamos que manejamos a 144 KM/H durante 5 minutos y luego nos detiene la polic?a durante unos 25 minutos. Al finalizar el rega?o, tomamos nuestro port?til y creamos una imagen @@ -702,13 +712,13 @@ creamos, tendremos el promedio de 6 muestreos. Las velocidades registradas serian 144+0+0+0+0+0=144, lo que en promedio nos da una velocidad de 24 KM/H., con lo que nos igual nos -pondr?an una multa, s?lo que no por exceso de velocidad.
-Obviamente, en este caso, no deber?amos tomar en cuenta los +pondr?an una multa, s?lo que no por exceso de velocidad.
+Obviamente, en este caso, no deber?amos tomar en cuenta los promedios. Estos son ?tiles en varios casos. Por ejemplo, si queremos ver cuantos KM hemos viajado, este ser?a el gr?fico m?s indicado. Pero por otro lado, para ver la velocidad ha la -que hemos viajado, los valores m?ximos son m?s adecuados.
-Es lo mismo con los datos que recogemos. Si quieres saber la +que hemos viajado, los valores m?ximos son m?s adecuados.
+Es lo mismo con los datos que recogemos. Si quieres saber la cantidad total, mira los promedios. Si quieres ver la velocidad, mira los m?ximos. Con el tiempo, ambas cantidades se separan cada vez m?s. En la ?ltima base de datos que creamos, hab?a dos archivos que @@ -716,12 +726,12 @@ mostrar? valores bajos, mientras que el de m?ximos mostrar? valores m?s altos. Para mi coche, mostrar?a valores promedio de 96/24=4 KM/H (viajo unos 96 kil?metros por d?a), y m?ximos de 1220 KM/H (la -velocidad m?xima que alcanzo cada d?a)
-Como ves, una gran diferencia. No mires el segundo gr?fico para +velocidad m?xima que alcanzo cada d?a)
+Como ves, una gran diferencia. No mires el segundo gr?fico para estimar la distancia que recorro, ni al primero para estimar la velocidad a la que voy. Esto s?lo funciona con muestras muy cercanas, -pero no si sacas promedios.
-Algunas veces, hago un viaje largo. Si hago un recorrido por +pero no si sacas promedios.
+Algunas veces, hago un viaje largo. Si hago un recorrido por Europa, conduciendo por unas 12 horas, el primer gr?fico subir? a unos 60 KM/H. El segundo mostrar? unos 180 KM/H. Esto significa que recorr? unos 60 KM/H por 24 horas = 1440 KM. Muestra adem?s que fui a @@ -739,33 +749,35 @@ esto nos lleva unas 12 muestras por hora, o 288 al d?a, lo cual es mucho para guardar por un periodo de tiempo largo. Por lo tanto, sacamos el promedio, guardando eventualmente un solo valor por d?a. -Con este ?nico valor, no podemos ver mucho.
-Es importante comprender lo que expuesto en estos ?ltimos p?rrafos. +Con este ?nico valor, no podemos ver mucho.
+Es importante comprender lo que expuesto en estos ?ltimos p?rrafos. Unos ejes y unas l?neas no tienen ning?n valor por si mismos; hay que saber que representan e interpretar correctamente los valores -obtenidos. Sean cuales sean los datos, esto siempre ser? cierto.
-El mayor error que puedes cometer es usar los datos recogidos para +obtenidos. Sean cuales sean los datos, esto siempre ser? cierto.
+El mayor error que puedes cometer es usar los datos recogidos para algo para lo cual no sirven. En ese caso, seria hasta mejor no tener -gr?fico alguno.
--
Ahora ya sabes como crear una base de datos. Puedes guardar valores +gr?fico alguno.
++
+Ahora ya sabes como crear una base de datos. Puedes guardar valores en ella, extraerlos creando un gr?fico, hacer operaciones matem?ticas con ellos desde la base de datos y visualizar los resultados de estas en vez de los datos originales. Vimos la diferencia entre los promedios y los m?ximos y cuando debemos usar cada uno (o al menos una -idea de ello)
-RRDtool puede hacer m?s de lo que hemos visto hasta ahora. Pero +idea de ello)
+RRDtool puede hacer m?s de lo que hemos visto hasta ahora. Pero antes de continuar, te recomiendo que releas el texto desde el principio y pruebes a hacerle algunas modificaciones a los ejemplos. Aseg?rate de entenderlo todo. El esfuerzo valdr? la pena, y te ayudar?, no s?lo con el resto del documento, sino en tu trabajo diario de -monitorizaci?n, mucho despu?s de terminar con esta introducci?n.
--
De acuerdo, quieres continuar. Bienvenido de vuelta otra vez y -prep?rate; voy a ir m?s r?pido con los ejemplos y explicaciones.
-Ya vimos que, para ver el cambio de un contador a lo largo del +monitorizaci?n, mucho despu?s de terminar con esta introducci?n.
++
+De acuerdo, quieres continuar. Bienvenido de vuelta otra vez y +prep?rate; voy a ir m?s r?pido con los ejemplos y explicaciones.
+Ya vimos que, para ver el cambio de un contador a lo largo del tiempo, tenemos que tomar dos n?meros y dividir la diferencia entre el tiempo transcurrido entre las mediciones. Para los ejemplos que hemos visto es lo l?gico, pero hay otras posibilidades. Por ejemplo, mi @@ -774,8 +786,8 @@ ventilaci?n. Estos valores no son contadores; si tomo los valores de dos muestreos y lo divido entre 300 segundos, obtendr? el cambio de temperatura por segundo. ?Esperemos que sea cero, o tendr?amos un -incendio en el cuarto de ordenadores! :)
-Entonces, ?que hacemos? Podemos decirle a RRDtool que guarde los +incendio en el cuarto de ordenadores! :)
+Entonces, ?que hacemos? Podemos decirle a RRDtool que guarde los valores tal como los medimos (esto no es exactamente as?, pero se aproxima bastante a la verdad). As?, los gr?ficos se ver?n mucho mejor. Puedo ver cuando el enrutador est? trabajando m?s (en serio, @@ -786,13 +798,13 @@ temperatura en la entrada de aire del enrutador), etc. Antes usamos un tipo de datos de ``contador'', ahora usaremos un tipo de datos diferente, con un nombre diferente, GAUGE. -Tenemos otros tipos:
-+Tenemos otros tipos: ++- COUNTER este ya lo conocemos - GAUGE este acabamos de verlo - DERIVE - - ABSOLUTE-Los otros dos tipos son DERIVE y ABSOLUTE. ABSOLUTE puede usarse + - ABSOLUTE
Los otros dos tipos son DERIVE y ABSOLUTE. ABSOLUTE puede usarse igual que COUNTER, con una diferencia; RRDtool asume que el contador se reinicia cada vez que se lee. O en otras palabras; el delta entre los valores no hay que calcularlo, mientras que con COUNTER RRDtool @@ -800,9 +812,9 @@ (12345, 12357, 12363, 12363), ser?a (unknown, 12, 6, 0) en ABSOLUTE. El otro tipo, DERIVE, es como COUNTER, pero al contrario de COUNTER, este valor tambi?n puede decrecer, por lo que puede tenerse un delta -negativo.
-Vamos a probarlos todos:
-+negativo. +Vamos a probarlos todos:
+rrdtool create all.rrd --start 978300900 \ DS:a:COUNTER:600:U:U \ DS:b:GAUGE:600:U:U \ @@ -824,47 +836,48 @@ DEF:linea=all.rrd:a:AVERAGE LINE3:linea#FF0000:"Line A" \ DEF:lineb=all.rrd:b:AVERAGE LINE3:lineb#00FF00:"Line B" \ DEF:linec=all.rrd:c:AVERAGE LINE3:linec#0000FF:"Line C" \ - DEF:lined=all.rrd:d:AVERAGE LINE3:lined#000000:"Line D"--
RRDtool bajo el microscopio
-
+
+Esto equivale a los valores siguientes, empezando a las 23:10 y -terminando a las 00:10 (las U significan desconocido).
-+
Esto equivale a los valores siguientes, empezando a las 23:10 y +terminando a las 00:10 (las U significan desconocido).
+- L?nea A: u u 1 1 1 1 1 1 1 1 1 u - L?nea B: u 1 3 5 3 1 2 4 6 4 2 u - L?nea C: u u 2 2 2 0 -2 -6 2 0 2 u - - L?nea D: u 1 2 3 4 5 6 7 8 9 10 u-
Si tu archivo GIF muestra todo esto, has + - L?nea D: u 1 2 3 4 5 6 7 8 9 10 u +
Si tu archivo GIF muestra todo esto, has entrado los datos correctamente, tu programa RRDtool est? funcionando bien, el visor de gr?ficos no te enga?a y hemos entrado en el 2000 sin -problemas :) Puedes probar el mismo ejemplo cuatro veces, una por cada l?nea.
-Revisemos los datos otra vez:
-Revisemos los datos otra vez:
+-
Todav?a nos quedan algunas cosas por ver. Nos quedan algunas +
+
+Todav?a nos quedan algunas cosas por ver. Nos quedan algunas opciones importantes por cubrir, y aun no hemos hablado de la reinicializaci?n de contadores. Empecemos por ah?: Estamos en nuestro coche, vemos el contador y muestra 999987. Andamos unos 20 KM, as? que @@ -916,24 +930,22 @@ contador. ?C?mo funciona? Los valores tipo COUNTER no deben decrecer nunca, ?por lo que RRDtool asume en ese caso que el contador se ha reinicializado! Si la diferencia es negativa, esto se compensa sumando -el valor m?ximo del contador + 1. Para nuestro coche, tendr?amos:
-+el valor m?ximo del contador + 1. Para nuestro coche, tendr?amos: ++Delta = 7 - 999987 = -999980 (en vez de 1000007-999987=20) --- - Delta real= -999980 + 999999 + 1 = 20-Al momento de escribir este documento, RRDtool maneja contadores de + + Delta real= -999980 + 999999 + 1 = 20
Al momento de escribir este documento, RRDtool maneja contadores de 32 o 64 bits de tama?o. Estos contadores pueden manejar los siguientes -valores:
-+valores: ++- 32 bits: 0 .. 4294967295 - - 64 bits: 0 .. 18446744073709551615-Si estos valores te parecen raros, podemos verlos en formato hexadecimal:
-+ - 64 bits: 0 .. 18446744073709551615+Si estos valores te parecen raros, podemos verlos en formato hexadecimal:
+- 32 bits: 0 .. FFFFFFFF - - 64 bits: 0 .. FFFFFFFFFFFFFFFF-RRDtool maneja ambos contadores de la misma manera. Si ocurre un + - 64 bits: 0 .. FFFFFFFFFFFFFFFF
RRDtool maneja ambos contadores de la misma manera. Si ocurre un desbordamiento y la diferencia es negativa, RRDtool le suma primero el m?ximo del contador ``menor'' (32 bits) + 1 a la diferencia. Si a?n as? la diferencia es negativa, entonces el contador reinicializado era @@ -948,34 +960,30 @@ lo que de ocurrir es muy probable que halla varios problemas m?s en la configuraci?n y no merezca la pena preocuparse s?lo por este. A?n as?, he incluido un ejemplo de este caso para que lo puedas juzgar por -ti mismo.
-A continuaci?n, unos ejemplos de reinicializaci?n de los +ti mismo.
+A continuaci?n, unos ejemplos de reinicializaci?n de los contadores. Prueba de hacer los c?lculos por ti mismo, o acepta mis -resultados si tu calculadora no puede con los n?meros :)
-N?meros de correcci?n:
-+resultados si tu calculadora no puede con los n?meros :) ++N?meros de correcci?n:
+- 32 bits: (4294967295+1) = 4294967296 - 64 bits: (18446744073709551615+1)-correction1 = 18446744069414584320 --- + Antes: 4294967200 Incremento: 100 Deber?a ser: 4294967300 Pero es: 4 Diferencia: -4294967196 - Correcci?n #1: -4294967196 + 4294967296 = 100-- + Correcci?n #1: -4294967196 + 4294967296 = 100 + Antes: 18446744073709551000 Incremento: 800 Deber?a ser: 18446744073709551800 Pero es: 184 Diferencia: -18446744073709550816 Correcci?n #1: -18446744073709550816 +4294967296 = -18446744069414583520 - Correcci?n #2: -18446744069414583520 +18446744069414584320 = 800-- + Correcci?n #2: -18446744069414583520 +18446744069414584320 = 800 + Antes: 18446744073709551615 ( valor m?ximo ) Incremento: 18446744069414584320 ( incremento absurdo, Deber?a ser: 36893488143124135935 m?nimo para que @@ -983,17 +991,16 @@ Diferencia: -4294967296 Correcci?n #1: -4294967296 + 4294967296 = 0 (positivo, por tanto no se hace - la segunda correcci?n)-- + la segunda correcci?n) + Antes: 18446744073709551615 ( valor m?ximo ) Incremento: 18446744069414584319 Deber?a ser: 36893488143124135934 Pero es: 18446744069414584318 Diferencia: -4294967297 Correcci?n #1: -4294967297 +4294967296 = -1 - Correcci?n #2: -1 +18446744069414584320 = 18446744069414584319-Como puede verse en los ?ltimos ejemplos, necesitas unos valores + Correcci?n #2: -1 +18446744069414584320 = 18446744069414584319
Como puede verse en los ?ltimos ejemplos, necesitas unos valores bastante extra?os para hacer que RRDtool falle (asumiendo que no tenga ning?n error el programa, por supuesto), as? que esto no deber?a ocurrir. Sin embargo, SNMP o cualquier otro @@ -1012,15 +1019,16 @@ Cualquier otra cosa ser?a un error. Pero recuerda, lo contrario no es cierto: si los valores pasan este examen no quiere decir que sean los correctos. Siempre examina bien el gr?fico si los valores parecen -extra?os.
--
Hay una funcionalidad importante de RRDtool que no hemos explicado +extra?os.
++
+Hay una funcionalidad importante de RRDtool que no hemos explicado todav?a: es virtualmente imposible recoger los datos y pasarselos a RRDtool a intervalos exactos de tiempo. Por tanto, RRDtool interpola los datos a los intervalos exactos. Si no sabes que significa esto o -como se hace, he aqu? la ayuda que necesitas:
-Supongamos un contador se incremente exactamente en 1 cada segundo. +como se hace, he aqu? la ayuda que necesitas:
+Supongamos un contador se incremente exactamente en 1 cada segundo. Queremos medirlo cada 300 segundos, por lo que deber?amos tener valores separados exactamente en 300. Sin embargo, por varias circunstancias llegamos unos segundos tarde y el intervalo es 303. La @@ -1031,30 +1039,30 @@ en 300 segundos. Digamos que la pr?xima vez llegamos justo a tiempo; por tanto, el intervalo actual es 297 segundos, por lo que el contador deber?a ser 297. De nuevo, RRDtool altera el valor y guarda 300, como -debe ser.
-+debe ser. ++en RRD en realidad tiempo+000: 0 delta="U" tiempo+000: 0 delta="U" tiempo+300: 300 delta=300 tiempo+300: 300 delta=300 tiempo+600: 600 delta=300 tiempo+603: 603 delta=303 - tiempo+900: 900 delta=300 tiempo+900: 900 delta=297-Creemos dos bases de datos id?nticas. He escogido el rango de -tiempo entre 920805000 y 920805900.
-+ tiempo+900: 900 delta=300 tiempo+900: 900 delta=297+Creemos dos bases de datos id?nticas. He escogido el rango de +tiempo entre 920805000 y 920805900.
+rrdtool create seconds1.rrd \ --start 920804700 \ DS:seconds:COUNTER:600:U:U \ - RRA:AVERAGE:0.5:1:24-+ RRA:AVERAGE:0.5:1:24+para Unix: cp seconds1.rrd seconds2.rrd para DOS: copy seconds1.rrd seconds2.rrd - para VMS: y yo que s? :)-+ para VMS: y yo que s? :)+rrdtool update seconds1.rrd \ 920805000:000 920805300:300 920805600:600 920805900:900 rrdtool update seconds2.rrd \ - 920805000:000 920805300:300 920805603:603 920805900:900-+ 920805000:000 920805300:300 920805603:603 920805900:900+rrdtool graph seconds1.gif \ --start 920804700 --end 920806200 \ --height 200 \ @@ -1070,40 +1078,44 @@ DEF:seconds=seconds2.rrd:seconds:AVERAGE \ CDEF:unknown=seconds,UN \ LINE2:seconds#0000FF \ - AREA:unknown#FF0000-Los dos gr?ficos debe ser iguales.
--
-RESUMEN
-Es hora de concluir este documento. Ahora debes conocer lo b?sico + AREA:unknown#FF0000
Los dos gr?ficos debe ser iguales.
++
+Es hora de concluir este documento. Ahora debes conocer lo b?sico como para trabajar con RRDtool y leer la documentaci?n. A?n hay mucho m?s por descubrir acerca de RRDtool, y le encontrar?s; m?s y m?s usos para la herramienta. Con los ejemplos y la herramienta puedes crear f?cilmente muchos gr?ficos; tambi?n puedes usar las interfaces -disponibles.
--
Recuerda subscribirte a la lista de correo. Aunque no contestes los +disponibles.
++
+Recuerda subscribirte a la lista de correo. Aunque no contestes los correos que aparecen en ella, te servir? de ayuda a ti y a los dem?s. Mucho de lo que se sobre MRTG (y por tanto sobre RRDtool), lo aprend? tan s?lo con leer la lista, sin escribir. No hay por que preguntar las preguntas b?sicas, que ya tienen su respuesta en la FAQ (?l?ela!). Con miles de usuarios a lo largo del mundo, siempre hay preguntas que tu -puedes responder con lo aprendido en este y otros documentos.
--
Las p?ginas del manual de RRDtool
--
Espero que hayas disfrutado con los ejemplos y las descripciones. +puedes responder con lo aprendido en este y otros documentos.
++
+Las p?ginas del manual de RRDtool
++
+Espero que hayas disfrutado con los ejemplos y las descripciones. Si es as?, ayuda a otros refiri?ndolos a este documento cuando te hagan preguntas b?sicas. No s?lo obtendr?n la respuesta, sino que -aprender?n muchas otras cosas.
-Alex van den Bogaerdt <alex at ergens.op.het.net>
+aprender?n muchas otras cosas. +Alex van den Bogaerdt <alex at ergens.op.het.net>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdtune.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdtune.html (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdtune.html 2003-02-20 15:24:00.000000000 -0800 @@ -1,91 +1,109 @@ - - --
rrdtool tune - Modify some basic properties of a Round Robin Database
--
rrdtool tune filename -[--heartbeat|-h ds-name:heartbeat] -[--minimum|-i ds-name:min] -[--maximum|-a ds-name:max] -[--data-source-type|-d ds-name:DST] -[--data-source-rename|-r old-name:new-name]
--
The tune option allows you to alter some of the basic configuration -values stored in the header area of a Round Robin Database (RRD). +
+
+rrdtool tune - Modify some basic properties of a Round Robin Database
++
+rrdtool tune filename +[--heartbeat|-h ds-name:heartbeat] +[--minimum|-i ds-name:min] +[--maximum|-a ds-name:max] +[--data-source-type|-d ds-name:DST] +[--data-source-rename|-r old-name:new-name]
++
+The tune option allows you to alter some of the basic configuration +values stored in the header area of a Round Robin Database (RRD). All these tunable parameters together decide when data fed into an -RRD is to be regarded as invalid. Invalid data is entered into the -database as *UNKNOWN*.
-The main application of the tune function is to relax the -validation rules on an RRD. This allows to fill a new RRD with +RRD is to be regarded as invalid. Invalid data is entered into the +database as *UNKNOWN*.
+The main application of the tune function is to relax the +validation rules on an RRD. This allows to fill a new RRD with data available in larger intervals than what you would normally want -to permit.
--
rrdtool tune data.rrd -h in:100000 -h out:100000 -h through:100000
Set the minimum required heartbeat for data sources 'in', 'out' +
+
+rrdtool tune data.rrd -h in:100000 -h out:100000 -h through:100000
Set the minimum required heartbeat for data sources 'in', 'out' and 'through' to 10000 seconds which is a little over one day in data.rrd. This would allow to feed old data from mrtg-2.0 right into -rrdtool without generating *UNKNOWN* entries.
--
Tobias Oetiker <oetiker at ee.ethz.ch>
+rrdtool without generating *UNKNOWN* entries. ++
+Tobias Oetiker <oetiker at ee.ethz.ch>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdresize.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdresize.txt (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdresize.txt 2003-02-20 15:24:00.000000000 -0800 @@ -2,35 +2,35 @@ -NNNNAAAAMMMMEEEE +NNAAMMEE rrdtool resize - alters the size of an RRA and creates new .rrd file -SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - rrrrrrrrddddttttoooooooollll rrrreeeessssiiiizzzzeeee _f_i_l_e_n_a_m_e _r_r_a_-_n_u_m GGGGRRRROOOOWWWW_|SSSSHHHHRRRRIIIINNNNKKKK _r_o_w_s +SSYYNNOOPPSSIISS + rrrrddttooooll rreessiizzee _f_i_l_e_n_a_m_e _r_r_a_-_n_u_m GGRROOWW_|SSHHRRIINNKK _r_o_w_s -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - The rrrreeeessssiiiizzzzeeee function is used to modify the number of rows - in an RRRRRRRRAAAA. +DDEESSCCRRIIPPTTIIOONN + The rreessiizzee function is used to modify the number of rows + in an RRRRAA. _f_i_l_e_n_a_m_e - the name of the RRRRRRRRDDDD you want to alter. + the name of the RRRRDD you want to alter. - _r_r_a_-_n_u_m the RRRRRRRRAAAA you want to alter. You can find the number - using rrrrrrrrddddttttoooooooollll iiiinnnnffffoooo. + _r_r_a_-_n_u_m the RRRRAA you want to alter. You can find the number + using rrrrddttooooll iinnffoo. - GGGGRRRROOOOWWWW used if you want to add extra rows to an RRA. The + GGRROOWW used if you want to add extra rows to an RRA. The extra rows will be inserted as the rows that are oldest. - SSSSHHHHRRRRIIIINNNNKKKK used if you want to remove rows from an RRA. The + SSHHRRIINNKK used if you want to remove rows from an RRA. The rows that will be removed are the oldest rows. _r_o_w_s the number of rows you want to add or remove. -NNNNOOOOTTTTEEEESSSS +NNOOTTEESS The new .rrd file, with the modified RRAm, is written to - the file rrrreeeessssiiiizzzzeeee....rrrrrrrrdddd in the current directory. The origi- + the file rreessiizzee..rrrrdd in the current directory. The origi- nal .rrd file is not modified. It is possible to abuse this tool and get strange results @@ -39,9 +39,9 @@ thus end up with unknown data in one RRA while at the same timestamp this data is available in another RRA. -AAAAUUUUTTTTHHHHOOOORRRR +AAUUTTHHOORR Alex van den Bogaerdt-
Binary Decimal Hexadecimal - How does it work
--
Most people use the decimal numbering system. This system uses ten +
+
+Binary Decimal Hexadecimal - How does it work
++
+Most people use the decimal numbering system. This system uses ten symbols to represent numbers. When those ten symbols are used up, they start all over again and increment the position just before this. The digit 0 is only shown if it is the only symbol in the sequence, or if -it is not the first one.
-If this sounds as crypto to you, this is what I've said in numbers:
-+it is not the first one. ++If this sounds as crypto to you, this is what I've said in numbers:
+0 1 2 @@ -45,19 +48,19 @@ 10 11 12 - 13-and so on.
-Each time the digit nine should be incremented, it is reset to 0 and the + 13
and so on.
+Each time the digit nine should be incremented, it is reset to 0 and the position before is incremented. Then number 9 can be seen as ``00009'' and when we should increment 9, we reset it to zero and increment the digit just before the 9 so the number becomes ``00010''. For zero's we write a space if it is not the only digit (so: number 0) and if it is the first -digit: ``00010'' -> `` 0010'' -> `` 010'' -> `` 10''. It is not `` 1 ''.
-This was pretty basic, you already knew this. Why did I tell it ? +digit: ``00010'' -> `` 0010'' -> `` 010'' -> `` 10''. It is not `` 1 ''.
+This was pretty basic, you already knew this. Why did I tell it ? Well, computers do not represent numbers with 10 different digits. They know of only two different symbols, being 0 and 1. Apply the same rules -to this set of digits and you get the binary numbering system:
-+to this set of digits and you get the binary numbering system: ++0 1 10 @@ -71,46 +74,46 @@ 1010 1011 1100 - 1101-and so on.
-If you count the number of rows, you'll see that these are again 14 + 1101
and so on.
+If you count the number of rows, you'll see that these are again 14
different numbers. The numbers are the same and mean the same. It is
only a different representation. This means that you have to know the
representation used, or as it is called the numbering system or base.
Normally if we do not speak about the numbering system used, we're
using the decimal system. If we are talking about another numbering
system, we'll have to make that clear. There are a few wide-spread
-methods to do so. One common form is to write 1010(2) which means that
+methods to do so. One common form is to write 1010(2) which means that
you wrote down a number in the binary form. It is the number ten.
-If you would write 1010 it means the number one thousand and ten.
In books, another form is most used. It uses subscript (little chars, +If you would write 1010 it means the number one thousand and ten.
+In books, another form is most used. It uses subscript (little chars, more or less in between two rows). You can leave out the parentheses in that case and write down the number in normal characters followed -with a little two just behind it.
-The numbering system used is also called the base. We talk of the number -1100 base 2, the number 12 base 10.
-For the binary system, is is common to write leading zero's. The numbers +with a little two just behind it.
+The numbering system used is also called the base. We talk of the number +1100 base 2, the number 12 base 10.
+For the binary system, is is common to write leading zero's. The numbers are written down in series of four, eight or sixteen depending on the -context.
-We can use the binary form when talking to computers (...programming...) +context.
+We can use the binary form when talking to computers (...programming...)
but the numbers will have large representations. The number 65535 would
-be written down as 1111111111111111(2) which is 16 times the digit 1.
+be written down as 1111111111111111(2) which is 16 times the digit 1.
This is difficult and prone to errors. Therefore we normally would use
another base, called hexadecimal. It uses 16 different symbols. First
the symbols from the decimal system are used, thereafter we continue
with the alphabetic characters. We get 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A,
B, C, D, E and F. This system is chosen because the hexadecimal form
-can be converted into the binary system very easy (and back).
There is yet another system in use, called the octal system. This was +can be converted into the binary system very easy (and back).
+There is yet another system in use, called the octal system. This was more common in the old days but not anymore. You will find it in use on some places so get used to it. The same story applies, but now with -only eight different symbols.
-+only eight different symbols. ++Binary (2) Octal (8) Decimal (10) - Hexadecimal (16)-+ Hexadecimal (16)+(2) (8) (10) (16) 00000 0 0 0 00001 1 1 1 @@ -133,24 +136,24 @@ 10010 22 18 12 10011 23 19 13 10100 24 20 14 - 10101 25 21 15-Most computers used nowadays are using bytes of eight bits. This means + 10101 25 21 15
Most computers used nowadays are using bytes of eight bits. This means that they store eight bits at a time. You can see why the octal system is not the most preferred for that: You'd need three digits to represent the eight bits and this means that you'd have to use one complete digit to represent only two bits (2+3+3=8). This is a waste. For hexadecimal -digits, you need only two digits which are used completely:
-+digits, you need only two digits which are used completely: ++(2) (8) (10) (16) - 11111111 377 255 FF-You can see why binary and hexadecimal can be converted quickly: + 11111111 377 255 FF
You can see why binary and hexadecimal can be converted quickly: For each hexadecimal digit there are exactly four binary digits. Take a binary number. Each time take four digits from the right and make a hexadecimal digit from it (see the table above). Stop when there are no more digits. Other way around: Take a hexadecimal number. For each digit, write down -its binary equivalent.
-Computers (or rather the parsers running on them) would have a hard time +its binary equivalent.
+Computers (or rather the parsers running on them) would have a hard time converting a number like 1234(16). Therefore hexadecimal numbers get a prefix. This prefix depends on the language you're writing in. Some of the prefixes are ``0x'' for C, ``$'' for Pascal, ``#'' for HTML. @@ -158,75 +161,75 @@ It does not matter what is used as long as you know what it is. I will use ``0x'' for hexadecimal, ``%'' for binary and ``0'' for octal. The following numbers are all the same, just the way they are written is -different: 021 0x11 17 %00010001
-To do arithmetics and conversions you need to understand one more thing. -It is something you already know but perhaps you do not ``see'' it yet:
-If you write down 1234, (so it is decimal) you are talking about the -number one thousand, two hundred and thirty four. In sort of a formula:
-+different: 021 0x11 17 %00010001 ++To do arithmetics and conversions you need to understand one more thing. +It is something you already know but perhaps you do not ``see'' it yet:
+If you write down 1234, (so it is decimal) you are talking about the +number one thousand, two hundred and thirty four. In sort of a formula:
+1 * 1000 = 1000 2 * 100 = 200 3 * 10 = 30 - 4 * 1 = 4-This can also be written as:
-+ 4 * 1 = 4+This can also be written as:
+1 * 10^3 2 * 10^2 3 * 10^1 - 4 * 10^0-where ^ means ``to the power of''.
-We are using the base 10, and the positions 0,1,2 and 3. + 4 * 10^0
where ^ means ``to the power of''.
+We are using the base 10, and the positions 0,1,2 and 3. The right-most position should NOT be multiplied with 10. The second from the right should be multiplied one time with 10. The third from the right is multiplied with 10 two times. This continues for whatever -positions are used.
-It is the same in all other representations:
-0x1234 will be
-+positions are used. ++It is the same in all other representations:
+0x1234 will be
+1 * 16^3 2 * 16^2 3 * 16^1 - 4 * 16^0-01234 would be
-+ 4 * 16^0+01234 would be
+1 * 8^3 2 * 8^2 3 * 8^1 - 4 * 8^0-This example can not be done for binary as that system can only use two -symbols. Another example:
-%1010 would be
-+ 4 * 8^0+This example can not be done for binary as that system can only use two +symbols. Another example:
+%1010 would be
+1 * 2^3 0 * 2^2 1 * 2^1 - 0 * 2^0-It would have been more easy to convert it to its hexadecimal form and + 0 * 2^0
It would have been more easy to convert it to its hexadecimal form and just translate %1010 into 0xA. After a while you get used to it. You will -not need to do any calculations anymore but just know that 0xA means 10.
-To convert a decimal number into a hexadecimal one you could use the next +not need to do any calculations anymore but just know that 0xA means 10.
+To convert a decimal number into a hexadecimal one you could use the next method. It will take some time to be able to do the estimates but it will be more and more easy when you use the system more frequent. Another way -is presented to you thereafter.
-First you will need to know how many positions will be used in the other +is presented to you thereafter.
+First you will need to know how many positions will be used in the other system. To do so, you need to know the maximum numbers. Well, that's not so hard as it looks. In decimal, the maximum number that you can form with two digits is ``99''. The maximum for three: ``999''. The next number would need an extra position. Reverse this idea and you will see that the number can be found by taking 10^3 (10*10*10 is 1000) minus 1 or -10^2 minus one.
-This can be done for hexadecimal too:
-+10^2 minus one. ++This can be done for hexadecimal too:
+16^4 = 0x10000 = 65536 16^3 = 0x1000 = 4096 16^2 = 0x100 = 256 - 16^1 = 0x10 = 16-If a number is smaller than 65536 it will thus fit in four positions. + 16^1 = 0x10 = 16
If a number is smaller than 65536 it will thus fit in four positions. If the number is bigger than 4095, you will need to use position 4. How many times can you take 4096 from the number without going below zero is the first digit you write down. This will always be a number -from 1 to 15 (0x1 to 0xF). Do the same for the other positions.
-Number is 41029. It is smaller than 16^4 but bigger than 16^3-1. This +from 1 to 15 (0x1 to 0xF). Do the same for the other positions.
+Number is 41029. It is smaller than 16^4 but bigger than 16^3-1. This means that we have to use four positions. We can subtract 16^3 from 41029 ten times without going below zero. The leftmost digit will be ``A'' so we have 0xA????. @@ -235,27 +238,27 @@ is therefore ``0'' and we know 0xA0??. 69 is smaller than 16^2 and bigger than 16^1-1. We can subtract 16^1 (which is just plain 16) four times and write down ``4'' to get 0xA04?. -Take 64 from 69 (69 - 4*16) and the last digit is 5 --> 0xA045.
-The other method builds the number from the right. Take again 41029. -Divide by 16 and do not use fractions (only whole numbers).
-+Take 64 from 69 (69 - 4*16) and the last digit is 5 --> 0xA045. ++The other method builds the number from the right. Take again 41029. +Divide by 16 and do not use fractions (only whole numbers).
+41029 / 16 is 2564 with a remainder of 5. Write down 5. 2564 / 16 is 160 with a remainder of 4. Write the 4 before the 5. 160 / 16 is 10 with no remainder. Prepend 45 with 0. - 10 / 16 is below one. End here and prepend 0xA. End up with 0xA045.-Which method to use is up to you. Use whatever works for you. Personally + 10 / 16 is below one. End here and prepend 0xA. End up with 0xA045.
Which method to use is up to you. Use whatever works for you. Personally I use them both without being able to tell what method I use in each case, it just depends on the number, I think. Fact is, some numbers will occur frequently while programming, if the number is close then I will use the first method (like 32770, translate into 32768 + 2 and -just know that it is 0x8000 + 0x2 = 0x8002).
-For binary the same approach can be used. The base is 2 and not 16, +just know that it is 0x8000 + 0x2 = 0x8002).
+For binary the same approach can be used. The base is 2 and not 16, and the number of positions will grow rapidly. Using the second method has the advantage that you can see very simple if you should write down a zero or a one: if you divide by two the remainder will be zero if it was an even number and one if it was an odd number: -
-+ ++41029 / 2 = 20514 remainder 1 20514 / 2 = 10257 remainder 0 @@ -272,17 +275,17 @@ 10 / 2 = 5 remainder 0 5 / 2 = 2 remainder 1 2 / 2 = 1 remainder 0 - 1 / 2 below 0 remainder 1-Write down the results from right to left: %1010000001000101
-Group by four:
-+ 1 / 2 below 0 remainder 1+Write down the results from right to left: %1010000001000101
+Group by four:
+%1010000001000101 %101000000100 0101 %10100000 0100 0101 - %1010 0000 0100 0101-Convert into hexadecimal: 0xA045
-Group %1010000001000101 by three and convert into octal:
-+ %1010 0000 0100 0101+Convert into hexadecimal: 0xA045
+Group %1010000001000101 by three and convert into octal:
+%1010000001000101 %1010000001000 101 %1010000001 000 101 @@ -290,23 +293,23 @@ %1010 000 001 000 101 %1 010 000 001 000 101 %001 010 000 001 000 101 - 1 2 0 1 0 5 --> 0120105-+ 1 2 0 1 0 5 --> 0120105+So: %1010000001000101 = 0120105 = 0xA045 = 41029 Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029(10) - Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029-At first while adding numbers, you'll convert them to their decimal + Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029
At first while adding numbers, you'll convert them to their decimal form and then back into their original form after doing the addition. If you use the other numbering system often, you will see that you'll be able to do arithmetics in the base that is used. In any representation it is the same, add the numbers on the right, write down the rightmost digit from the result, remember the other digits and use them in the next round. Continue with the second digits -from the right and so on:
-- %1010 + %0111 --> 10 + 7 --> 17 --> %00010001-
will become
-+from the right and so on: +++ %1010 + %0111 --> 10 + 7 --> 17 --> %00010001+will become
+%1010 %0111 + |||| @@ -316,30 +319,32 @@ +----- add 1 + 0 + 1(remembered), result = 0, remember 1 nothing to add, 1 remembered, result = 1 -------- - %10001 is the result, I like to write it as %00010001-For low values, try to do the calculations yourself, check them with + %10001 is the result, I like to write it as %00010001
For low values, try to do the calculations yourself, check them with a calculator. The more you do the calculations yourself, the more you find that you didn't make mistakes. In the end, you'll do calculi in -other bases as easy as you do in decimal.
-When the numbers get bigger, you'll have to realize that a computer is +other bases as easy as you do in decimal.
+When the numbers get bigger, you'll have to realize that a computer is not called a computer just to have a nice name. There are many different calculators available. Use them. For Unix you could use ``bc'' which is called so as it is short for Binary Calculator. It calculates not only -in decimal, but in all bases you'll ever use (among them Binary).
-For people on Windows: +in decimal, but in all bases you'll ever use (among them Binary).
+For people on Windows: Start the calculator (start->programs->accessories->calculator) and if necessary click view->scientific. You now have a scientific -calculator and can compute in binary or hexadecimal.
--
I hope you enjoyed the examples and their descriptions. If you do, help +calculator and can compute in binary or hexadecimal.
++
+I hope you enjoyed the examples and their descriptions. If you do, help other people by pointing them to this document when they are asking basic questions. They will not only get their answer but at the same -time learn a whole lot more.
-Alex van den Bogaerdt -<alex at ergens.op.het.net>
+time learn a whole lot more. +Alex van den Bogaerdt +<alex at ergens.op.het.net> +
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdcreate.pod ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdcreate.pod (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdcreate.pod 2003-02-20 15:24:00.000000000 -0800 @@ -76,7 +76,7 @@ will store the derivative of the line going from the last to the current value of the data source. This can be useful for gauges, for example, to measure the rate of people entering or leaving a -room. Internally, derive works exaclty like COUNTER but without +room. Internally, derive works exactly like COUNTER but without overflow checks. So if your counter does not reset at 32 or 64 bit you might want to use DERIVE and combine it with a MIN value of 0. Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdupdate.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdupdate.html (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdupdate.html 2003-02-20 15:24:00.000000000 -0800 @@ -1,90 +1,108 @@ - - --
rrdtool update - Store a new set of values into the rrd
--
rrdtool update filename -[--template|-t ds-name[:ds-name]...] -N|timestamp:value[:value...] -[timestamp:value[:value...] ...]
--
The update function feeds new data values into an RRD. The -data gets time aligned according to the properties of the RRD to -which the data is written.
-+
+rrdtool update - Store a new set of values into the rrd
++
+rrdtool update filename +[--template|-t ds-name[:ds-name]...] +N|timestamp:value[:value...] +[timestamp:value[:value...] ...]
++
+The update function feeds new data values into an RRD. The +data gets time aligned according to the properties of the RRD to +which the data is written.
+The template switch allows you to specify which data sources you are +
The template switch allows you to specify which data sources you are going to update and in which order. If the data sources specified in the template are not available in the rrd file, the update process -will abort with an error message.
- -The remaining elements of the argument are DS updates. The order of this list is +important when you are working with data-sources of type COUNTER, +DERIVE or ABSOLUTE. +
The remaining elements of the argument are DS updates. The order of this list is the same as the order the data sources were defined in the rra. If there is no data for a certain data-source, the letter -U (eg. N:0.1:U:1) can be defined.
-The format of the value acquired from the data source is dependent of the +U (eg. N:0.1:U:1) can be defined.
+The format of the value acquired from the data source is dependent of the data source type chosen. Normally it will be numeric, but the data acquisition modules may impose their very own parsing of this parameter as long as the colon -(:) remains the data source value separator.
--
rrdtool update demo1.rrd N:3.44:3.15:U:23
Update the database file demo1.rrd with 3 known and one *UNKNOWN* -value. Use the current time as the update time.
-rrdtool update demo2.rrd 887457267:U 887457521:22 88745790:2.7
Update the database file demo2.rrd which expects data from a single -data-source, three times. First with an *UNKNOWN* value then with two -normal readings. The update interval seems to be around 300 seconds.
--
Tobias Oetiker <oetiker at ee.ethz.ch>
+(:) remains the data source value separator. ++
+rrdtool update demo1.rrd N:3.44:3.15:U:23
Update the database file demo1.rrd with 3 known and one *UNKNOWN* +value. Use the current time as the update time.
+rrdtool update demo2.rrd 887457267:U 887457521:22 88745790:2.7
Update the database file demo2.rrd which expects data from a single +data-source, three times. First with an *UNKNOWN* value then with two +normal readings. The update interval seems to be around 300 seconds.
++
+Tobias Oetiker <oetiker at ee.ethz.ch>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.es.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.es.txt (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.es.txt 2003-02-20 15:24:00.000000000 -0800 @@ -2,11 +2,11 @@ -NNNNAAAAMMMMEEEE +NNAAMMEE rrdtutorial - Tutorial sobre RRDtool por Alex van den Bogaerdt (Traducido al castellano por Jes'us Couto Fandi~no) -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN //// DDDDEEEESSSSCCCCRRRRIIIIPPPPCCCCIIII''OO''OONNNN +DDEESSCCRRIIPPTTIIOONN RRDtool es un programa escrito por Tobias Oetiker con la colaboraci'on de muchas personas en diversas partes del mundo. Alex van den Bogaerdt escribi'o este documento para @@ -20,15 +20,15 @@ explica algunas ideas generales sobre estad'istica, con un enfoque particular hacia las redes. -TTTTUUUUTTTTOOOORRRRIIIIAAAALLLL - IIIImmmmppppoooorrrrttttaaaannnntttteeee +TTUUTTOORRIIAALL + IImmppoorrttaannttee ,iPor favor, no te adelantes en la lectura de este docu- mento! Esta primera parte explica los fundamentos b'asicos. Puede ser aburrida, pero si te saltas los fundamentos, los ejemplos no te van a tener mucho sentido. - ''cc''ccQQQQuuuu''ee''ee eeeessss RRRRRRRRDDDDttttoooooooollll???? + ''ccQQuu''ee eess RRRRDDttooooll?? RRDtool significa "herramienta de bases de datos en round robin". "Round robin" es una t'ecnica que implica un @@ -48,7 +48,7 @@ con estas bases de datos en "round-robin", guardando y recuperando datos de ellas. - ''cc''ccQQQQuuuu''ee''ee ddddaaaattttoooossss ppppuuuueeeeddddeeeennnn gggguuuuaaaarrrrddddaaaarrrrsssseeee eeeennnn uuuunnnnaaaa RRRRRRRRDDDD???? + ''ccQQuu''ee ddaattooss ppuueeddeenn gguuaarrddaarrssee eenn uunnaa RRRRDD?? Lo que se te ocurra. Debes poder medir alg'un valor dado en distintos momentos en el tiempo y proveer a RRDtool de @@ -68,7 +68,7 @@ mantienen. Son estos valores de estos contadores los que vamos a almacenar en la RRD. - ''cc''ccQQQQuuuu''ee''ee ppppuuuueeeeddddoooo hhhhaaaacccceeeerrrr ccccoooonnnn eeeessssttttaaaa hhhheeeerrrrrrrraaaammmmiiiieeeennnnttttaaaa???? + ''ccQQuu''ee ppuueeddoo hhaacceerr ccoonn eessttaa hheerrrraammiieennttaa?? RRDtool se deriva de MRTG (Multi Router Traffic Grapher, Graficador De Tr'afico de M'ultiples Enrutadores). MRTG @@ -95,7 +95,7 @@ medir los datos y seas capaz de pasarle los n'umeros a RRD- tool. - ''cc''ccYYYY ssssiiii aaaa''uu''uunnnn tttteeeennnnggggoooo pppprrrroooobbbblllleeeemmmmaaaassss ddddeeeessssppppuuuu''ee''eessss ddddeeee lllleeeeeeeerrrr eeeesssstttteeee ddddooooccccuuuummmmeeeennnnttttoooo???? + ''ccYY ssii aa''uunn tteennggoo pprroobblleemmaass ddeessppuu''eess ddee lleeeerr eessttee ddooccuummeennttoo?? Lo primero, ,il'eelo otra vez!. Puede que te hayas perdido de algo. Si no puedes compilar el c'odigo fuente y usas un @@ -116,12 +116,12 @@ con RRDtool para ver donde est'a el archivo y como usarlo. Te sugiero que te tomes un momento y te subscribas a la - lista ahora mismo, enviando un mensaje a rrd-users- - request at list.ee.ethz.ch con t'itulo "subscribe". Si even- - tualmente deseas salirte de la lista, env'ia otro correo a - la misma direcci'on, con t'itulo "unsubscribe". + lista ahora mismo, enviando un mensaje a + rrd-users-request at list.ee.ethz.ch con t'itulo "subscribe". + Si eventualmente deseas salirte de la lista, env'ia otro + correo a la misma direcci'on, con t'itulo "unsubscribe". - ''cc''ccCCCC''oo''oommmmoooo mmmmeeee vvvvaaaassss aaaa aaaayyyyuuuuddddaaaarrrr???? + ''ccCC''oommoo mmee vvaass aa aayyuuddaarr?? D'andote descripciones y ejemplos detallados. Asumimos que el seguir las instrucciones en el orden en que se presen- @@ -135,7 +135,7 @@ Necesitar'as saber algo sobre n'umeros hexadecimales. Si no, empieza por leer "bin_dec_hex" antes de continuar. - TTTTuuuu pppprrrriiiimmmmeeeerrrraaaa bbbbaaaasssseeee ddddeeee ddddaaaattttoooossss eeeennnn rrrroooouuuunnnndddd----rrrroooobbbbiiiinnnn + TTuu pprriimmeerraa bbaassee ddee ddaattooss eenn rroouunndd--rroobbiinn En mi opini'on, la mejor forma de aprender algo es haci'endolo. 'cPor qu'e no empezamos ya? Vamos a crear una @@ -241,7 +241,7 @@ (o sea, escribe: "rrdtool create test.rrd --start 920804400 DS ...") - ''cc''ccQQQQuuuu''ee''ee hhhheeeemmmmoooossss ccccrrrreeeeaaaaddddoooo???? + ''ccQQuu''ee hheemmooss ccrreeaaddoo?? Hemos creado una base de datos en round robin llamada test (test.rrd), que empieza desde el mediod'ia del d'ia en que @@ -357,7 +357,7 @@ Lo que representa exactamente esta salida lo vamos m'as adelante en el tutorial. - HHHHoooorrrraaaa ddddeeee hhhhaaaacccceeeerrrr aaaallllgggguuuunnnnoooossss ggggrrrr''aa''aaffffiiiiccccoooossss + HHoorraa ddee hhaacceerr aallgguunnooss ggrr''aaffiiccooss Prueba este comando: @@ -397,7 +397,7 @@ mostrar'an usando la URL ``file://el/camino/de/directo- rios/hasta/speed.gif'' - GGGGrrrr''aa''aaffffiiiiccccoooossss ccccoooonnnn uuuunnnn ppppooooccccoooo ddddeeee mmmmaaaatttteeeemmmm''aa''aattttiiiiccccaaaa + GGrr''aaffiiccooss ccoonn uunn ppooccoo ddee mmaatteemm''aattiiccaa Cuando veas la imagen, notar'as que el eje horizontal tiene unas etiquetas marcando las 12:10, 12:20, 12:30, 12:40 y @@ -488,8 +488,7 @@ Verifica si la velocidad en kmh es mayor que 100 ( kmh,100 ) GT Si es as'i, retorna la velocidad, si no, retorna 0 ((( kmh,100) GT ), kmh, 0) IF - - MMMMaaaaggggiiiiaaaa ggggrrrr''aa''aaffffiiiiccccaaaa + MMaaggiiaa ggrr''aaffiiccaa Me gusta creer que virtualmente no hay limites para lo que RRDtool puede hacer con los datos. No voy a explicarlo en @@ -531,7 +530,7 @@ taras darle al bot'on mientras presionas la tecla de may'usculas. - AAAAccccttttuuuuaaaalllliiiizzzzaaaacccciiiioooonnnneeeessss ddddeeee vvvveeeerrrrddddaaaadddd + AAccttuuaalliizzaacciioonneess ddee vveerrddaadd Ya hemos usado el comando ``update''; vimos que recibia uno o m'as par'ametros en el formato: ``-
rrdtool fetch - fetch data from an rrd.
--
rrdtool fetch filename CF -[--resolution|-r resolution] -[--start|-s start] -[--end|-e end]
--
The fetch function is normally used internally by the graph function, -to get data from RRDs. fetch will analyze the RRD and +
+
+rrdtool fetch - fetch data from an rrd.
++
+rrdtool fetch filename CF +[--resolution|-r resolution] +[--start|-s start] +[--end|-e end]
++
+The fetch function is normally used internally by the graph function, +to get data from RRDs. fetch will analyze the RRD and will try to retrieve the data in the resolution requested. -The data fetched is printed to stdout. *UNKNOWN* data is often +The data fetched is printed to stdout. *UNKNOWN* data is often represented by the string ``NaN'' depending on your OSs printf -function.
--
In order to get rrdtool to fetch anything other than the finest resolution RRA -both the start and end time must be specified on boundaries that are -multiples of the wanted resolution. Consider the following example:
-+
+
+In order to get rrdtool to fetch anything other than the finest resolution RRA +both the start and end time must be specified on boundaries that are +multiples of the wanted resolution. Consider the following example:
+rrdtool create subdata.rrd -s 10 DS:ds0:GAUGE:300:0:U \ RRA:AVERAGE:0.5:30:3600 \ RRA:AVERAGE:0.5:90:1200 \ RRA:AVERAGE:0.5:360:1200 \ RRA:MAX:0.5:360:1200 \ RRA:AVERAGE:0.5:8640:600 \ - RRA:MAX:0.5:8640:600-
This RRD collects data every 10 seconds and stores its averages over 5 minutes, -15 minutes, 1 hour and 1 day as well as the maxima for 1 hour and 1 day.
-Consider now that you want too fetch the 15 minute average data for last hour. -So you might try
-- rrdtool fetch subdata.rrd AVERAGE -r 900 -s -1h-
However, this will almost always result in a time series that is NOT in the 15 + RRA:MAX:0.5:8640:600 +
This RRD collects data every 10 seconds and stores its averages over 5 minutes, +15 minutes, 1 hour and 1 day as well as the maxima for 1 hour and 1 day.
+Consider now that you want too fetch the 15 minute average data for last hour. +So you might try
++ rrdtool fetch subdata.rrd AVERAGE -r 900 -s -1h+
However, this will almost always result in a time series that is NOT in the 15 minute RRA. Therefore the highest resolution RRA, i.e. 5 minute averages, will -be chosen which, in this case, is not what you want.
-Hence, make sure that
-Hence, make sure that
+So, if time now is called ``t'',
-+
So, if time now is called ``t'',
+do end time == int(t/900)*900, - start time == end time -1hour, resolution == 900.-
In e.g. bash this could look as:
-+ start time == end time -1hour, resolution == 900.+
In e.g. bash this could look as:
+TIME=$(date +%s); RRDRES=900; rrdtool fetch subdata.rrd AVERAGE -r $RRDRES \ - -e $(echo $(($TIME/$RRDRES*$RRDRES))) -s e-1h-
Or in perl:
-+ -e $(echo $(($TIME/$RRDRES*$RRDRES))) -s e-1h+
Or in perl:
+
perl -e '$ctime = time; $rrdres = 900; system "rrdtool fetch subdata.rrd AVERAGE \
- -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"'
--
Apart from the traditional Seconds since epoch, rrdtool does also + -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"' +
+
+Apart from the traditional Seconds since epoch, rrdtool does also
understand at-style time specification. The specification is called
-``at-style'' after Unix command at(1) that has moderately complex ways
+``at-style'' after Unix command at(1) that has moderately complex ways
to specify time to run your job at. The at-style specification
-consists of two parts: TIME REFERENCE specification and TIME
-OFFSET specification.
-
Time reference specification is used, well,... to establish a reference +consists of two parts: TIME REFERENCE specification and TIME +OFFSET specification.
++
+Time reference specification is used, well,... to establish a reference moment in time (for time offset to be applied to). When present, -it should come first, when omitted, it defaults to now. On its own part, -time reference consists of time-of-day reference (which should come -first, if present) and day reference.
-Time-of-day can be specified as HH:MM, HH.MM, -or just HH, you can suffix it with am or pm or use +it should come first, when omitted, it defaults to now. On its own part, +time reference consists of time-of-day reference (which should come +first, if present) and day reference.
+Time-of-day can be specified as HH:MM, HH.MM, +or just HH, you can suffix it with am or pm or use 24-hours clock. The few special times of day are understood as well, -these include midnight (00:00), noon (12:00) and British -teatime (16:00).
-The day can be specified as month-name day-of-the-month -and optional 2- or 4-digit year number (e.g. March 8 1999). -Alternatively, you can use day-of-week-name (e.g. Monday), -or one of the words: yesterday, today, tomorrow. -You can also specify day as a full date in several numerical formats; -these include: MM/DD/[YY]YY, DD.MM.[YY]YY, YYYYMMDD.
-NOTE1: this is different from the original at(1) behavior,
-which interprets a single-number date as MMDD[YY]YY.
NOTE2: if you specify day this way, the time-of-day is REQUIRED -to be present.
-Finally, you can use words now, start, or end as your time -reference. Now refers to the current moment (and is also a default -time reference). Start (end) can be used to specify time +these include midnight (00:00), noon (12:00) and British +teatime (16:00).
+The day can be specified as month-name day-of-the-month +and optional 2- or 4-digit year number (e.g. March 8 1999). +Alternatively, you can use day-of-week-name (e.g. Monday), +or one of the words: yesterday, today, tomorrow. +You can also specify day as a full date in several numerical formats; +these include: MM/DD/[YY]YY, DD.MM.[YY]YY, YYYYMMDD.
+NOTE1: this is different from the original at(1) behavior,
+which interprets a single-number date as MMDD[YY]YY.
NOTE2: if you specify day this way, the time-of-day is REQUIRED +to be present.
+Finally, you can use words now, start, or end as your time +reference. Now refers to the current moment (and is also a default +time reference). Start (end) can be used to specify time relative to the start (end) time for those tools that use these -categories (rrdfetch, rrdgraph).
-Month and weekday names can be used in their naturally abbreviated form -(e.g., Dec for December, Sun for Sunday, etc.). The words now, -start, end can be abbreviated to n, s, e.
--
Time offset specification is used to add (or subtract) certain time -interval to (from) the time reference moment. It consists of sign -(+ or -) and amount. The following time units can be used -to specify the amount: years, months, weeks, days, -hours, minutes, seconds, these can be used in singular +categories (rrdfetch, rrdgraph).
+Month and weekday names can be used in their naturally abbreviated form +(e.g., Dec for December, Sun for Sunday, etc.). The words now, +start, end can be abbreviated to n, s, e.
++
+Time offset specification is used to add (or subtract) certain time +interval to (from) the time reference moment. It consists of sign +(+ or -) and amount. The following time units can be used +to specify the amount: years, months, weeks, days, +hours, minutes, seconds, these can be used in singular or plural form, and abbreviated naturally or to a single letter (e.g. +3days, -1wk, -3y). Several time units can be combined together (e.g., -5mon1w2d), as well as several time offsets can be -concatenated (e.g., -5h45min = -5h-45min = -6h+15min = -7h+1h30m-15min, etc.)
-NOTE3: If you specify time offset in days, weeks, months, or years, +concatenated (e.g., -5h45min = -5h-45min = -6h+15min = -7h+1h30m-15min, etc.)
+NOTE3: If you specify time offset in days, weeks, months, or years,
you will end with the time offset that may vary depending on you time
reference, because all those time units have no single well defined
time interval value (1 year contains either 365 or 366 days, 1 month
@@ -177,10 +195,10 @@
To cope with this, when you use days, weeks, months, or years
as your time offset units your time reference date is adjusted
accordingly without taking too much further effort to ensure anything
-about it (in the hope that mktime(3) will take care of this later).
+about it (in the hope that mktime(3) will take care of this later).
This may lead to some surprising (or even invalid!) results,
e.g. 'May 31 -1month' = 'Apr 31' (meaningless) = 'May 1'
-(after mktime(3) normalization); in the EET timezone
+(after mktime(3) normalization); in the EET timezone
'3:30am Mar 29 1999 -1 day' yields '3:30am Mar 28 1999' (Sunday)
which is invalid time/date combination (because of 3am -> 4am DST
forward clock adjustment, see the below example).
@@ -190,54 +208,56 @@
'8:00 Mar 29 1999', but since there is 1-hour DST forward clock adjustment
takes place around 3:00 Mar 28 1999, the actual time interval between
8:00 Mar 27 1999 and 8:00 Mar 29 1999 equals 47 hours; on the other hand,
-'8:00 Mar 27 1999 +48 hours' = '9:00 Mar 29 1999', as expected)
NOTE4: The single-letter abbreviation for both months and minutes -is m. To disambiguate, the parser tries to read your mind :) -by applying the following two heuristics:
-NOTE4: The single-letter abbreviation for both months and minutes +is m. To disambiguate, the parser tries to read your mind :) +by applying the following two heuristics:
+Final NOTES: Time specification is case-insensitive. +
Final NOTES: Time specification is case-insensitive. Whitespace can be inserted freely or omitted altogether, there are, however, cases when whitespace is required (e.g., 'midnight Thu'). In this case you should either quote the whole phrase to prevent it from being taken apart by your shell or use '_' (underscore) or ',' (comma) which also count as whitespace -(e.g., midnight_Thu or midnight,Thu)
--
Oct 12 -- October 12 this year
--1month or -1m -- current time of day, only a month before -(may yield surprises, see the NOTE3 above)
-noon yesterday -3hours -- yesterday morning; can be put also as 9am-1day
-23:59 31.12.1999 -- 1 minute to the year 2000
-12/31/99 11:59pm -- 1 minute to the year 2000 for imperialists
-12am 01/01/01 -- start of the new millennium
-end-3weeks or e-3w -- 3 weeks before end time -(may be used as start time specification)
-start+6hours or s+6h -- 6 hours after start time -(may be used as end time specification)
-931225537 -- 18:45 July 5th, 1999 -(yes, seconds since 1970 are valid as well)
-19970703 12:45 -- 12:45 July 3th, 1997 -(not quote standard, but I love this ...)
--
Tobias Oetiker <oetiker at ee.ethz.ch>
+(e.g., midnight_Thu or midnight,Thu) ++
+Oct 12 -- October 12 this year
+-1month or -1m -- current time of day, only a month before +(may yield surprises, see the NOTE3 above)
+noon yesterday -3hours -- yesterday morning; can be put also as 9am-1day
+23:59 31.12.1999 -- 1 minute to the year 2000
+12/31/99 11:59pm -- 1 minute to the year 2000 for imperialists
+12am 01/01/01 -- start of the new millennium
+end-3weeks or e-3w -- 3 weeks before end time +(may be used as start time specification)
+start+6hours or s+6h -- 6 hours after start time +(may be used as end time specification)
+931225537 -- 18:45 July 5th, 1999 +(yes, seconds since 1970 are valid as well)
+19970703 12:45 -- 12:45 July 3th, 1997 +(not quote standard, but I love this ...)
++
+Tobias Oetiker <oetiker at ee.ethz.ch>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/bin_dec_hex.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/bin_dec_hex.txt (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/bin_dec_hex.txt 2003-02-20 15:24:01.000000000 -0800 @@ -2,10 +2,10 @@ -NNNNAAAAMMMMEEEE +NNAAMMEE Binary Decimal Hexadecimal - How does it work -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN +DDEESSCCRRIIPPTTIIOONN Most people use the decimal numbering system. This system uses ten symbols to represent numbers. When those ten sym- bols are used up, they start all over again and increment @@ -74,7 +74,7 @@ the decimal system. If we are talking about another num- bering system, we'll have to make that clear. There are a few wide-spread methods to do so. One common form is to - write _1_0_1_0(2) which means that you wrote down a number in + write 1010(2) which means that you wrote down a number in the binary form. It is the number ten. If you would write 1010 it means the number one thousand and ten. @@ -94,7 +94,7 @@ We can use the binary form when talking to computers (...programming...) but the numbers will have large rep- resentations. The number 65535 would be written down as - _1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1(2) which is 16 times the digit 1. This + 1111111111111111(2) which is 16 times the digit 1. This is difficult and prone to errors. Therefore we normally would use another base, called hexadecimal. It uses 16 different symbols. First the symbols from the decimal sys- @@ -400,7 +400,7 @@ view->scientific. You now have a scientific calculator and can compute in binary or hexadecimal. -AAAAUUUUTTTTHHHHOOOORRRR +AAUUTTHHOORR I hope you enjoyed the examples and their descriptions. If you do, help other people by pointing them to this docu- ment when they are asking basic questions. They will not @@ -411,4 +411,4 @@ -2002-02-26 1.0.40 BIN_DEC_HEX(1) +1.0.41 2002-02-26 BIN_DEC_HEX(1) Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdinfo.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdinfo.html (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdinfo.html 2003-02-20 15:24:01.000000000 -0800 @@ -1,50 +1,55 @@ - - --
rrdtool info - extract header information from an rrd
--
rrdtool info filename.rrd
--
The info function prints the header information from an rrd in -a parsing friendly format.
-Check the rrdcreate manpage if you are uncertain about the meaning of the -individual keys.
--
This is the output generated by running info on a simple rrd which +
+
+rrdtool info - extract header information from an rrd
++
+rrdtool info filename.rrd
++
+The info function prints the header information from an rrd in +a parsing friendly format.
+Check the rrdcreate manpage if you are uncertain about the meaning of the +individual keys.
++
+This is the output generated by running info on a simple rrd which contains two datasources and one rra. Note that the number after the -last_update keyword is in seconds since 1970. The string NaN -stands for *UNKNOWN* data. In the example it means that this rrd +last_update keyword is in seconds since 1970. The string NaN +stands for *UNKNOWN* data. In the example it means that this rrd has neither minimum not maximum values defined for either of its -datasources.
-+datasources. +filename = "randome.rrd" rrd_version = "0001" step = 300 @@ -68,17 +73,20 @@ rra[0].cdp_prep[0].value = nan rra[0].cdp_prep[0].unknown_datapoints = 0 rra[0].cdp_prep[1].value = nan - rra[0].cdp_prep[1].unknown_datapoints = 0-
-
Tobias Oetiker <oetiker at ee.ethz.ch>
+ rra[0].cdp_prep[1].unknown_datapoints = 0 ++
+Tobias Oetiker <oetiker at ee.ethz.ch>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/RRDp.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/RRDp.html (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/RRDp.html 2003-02-20 15:24:01.000000000 -0800 @@ -1,90 +1,109 @@ - - --
RRDp - Attach rrdtool from within a perl script via a set of pipes;
--
use RRDp
-RRDp::start path to rrdtool executable
-RRDp::cmd rrdtool commandline
-$answer = RRD::read
-$status = RRD::end
-$RRDp::user, $RRDp::sys, $RRDp::real
--
With this module you can safely communicate with the rrdtool.
-After every RRDp::cmd you have to issue an RRDp::read command to get -rrdtools answer to your command. The answer is returned as a pointer, +
+
+RRDp - Attach rrdtool from within a perl script via a set of pipes;
++
+use RRDp
+RRDp::start path to rrdtool executable
+RRDp::cmd rrdtool commandline
+$answer = RRD::read
+$status = RRD::end
+$RRDp::user, $RRDp::sys, $RRDp::real
++
+With this module you can safely communicate with the rrdtool.
+After every RRDp::cmd you have to issue an RRDp::read command to get +rrdtools answer to your command. The answer is returned as a pointer, in order to speed things up. If the last command did not return any -data, RRDp::read will return an undefined variable.
-If you import the PERFORMANCE variables into your namespace, -you can access rrdtools internal performance measurements.
-If you import the PERFORMANCE variables into your namespace, +you can access rrdtools internal performance measurements.
+The difference between user + system and real is the time spent +
The difference between user + system and real is the time spent waiting for things like the hard disk and new input from the perl -script.
--
+script. +
+
+
use RRDp;
RRDp::start "/usr/local/bin/rrdtool";
RRDp::cmd qw(create demo.rrd --step 100
@@ -92,16 +111,18 @@
RRA:AVERAGE:0.5:1:10);
$answer = RRDp::read;
print $$answer;
- ($usertime,$systemtime,$realtime) = ($RRDp::user,$RRDp::sys,$RRDp::real);
--
For more information on how to use rrdtool, check the manpages.
--
Tobias Oetiker <oetiker at ee.ethz.ch>
+ ($usertime,$systemtime,$realtime) = ($RRDp::user,$RRDp::sys,$RRDp::real); ++
+For more information on how to use rrdtool, check the manpages.
++
+Tobias Oetiker <oetiker at ee.ethz.ch>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdgraph.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.html (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdgraph.html 2003-02-20 15:24:01.000000000 -0800 @@ -1,167 +1,219 @@ - - --
rrdtool graph - Create a graph based on data from one or several RRD
--
rrdtool graph filename -[-s|--start seconds] -[-e|--end seconds] -[-x|--x-grid x-axis grid and label] -[-y|--y-grid y-axis grid and label] -[--alt-y-grid] -[--alt-y-mrtg] -[--alt-autoscale] -[--alt-autoscale-max] -[--units-exponent] value]> -[-v|--vertical-label text] -[-w|--width pixels] -[-h|--height pixels] -[-i|--interlaced] -[-f|--imginfo formatstring] -[-a|--imgformat GIF|PNG|GD] -[-B|--background value] -[-O|--overlay value] -[-U|--unit value] -[-z|--lazy] -[-o|--logarithmic] -[-u|--upper-limit value] -[-l|--lower-limit value] -[-g|--no-legend] -[-r|--rigid] -[--step value] -[-b|--base value] -[-c|--color COLORTAG#rrggbb] -[-t|--title title] -[DEF:vname=rrd:ds-name:CF] -[CDEF:vname=rpn-expression] -[PRINT:vname:CF:format] -[GPRINT:vname:CF:format] -[COMMENT:text] -[HRULE:value#rrggbb[:legend]] -[VRULE:time#rrggbb[:legend]] -[LINE{1|2|3}:vname[#rrggbb[:legend]]] -[AREA:vname[#rrggbb[:legend]]] -[STACK:vname[#rrggbb[:legend]]]
--
The graph functions main purpose is to create graphical -representations of the data stored in one or several RRDs. Apart -from generating graphs, it can also extract numerical reports.
-+
+rrdtool graph - Create a graph based on data from one or several RRD
++
+rrdtool graph filename +[-s|--start seconds] +[-e|--end seconds] +[-x|--x-grid x-axis grid and label] +[-y|--y-grid y-axis grid and label] +[-Y|--alt-y-grid] +[-R|--alt-y-mrtg] +[-A|--alt-autoscale] +[-M|--alt-autoscale-max] +[-N|--no-minor] +[-X|--units-exponent] value]> +[-v|--vertical-label text] +[-w|--width pixels] +[-h|--height pixels] +[-i|--interlaced] +[-f|--imginfo formatstring] +[-a|--imgformat GIF|PNG|GD] +[-B|--background value] +[-O|--overlay value] +[-U|--unit value] +[-z|--lazy] +[-o|--logarithmic] +[-u|--upper-limit value] +[-l|--lower-limit value] +[-g|--no-legend] +[-r|--rigid] +[-S|--step value] +[-b|--base value] +[-c|--color COLORTAG#rrggbb] +[-t|--title title] +[DEF:vname=rrd:ds-name:CF] +[CDEF:vname=rpn-expression] +[PRINT:vname:CF:format] +[GPRINT:vname:CF:format] +[COMMENT:text] +[HRULE:value#rrggbb[:legend]] +[VRULE:time#rrggbb[:legend]] +[LINE{1|2|3}:vname[#rrggbb[:legend]]] +[AREA:vname[#rrggbb[:legend]]] +[STACK:vname[#rrggbb[:legend]]]
++
+The graph functions main purpose is to create graphical +representations of the data stored in one or several RRDs. Apart +from generating graphs, it can also extract numerical reports.
+PNG output is recommended, since it takes up to 40% less disk space -and 20-30% less time to generate than a GIF file.
-If no graph functions are called, the graph will not be created.
- -PNG output is recommended, since it takes up to 40% less disk space +and 20-30% less time to generate than a GIF file.
+If no graph functions are called, the graph will not be created.
+If you want no x-grid at all, use the magic setting none.
-The x-axis label and grid can be configured, using the following format:
-GTM:GST:MTM:MST:LTM:LST:LPR:LFM
-You have to configure three elements making up the x-axis labels and -grid. The base grid (G??), the major grid (M??) and the labels -(L??). The configuration is based on the idea that you first -specify a well known amount of time (?TM) and then say how many -times it has to pass between each grid line or label (?ST). For the +
If you want no x-grid at all, use the magic setting none.
+The x-axis label and grid can be configured, using the following format:
+GTM:GST:MTM:MST:LTM:LST:LPR:LFM
+You have to configure three elements making up the x-axis labels and +grid. The base grid (G??), the major grid (M??) and the labels +(L??). The configuration is based on the idea that you first +specify a well known amount of time (?TM) and then say how many +times it has to pass between each grid line or label (?ST). For the label you have to define two additional items: The precision of the -label in seconds (LPR) and the strftime format used to generate the -text of the label (LFM).
-The ?TM elements must be one of the following keywords: SECOND, -MINUTE, HOUR, DAY, WEEK, MONTH or YEAR.
-If you wanted a graph with a base grid every 10 minutes and a major +label in seconds (LPR) and the strftime format used to generate the +text of the label (LFM).
+The ?TM elements must be one of the following keywords: SECOND, +MINUTE, HOUR, DAY, WEEK, MONTH or YEAR.
+If you wanted a graph with a base grid every 10 minutes and a major one every hour, with labels every hour you would use the following -x-axis definition.
-MINUTE:10:HOUR:1:HOUR:1:0:%X
The precision in this example is 0 because the %X format is exact. If +x-axis definition.
+MINUTE:10:HOUR:1:HOUR:1:0:%X
The precision in this example is 0 because the %X format is exact. If the label was the name of the day, we would have had a precision of 24 hours, because when you say something like 'Monday' you mean the whole day and not Monday morning 00:00. Thus the label should be positioned at noon. By defining a precision of 24 hours or rather 86400 seconds, -you make sure that this happens.
-If you want to alter the genertated text to another language, use the +you make sure that this happens.
+If you want to alter the genertated text to another language, use the LC_TIME environment variable to set the locale you prefere prior to calling -the graph function.
- -If you want no y-grid at all set specify the magic word none.
- -If you want no y-grid at all set specify the magic word none.
+- --imginfo '<IMG SRC="/img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">'- -
+ --imginfo '<IMG SRC="/img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">'+
If you want to define an upper-limit which will not move in any -event you have to set the --rigid option as well.
- -If you want to define an upper-limit which will not move in any +event you have to set the --rigid option as well.
+If this is all a big load of incomprehensible words for you, maybe an +
If this is all a big load of incomprehensible words for you, maybe an
example helps (a more complete explanation is given in [1]): The
-expression vname+3/2 becomes vname,3,2,/,+ in RPN. First the three
+expression vname+3/2 becomes vname,3,2,/,+ in RPN. First the three
values get pushed onto the stack (which now contains (the current
value of) vname, a 3 and a 2). Then the / operator pops two values
from the stack (3 and 2), divides the first argument by the second
@@ -336,228 +440,302 @@
operator pops two values (vname and 1.5) from the stack; both values
are added up and the result gets pushes back onto the stack. In the
end there is only one value left on the stack: The result of the
-expression.
The rpn-expression in the CDEF function takes both, constant values -as well as vname variables. The following operators can be used on these -values:
-The rpn-expression in the CDEF function takes both, constant values +as well as vname variables. The following operators can be used on these +values:
+If the stack contains the values A, B, C, D, E are presently on the +
If the stack contains the values A, B, C, D, E are presently on the stack, the IF operator will pop the values E D and C of the stack. It will look at C and if it is not 0 it will push D back onto the stack, otherwise -E will be sent back to the stack.
- -- CDEF:a=alpha,0,100,LIMIT- -
+ CDEF:a=alpha,0,100,LIMIT+
PREV(vname)PREV(vname)Note that the timezone offset is always calculated for the time the +
Note that the timezone offset is always calculated for the time the current sample was taken at. It has nuthing todo with the time you are -doing the calculation.
-Please note that you may only use vname variables that you -previously defined by either DEF or CDEF. Furthermore, as of -this writing (version 0.99.25), you must use at least one vname +doing the calculation.
+Please note that you may only use vname variables that you +previously defined by either DEF or CDEF. Furthermore, as of +this writing (version 0.99.25), you must use at least one vname per expression, that is ``CDEF:fourtytwo=2,40,+'' will yield an error -message but not a vname fourtytwo that's always equal to 42.
-printf the result to stdout using format.
-In the format string there should be a '%lf' or '%le' marker in the
+message but not a vname fourtytwo that's always equal to 42.
+printf the result to stdout using format.
+In the format string there should be a '%lf'or '%le' marker in the
place where the number should be printed.
-If an additional '%s' is found AFTER the marker, the value will be scaled +
If an additional '%s' is found AFTER the marker, the value will be scaled and an appropriate SI magnitude unit will be printed in place of the '%s' -marker. The scaling will take the '--base' argument into consideration!
-If a '%S' is used instead of a '%s', then instead of calculating the +marker. The scaling will take the '--base' argument into consideration!
+If a '%S' is used instead of a '%s', then instead of calculating the appropriate SI magnitude unit for this value, the previously calculated SI magnitude unit will be used. This is useful if you want all the values in a PRINT statement to have the same SI magnitude unit. If there was no previous SI magnitude calculation made, then '%S' behaves like a '%s', unless the value is 0, in which case it does not remember a SI magnitude unit and a SI magnitude unit will only be calculated when the next '%s' is -seen or the next '%S' for a non-zero value.
-If you want to put a '%' into your PRINT string, use '%%' instead.
- -Caveat: When using the PRINT and GRPRINT functions to +seen or the next '%S' for a non-zero value.
+ +If you want to put a '%' into your PRINT string, use '%%' instead.
+Caveat: When using the PRINT and GRPRINT functions to calculate data summaries over time periods bounded by the current time, it is important to note that the last sample will almost always yield a value of UNKNOWN as it lies after the last update time. This -can result in slight data skewing, particularly with the AVERAGE +can result in slight data skewing, particularly with the AVERAGE function. In order to avoid this, make sure that your end time is at -least one heartbeat prior to the current time.
-Note, that when you STACK onto *UNKNOWN* data, rrdtool will not draw +
Note, that when you STACK onto *UNKNOWN* data, rrdtool will not draw any graphics ... *UNKNOWN* is not zero ... if you want it to zero then you might want to use a CDEF argument with IF and UN functions to -turn *UNKNOWN* into zero ...
--
-
In a ':' in a legend argument will mark the end of the legend. To +turn *UNKNOWN* into zero ...
++
++
+In a ':' in a legend argument will mark the end of the legend. To enter a ':' into a legend, the colon must be escaped with a backslash '\:'. Beware, that many environments look for backslashes themselves, so it may -be necessary to write two backslashes so that one is passed onto rrd_graph.
--
The text printed below the actual graph can be formated by appending special +be necessary to write two backslashes so that one is passed onto rrd_graph.
++
+The text printed below the actual graph can be formated by appending special escaped characters at the end of a text. When ever such a character occurs, all pending text is pushed onto the graph according to the character -specified.
-Valid markers are: \j for justified, \l for left aligned, \r for -right aligned and \c for centered. In the next section there is an -example showing how to use centered formating.
-Normally there are two space characters inserted between every two items +specified.
+Valid markers are: \j for justified, \l for left aligned, \r for +right aligned and \c for centered. In the next section there is an +example showing how to use centered formating.
+Normally there are two space characters inserted between every two items printed into the graph. The space following a string can be suppressed by -putting a \g at the end of the string. The \g also squshes any space +putting a \g at the end of the string. The \g also squshes any space inside the string if it is at the very end of the string. This can be used -in connection with %s to supress empty unit strings.
-- GPRINT:a:MAX:%lf%s\g-
A special case is COMMENT:\s this inserts some additional vertical space -before placing the next row of legends.
--
Whenever rrd_graph gets called, it prints a line telling the size of -the gif it has just created to STDOUT. This line looks like this: XSIZExYSIZE.
--
+in connection with %s to supress empty unit strings. +++ GPRINT:a:MAX:%lf%s\g+A special case is COMMENT:\s this inserts some additional vertical space +before placing the next row of legends.
+When text has to be formated without special instructions from your side, +rrdtool will automatically justify the text as soon as one string goes over +the right edge. If you want to prevent the justification without forcing a +newline, you can use the special tag \J at the end of the string to +disable the auto justification.
++
+
+NOTE on Return Values
+Whenever rrd_graph gets called, it prints a line telling the size of +the gif it has just created to STDOUT. This line looks like this: XSIZExYSIZE.
++
+
+EXAMPLE 1
+rrdtool graph demo.gif --title="Demo Graph" \ DEF:cel=demo.rrd:exhaust:AVERAGE \ "CDEF:far=cel,1.8,*,32,+"" \ LINE2:cel#00a000:"D. Celsius" \ - LINE2:far#ff0000:"D. Fahrenheit\c"--
-EXAMPLE 2
-This example demonstrates the syntax for using IF and UN to set -*UNKNOWN* values to 0. This technique is useful if you are + LINE2:far#ff0000:"D. Fahrenheit\c"
+
+This example demonstrates the syntax for using IF and UN to set +*UNKNOWN* values to 0. This technique is useful if you are aggregating interface data where the start dates of the data sets -doesn't match.
-+doesn't match. ++rrdtool graph demo.gif --title="Demo Graph" \ DEF:idat1=interface1.rrd:ds0:AVERAGE \ DEF:idat2=interface2.rrd:ds0:AVERAGE \ @@ -567,24 +745,23 @@ CDEF:aggoutput=odat1,UN,0,odat1,IF,odat2,UN,0,odat2,IF,+,8,* \ AREA:agginput#00cc00:Input Aggregate \ LINE1:aggoutput#0000FF:Output Aggregate --- -Assuming that idat1 has a data value of I<*UNKNOWN*>, the CDEF expression-- idat1,UN,0,idat1,IF-leaves us with a stack with contents of 1,0,NaN and the IF function + +Assuming that idat1 has a data value of I<*UNKNOWN*>, the CDEF expression
+ idat1,UN,0,idat1,IF+
leaves us with a stack with contents of 1,0,NaN and the IF function will pop off the 3 values and replace them with 0. If idat1 had a real value like 7942099, then the stack would have 0,0,7942099 and the -real value would be the replacement.
--
This example shows two ways to use the INF function. First it makes +real value would be the replacement.
++
+This example shows two ways to use the INF function. First it makes the background change color during half of the hours. Then, it uses AREA and STACK to draw a picture. If one of the inputs was UNKNOWN, -all inputs are overlaid with another AREA.
-+all inputs are overlaid with another AREA. ++rrdtool graph example.png --title="INF demo" \ DEF:val1=some.rrd:ds0:AVERAGE \ DEF:val2=some.rrd:ds1:AVERAGE \ @@ -597,30 +774,32 @@ STACK:val2#00C000:Value2 \ STACK:val3#FFFF00:Value3 \ STACK:val4#FFC000:Value4 \ - AREA:wipeout#FF0000:Unknown-The first CDEF uses val4 as a dummy value. It's value is removed immediately + AREA:wipeout#FF0000:Unknown
The first CDEF uses val4 as a dummy value. It's value is removed immediately from the stack. Then a decision is made based on the time that a sample was taken. If it is an even hour (UTC time !) then the area will be filled. If -it is not, the value is set to UNKN and is not plotted.
-The second CDEF looks if any of val1,val2,val3,val4 is unknown. It does so by +it is not, the value is set to UNKN and is not plotted.
+The second CDEF looks if any of val1,val2,val3,val4 is unknown. It does so by checking the outcome of sum(val1,val2,val3,val4). Again, INF is returned when -the condition is true, UNKN is used to not plot the data.
-The different items are plotted in a particular order. First do the background, then use a +the condition is true, UNKN is used to not plot the data.
+The different items are plotted in a particular order. First do the background, then use a normal area to overlay it with data. Stack the other data until they are all plotted. Last but not least, overlay everything with eye-hurting red -to signal any unknown data.
-Note that this example assumes that your data is in the positive half of the y-axis +to signal any unknown data.
+Note that this example assumes that your data is in the positive half of the y-axis otherwhise you would would have to add NEGINF in order to extend the coverage -of the rea to whole graph.
--
Tobias Oetiker <oetiker at ee.ethz.ch>
--
[1] http://www.dotpoint.com/xnumber/rpn_or_adl.htm
+of the rea to whole graph. ++
+Tobias Oetiker <oetiker at ee.ethz.ch>
++
+[1] http://www.dotpoint.com/xnumber/rpn_or_adl.htm
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdtutorial.html (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdtutorial.html 2003-02-20 15:24:01.000000000 -0800 @@ -1,78 +1,84 @@ - - --
rrdtutorial - Alex van den Bogaerdt's RRDtool tutorial
--
RRDtool is written by Tobias Oetiker <oetiker at ee.ethz.ch> with +
+
+rrdtutorial - Alex van den Bogaerdt's RRDtool tutorial
++
+RRDtool is written by Tobias Oetiker <oetiker at ee.ethz.ch> with contributions from many people all around the world. This document is -written by Alex van den Bogaerdt <alex at ergens.op.het.net> to help you -understand what RRDtool is and what it can do for you.
-The documentation provided with RRDtool can be too technical for some +written by Alex van den Bogaerdt <alex at ergens.op.het.net> to help you +understand what RRDtool is and what it can do for you.
+The documentation provided with RRDtool can be too technical for some people. This tutorial is here to help you understand the basics of RRDtool. It should prepare you to read the documentation yourself. It also explains the general things about statistics with a focus on -networking.
--
-
Please don't skip ahead in this document! The first part of this +networking.
++
++
+Please don't skip ahead in this document! The first part of this document explains the basics and may be boring. But if you don't -understand the basics, the examples will not be as meaningful to you.
--
RRDtool refers to Round Robin Database tool. +understand the basics, the examples will not be as meaningful to you.
++
+RRDtool refers to Round Robin Database tool. Round robin is a technique that works with a fixed amount of data, and a pointer to the current element. Think of a circle with some dots plotted on the edge, these dots are the places where data can be stored. Draw an @@ -83,23 +89,25 @@ the process automatically reuses old locations. This way, the database will not grow in size and therefore requires no mainenance. RRDtool works with with Round Robin Databases (RRDs). It stores and retrieves -data from them.
--
You name it, it will probably fit. You should be able to measure some value +data from them.
++
+You name it, it will probably fit. You should be able to measure some value at several points in time and provide this information to RRDtool. If you can do this, RRDtool will be able to store it. The values need to be -numerical but don't have to be, as opposed to MRTG, integers.
-Many examples talk about SNMP which is an acronym for +numerical but don't have to be, as opposed to MRTG, integers.
+Many examples talk about SNMP which is an acronym for Simple Network Management Protocol. ``Simple'' refers to the protocol -- it does not mean it is simple to manage or monitor a network. After working your way through this document, you should know enough to be able to understand what people are talking about. For now, just realize that SNMP is a way to ask devices for the values of counters they keep. -It is the value from those counters that are kept in the RRD.
--
RRDtool originated from MRTG (Multi Router Traffic Grapher). MRTG started +It is the value from those counters that are kept in the RRD.
++
+RRDtool originated from MRTG (Multi Router Traffic Grapher). MRTG started as a tiny little script for graphing the use of a connection to the Internet. MRTG evolved into a tool for graphing other data sources including temperature, speed, voltage, number of printouts and @@ -114,48 +122,51 @@ consumption, number of visitors at an exhibition, noise levels near an airport, temperature on your favorite holiday location, temperature in the fridge and whatever you imagination can come up with. You need a sensor to -measure the data and be able to feed the numbers to RRDtool.
--
First of all: read it again! You may have missed something. +measure the data and be able to feed the numbers to RRDtool.
++
+First of all: read it again! You may have missed something. If you are unable to compile the sources and you have a fairly common OS, it will probably not be the fault of RRDtool. There may be precompiled versions around on the Internet. If they come from trusted sources, get one of those. If on the other hand the program works but does not give you the expected results, it will be a problem with configuring it. Review -your configuration and compare it with the examples that follow.
-There is a mailing list and an archive of it. Read the list for a few +your configuration and compare it with the examples that follow.
+There is a mailing list and an archive of it. Read the list for a few weeks and search the archive. It is considered rude to just ask a question without searching the archives: your problem may already have been solved for somebody else! This is true for most, if not all, mailing lists and not only for this particular list! Look in the documentation that -came with RRDtool for the location and usage of the list.
-I suggest you take a moment to subscribe to the mailing list right now -by sending an email to <rrd-users-request at list.ee.ethz.ch> with a +came with RRDtool for the location and usage of the list.
+I suggest you take a moment to subscribe to the mailing list right now +by sending an email to <rrd-users-request at list.ee.ethz.ch> with a subject of ``subscribe''. If you ever want to leave this list, you write -an email to the same address but now with a subject of ``unsubscribe''.
--
By giving you some detailed descriptions with detailed examples. +an email to the same address but now with a subject of ``unsubscribe''.
++
+By giving you some detailed descriptions with detailed examples. It is assumed that following the instructions in the order presented will give you enough knowledge of RRDtool to experiment for yourself. If it doesn't work the first time, don't give up. Reread the stuff that you did understand, you may have missed something. By following the examples you get some hands-on experience and, even -more important, some background information of how it works.
-You will need to know something about hexadecimal numbers. If you don't -then start with reading the bin_dec_hex manpage before you continue here.
--
In my opinion the best way to learn something is to actually do it. +more important, some background information of how it works.
+You will need to know something about hexadecimal numbers. If you don't +then start with reading the bin_dec_hex manpage before you continue here.
++
+In my opinion the best way to learn something is to actually do it. Why not start right now? We will create a database, put some values in it and extract this data again. Your output should be the same -as the output that is included in this document.
-We will start with some easy stuff and compare a car with a router, +as the output that is included in this document.
+We will start with some easy stuff and compare a car with a router, or compare kilometers (miles if you wish) with bits and bytes. It's -all the same: some number over some time.
-Assume we have a device that transfers bytes to and from the Internet. +all the same: some number over some time.
+Assume we have a device that transfers bytes to and from the Internet. This device keeps a counter that starts at zero when it is turned on, increasing with every byte that is transfered. This counter will have a maximum value, if that value is reached and an extra byte is counted, @@ -169,69 +180,70 @@ The device, when asked, returns the current value of the counter. We know the time that has passes since we last asked so we now know how many bytes have been transfered ***on average*** per second. This is -not very hard to calculate. First in words, then in calculations:
-- bps = (counter_now - counter_before) / (time_now - time_before) * 8-
For some people it may help to translate this to a automobile example: -Do not try this example, and if you do, don't blame me for the results.
-People who are not used to think in kilometers per hour can translate +
+ bps = (counter_now - counter_before) / (time_now - time_before) * 8+
For some people it may help to translate this to a automobile example: +Do not try this example, and if you do, don't blame me for the results.
+People who are not used to think in kilometers per hour can translate most into miles per hour by dividing km by 1.6 (close enough). -I will use the following abbreviations:
-+I will use the following abbreviations: ++M: meter KM: kilometer (= 1000 meters). H: hour S: second KM/H: kilometers per hour - M/S: meters per second-You're driving a car. At 12:05 you read the counter in the dashboard + M/S: meters per second
You're driving a car. At 12:05 you read the counter in the dashboard and it tells you that the car has moved 12345 KM until that moment. At 12:10 you look again, it reads 12357 KM. This means you have traveled 12 KM in five minutes. A scientist would translate that into meters per second and this makes a nice comparison towards the -problem of (bytes per five minutes) versus (bits per second).
-We traveled 12 kilometers which is 12000 meters. We did that in five +problem of (bytes per five minutes) versus (bits per second).
+We traveled 12 kilometers which is 12000 meters. We did that in five minutes which translates into 300 seconds. Our speed is 12000M / 300S -equals 40 M/S.
-We could also calculate the speed in KM/H: 12 times five minutes +equals 40 M/S.
+We could also calculate the speed in KM/H: 12 times five minutes is an hour so we have to multiply 12 KM by 12 to get 144 KM/H. For our native English speaking friends: that's 90 MPH so don't -try this example at home or where I live :)
-Remember: these numbers are averages only. There is no way to figure out +try this example at home or where I live :)
+Remember: these numbers are averages only. There is no way to figure out from the numbers, if you drove at a constant speed. There is an example -later on in this tutorial that explains this.
-I hope you understand that there is no difference in calculating M/S or +later on in this tutorial that explains this.
+I hope you understand that there is no difference in calculating M/S or bps; only the way we collect the data is different. Even the K from kilo -is the same as in networking terms k also means 1000.
-We will now create a database where we can keep all these interesting +is the same as in networking terms k also means 1000.
+We will now create a database where we can keep all these interesting numbers. The method used to start the program may differ slightly from OS to OS but I assume you can figure it out if it works different on your OS. Make sure you do not overwrite any file on your system when executing the following command and type the whole line as one long line (I had to split it for readability) -and skip all of the '\' characters.
-+and skip all of the '\' characters. ++rrdtool create test.rrd \ --start 920804400 \ DS:speed:COUNTER:600:U:U \ RRA:AVERAGE:0.5:1:24 \ - RRA:AVERAGE:0.5:6:10-(So enter:
-rrdtool create test.rrd --start 920804400 DS ...)-
What has been created ?
-We created the round robin database called test (test.rrd) + RRA:AVERAGE:0.5:6:10
(So enter: rrdtool create test.rrd --start 920804400 DS ...)
+
+We created the round robin database called test (test.rrd) which starts at noon the day I started (7th of march, 1999) writing this document. It holds one data source (DS) named ``speed'' that gets built from a counter. This counter is read every five minutes (default) @@ -239,19 +251,19 @@ averages the data every time it is read (eg there's nothing to average) and keeps 24 samples (24 times 5 minutes is 2 hours). The other averages 6 values (half hour) and contains 10 of such averages (eg 5 hours) -The remaining options will be discussed later on.
-RRDtool works with special time stamps coming from the UNIX world. +The remaining options will be discussed later on.
+RRDtool works with special time stamps coming from the UNIX world. This time stamp is the number of seconds that passed since January 1st 1970 UTC. This time stamp is translated into local time and -it will therefore look different for the different time zones.
-Chances are that you are not in the same part of the world as I am. +it will therefore look different for the different time zones.
+Chances are that you are not in the same part of the world as I am. This means your time zone is different. In all examples where I talk about time, the hours may be wrong for you. This has little effect on the results of the examples, just correct the hours while reading. -As an example: where I will see ``12:05'' the UK folks will see ``11:05''.
-We now have to fill our database with some numbers. We'll pretend to -have read the following numbers:
-+As an example: where I will see ``12:05'' the UK folks will see ``11:05''. ++We now have to fill our database with some numbers. We'll pretend to +have read the following numbers:
+12:05 12345 KM 12:10 12357 KM 12:15 12363 KM @@ -266,29 +278,29 @@ 13:00 12415 KM 13:05 12420 KM 13:10 12422 KM - 13:15 12423 KM-We fill the database as follows:
-+ 13:15 12423 KM+We fill the database as follows:
+rrdtool update test.rrd 920804700:12345 920805000:12357 920805300:12363 rrdtool update test.rrd 920805600:12363 920805900:12363 920806200:12373 rrdtool update test.rrd 920806500:12383 920806800:12393 920807100:12399 rrdtool update test.rrd 920807400:12405 920807700:12411 920808000:12415 - rrdtool update test.rrd 920808300:12420 920808600:12422 920808900:12423-This reads: update our test database with the following numbers
-+ rrdtool update test.rrd 920808300:12420 920808600:12422 920808900:12423+This reads: update our test database with the following numbers
+time 920804700, value 12345 - time 920805000, value 12357-etcetera.
-As you can see, it is possible to feed more than one value into the + time 920805000, value 12357
etcetera.
+As you can see, it is possible to feed more than one value into the database in one command. I had to stop at three for readability but -the real maximum is OS dependent.
-We can now retrieve the data from our database using ``rrdtool fetch'':
-- rrdtool fetch test.rrd AVERAGE --start 920804400 --end 920809200-
It should return the following output:
-- speed-
+the real maximum is OS dependent. ++We can now retrieve the data from our database using ``rrdtool fetch'':
++ rrdtool fetch test.rrd AVERAGE --start 920804400 --end 920809200+It should return the following output:
++ speed+920804700: NaN 920805000: 0.04 920805300: 0.02 @@ -304,48 +316,50 @@ 920808300: 0.02 920808600: 0.01 920808900: 0.00 - 920809200: NaN-If it doesn't, something may be wrong. Perhaps your OS will print + 920809200: NaN
If it doesn't, something may be wrong. Perhaps your OS will print ``NaN'' in a different form. It represents ``Not A Number''. If your OS writes ``U'' or ``UNKN'' or something similar that's okay. If something else is wrong, it will probably be due to an error you made (assuming that my tutorial is correct of course :-). In that case: delete the -database and try again.
-What this output represents will become clear in the rest of the tutorial.
--
Try the following command:
-+database and try again. ++What this output represents will become clear in the rest of the tutorial.
++
+It is time to create some graphics
+Try the following command:
+rrdtool graph speed.gif \ --start 920804400 --end 920808000 \ DEF:myspeed=test.rrd:speed:AVERAGE \ - LINE2:myspeed#FF0000-This will create speed.gif which starts at 12:00 and ends at 13:00. + LINE2:myspeed#FF0000
This will create speed.gif which starts at 12:00 and ends at 13:00. There is a definition of variable myspeed, it is the data from RRA ``speed'' out of database ``test.rrd''. The line drawn is 2 pixels high, and comes from variable myspeed. The color is red. You'll notice that the start of the graph is not at 12:00 but at 12:05 and this is because we have insufficient data to tell the average before that time. This will only happen when you miss some samples, this will -not happen a lot, hopefully.
-If this has worked: congratulations! If not, check what went wrong.
-The colors are built up from red, green and blue. For each of the +not happen a lot, hopefully.
+If this has worked: congratulations! If not, check what went wrong.
+The colors are built up from red, green and blue. For each of the components, you specify how much to use in hexadecimal where 00 means not included and FF means fully included. The ``color'' white is a mixture of red, green and blue: FFFFFF -The ``color'' black is all colors off: 000000
-+The ``color'' black is all colors off: 000000 ++red #FF0000 green #00FF00 blue #0000FF magenta #FF00FF (mixed red with blue) - gray #555555 (one third of all components)-The GIF you just created can be displayed using your favorite image + gray #555555 (one third of all components)
The GIF you just created can be displayed using your favorite image viewer. Web browsers will display the GIF via the URL -``file://the/path/to/speed.gif''
--
When looking at the image, you notice that the horizontal axis is labeled +``file://the/path/to/speed.gif''
++
+When looking at the image, you notice that the horizontal axis is labeled 12:10, 12:20, 12:30, 12:40 and 12:50. The two remaining times (12:00 and 13:00) would not be displayed nicely so they are skipped. The vertical axis displays the range we entered. We provided kilometers @@ -353,38 +367,38 @@ the first value was 12 (12357-12345) and divided by 300 this makes 0.04, which is displayed by RRDtool as ``40 m'' meaning ``40/1000''. The ``m'' has nothing to do with meters, kilometers or millimeters! RRDtool doesn't -know about all this, it just works with numbers and not with meters...
-What we did wrong was that we should have measured in meters, this would -have been (12357000-12345000)/300 = 12000/300 = 40.
-Let's correct that. We could recreate our database and store the correct +know about all this, it just works with numbers and not with meters...
+What we did wrong was that we should have measured in meters, this would +have been (12357000-12345000)/300 = 12000/300 = 40.
+Let's correct that. We could recreate our database and store the correct data but there is a better way: do some calculations while creating the -gif file !
-+gif file ! ++rrdtool graph speed2.gif \ --start 920804400 --end 920808000 \ --vertical-label m/s \ DEF:myspeed=test.rrd:speed:AVERAGE \ CDEF:realspeed=myspeed,1000,* \ - LINE2:realspeed#FF0000-After viewing this GIF, you notice the ``m'' has disappeared. This it what + LINE2:realspeed#FF0000
After viewing this GIF, you notice the ``m'' has disappeared. This it what the correct result would be. Also, a label has been added to the image. -Apart from the things mentioned above, the GIF should be the same.
-The calculations are in the CDEF part and are in Reverse Polish Notation +Apart from the things mentioned above, the GIF should be the same.
+The calculations are in the CDEF part and are in Reverse Polish Notation (``RPN''). What it says is: ``take the data source myspeed and the number 1000; multiply those''. Don't bother with RPN yet, it will be explained later on in more detail. Also, you may want to read my tutorial on CDEFs -and Steve Rader's tutorial on RPN. But first finish this tutorial.
-Hang on! If we can multiply values with 1000, it should also be possible -to display kilometers per hour from the same data!
-To change a value that is measured in meters per second: +and Steve Rader's tutorial on RPN. But first finish this tutorial.
+Hang on! If we can multiply values with 1000, it should also be possible +to display kilometers per hour from the same data!
+To change a value that is measured in meters per second: -*- Calculate meters per hour: value * 3600 -*- Calculate kilometers per hour: value / 1000 - -*- Together this makes: value * (3600/1000) == value * 3.6
-In our example database we made a mistake and we need to compensate for + -*- Together this makes: value * (3600/1000) == value * 3.6
+In our example database we made a mistake and we need to compensate for this by multiplying with 1000. Applying that correction: - -*- value * 3.6 *1000 == value * 3600
-Now let's create this GIF, and add some more magic ...
-+ -*- value * 3.6 *1000 == value * 3600 ++Now let's create this GIF, and add some more magic ...
+rrdtool graph speed3.gif \ --start 920804400 --end 920808000 \ --vertical-label km/h \ @@ -394,24 +408,25 @@ CDEF:good=kmh,100,GT,0,kmh,IF \ HRULE:100#0000FF:"Maximum allowed" \ AREA:good#00FF00:"Good speed" \ - AREA:fast#FF0000:"Too fast"-This looks much better. Speed in KM/H and even an extra line with the + AREA:fast#FF0000:"Too fast"
This looks much better. Speed in KM/H and even an extra line with the maximum allowed speed (on the road I travel at). I also changed the -colors used to display speed and changed it from a line into an area.
-The calculations are more complex now. For the ``good'' speed they are:
-+colors used to display speed and changed it from a line into an area. ++The calculations are more complex now. For the ``good'' speed they are:
+Check if kmh is greater than 100 ( kmh,100 ) GT - If so, return 0, else kmh ((( kmh,100 ) GT ), 0, kmh) IF-For the other speed:
-+ If so, return 0, else kmh ((( kmh,100 ) GT ), 0, kmh) IF+For the other speed:
+Check if kmh is greater than 100 ( kmh,100 ) GT - If so, return kmh, else return 0 ((( kmh,100) GT ), kmh, 0) IF--
Graphics Magic
-I like to believe there are virtually no limits to how RRDtool graph + If so, return kmh, else return 0 ((( kmh,100) GT ), kmh, 0) IF
+
+I like to believe there are virtually no limits to how RRDtool graph can manipulate data. I will not explain how it works, but look at the -following GIF:
-+following GIF: ++rrdtool graph speed4.gif \ --start 920804400 --end 920808000 \ --vertical-label km/h \ @@ -423,43 +438,45 @@ HRULE:100#0000FF:"Maximum allowed" \ AREA:good#00FF00:"Good speed" \ AREA:fast#550000:"Too fast" \ - STACK:over#FF0000:"Over speed"-Let's create a quick and dirty HTML page to view three GIFs:
-+ STACK:over#FF0000:"Over speed"+Let's create a quick and dirty HTML page to view three GIFs:
+<HTML><HEAD><TITLE>Speed</TITLE></HEAD><BODY> <IMG src="speed2.gif" alt="Speed in meters per second"> <BR> <IMG src="speed3.gif" alt="Speed in kilometers per hour"> <BR> <IMG src="speed4.gif" alt="Traveled too fast?"> - </BODY></HTML>-Name the file ``speed.html'' or similar, and view it.
-Now, all you have to do is measure the values regularly and update the + </BODY></HTML>
Name the file ``speed.html'' or similar, and view it.
+Now, all you have to do is measure the values regularly and update the database. When you want to view the data, recreate the GIFs and make sure to refresh them in your browser. (Note: just clicking reload may not be enough; Netscape in particular has a problem doing so and you'll -need to click reload while pressing the shift key).
--
We've already used the ``update'' command: it took one or more parameters +need to click reload while pressing the shift key).
++
+We've already used the ``update'' command: it took one or more parameters in the form of ``<time>:<value>''. You'll be glad to know that you can get the current time by filling in a ``N'' as the time. If you wish, you can also use the ``time'' function in perl. -The shortest example in this doc :)
-- perl -e 'print time, "\n" '-
How you can run a program on regular intervals is OS specific. But here's -an example in pseudo code:
-+The shortest example in this doc :) +++ perl -e 'print time, "\n" '+How you can run a program on regular intervals is OS specific. But here's +an example in pseudo code:
+Get the value, put it in variable "$speed" - rrdtool update speed.rrd N:$speed-(Do not try this with our test database, it is used in further examples)
-This is all. Run this script every five minutes. When you need to know + rrdtool update speed.rrd N:$speed
(Do not try this with our test database, it is used in further examples)
+This is all. Run this script every five minutes. When you need to know what the graphics look like, run the examples above. You could put them -in a script. After running that script, view index.html
--
I can imagine very few people will be able to get real data from their +in a script. After running that script, view index.html
++
+I can imagine very few people will be able to get real data from their car every five minutes, all other people will have to settle for some other kind of counter. You could measure the number of pages printed by a printer, the coffee made by the coffee machine, a device that counts @@ -472,128 +489,129 @@ Some people will make a remark that there are tools who can do this data collection for you. They are right! However, I feel it is important that you understand they are not necessary. When you have to determine why -things went wrong you need to know how they work.
-One tool used in the example has been talked about very briefly in the +things went wrong you need to know how they work.
+One tool used in the example has been talked about very briefly in the beginning of this document, it is called SNMP. It is a way of talking to equipment. The tool I use below is called ``snmpget'' and this is how it -works:
-- snmpget device password OID-
For device you substitute the name, or the IP address, of your device. +works:
++ snmpget device password OID+
For device you substitute the name, or the IP address, of your device. For password you use the ``community read string'' as it is called in the SNMP world. For some devices the default of ``public'' might work, however this can be disabled, altered or protected for privacy and security -reasons. Read the documentation that comes with your device or program.
-Then there is this third parameter, called OID, which means ``object -identifier''.
-When you start to learn about SNMP it looks very confusing. It isn't +reasons. Read the documentation that comes with your device or program.
+Then there is this third parameter, called OID, which means ``object +identifier''.
+When you start to learn about SNMP it looks very confusing. It isn't all that difficult when you look at the Management Information Base (``MIB''). It is an upside-down tree that describes data, with a single node as the root and from there a number of branches. These branches end up in another node, they branch out, etc. All the branches have a name and they form the path that we follow all the way down. The branches that we follow are named: iso, org, dod, internet, mgmt and mib-2. -These names can also be written down as numbers and are 1 3 6 1 2 1.
-- iso.org.dod.internet.mgmt.mib-2 (1.3.6.1.2.1)-
There is a lot of confusion about the leading dot that some programs +These names can also be written down as numbers and are 1 3 6 1 2 1.
++ iso.org.dod.internet.mgmt.mib-2 (1.3.6.1.2.1)+
There is a lot of confusion about the leading dot that some programs use. There is *no* leading dot in an OID. However, some programs can use above part of OIDs as a default. To indicate the difference between abbreviated OIDs and full OIDs they need a leading dot when you specify the complete OID. Often those programs will leave out the default portion when returning the data to you. To make things -worse, they have several default prefixes ...
-Right, lets continue to the start of our OID: we had 1.3.6.1.2.1 +worse, they have several default prefixes ...
+Right, lets continue to the start of our OID: we had 1.3.6.1.2.1 From there, we are especially interested in the branch ``interfaces'' -which has number 2 (eg 1.3.6.1.2.1.2 or 1.3.6.1.2.1.interfaces).
-First, we have to get some SNMP program. First look if there is a +which has number 2 (eg 1.3.6.1.2.1.2 or 1.3.6.1.2.1.interfaces).
+First, we have to get some SNMP program. First look if there is a pre-compiled package available for your OS. This is the preferred way. If not, you will have to get yourself the sources and compile those. The Internet is full of sources, programs etc. Find information using a search engine or whatever you prefer. As a suggestion: look for -CMU-SNMP. It is commonly used.
-Assume you got the program. First try to collect some data that is +CMU-SNMP. It is commonly used.
+Assume you got the program. First try to collect some data that is available on most systems. Remember: there is a short name for the -part of the tree that interests us most in the world we live in!
-I will use the short version as I think this document is large enough +part of the tree that interests us most in the world we live in!
+I will use the short version as I think this document is large enough as it is. If that doesn't work for you, prefix with .1.3.6.1.2.1 and try again. Also, Read The Fine Manual. Skip the parts you cannot understand yet, you should be able to find out how to start the -program and use it.
-- snmpget myrouter public system.sysDescr.0-
The device should answer with a description of itself, perhaps empty. +program and use it.
++ snmpget myrouter public system.sysDescr.0+
The device should answer with a description of itself, perhaps empty. Until you got a valid answer from a device, perhaps using a different -``password'', or a different device, there is no point in continuing.
-- snmpget myrouter public interfaces.ifNumber.0-
Hopefully you get a number as a result, the number of interfaces. -If so, you can carry on and try a different program called ``snmpwalk''.
-- snmpwalk myrouter public interfaces.iftable.ifentry.ifdescr-
If it returns with a list of interfaces, you're almost there. +``password'', or a different device, there is no point in continuing.
++ snmpget myrouter public interfaces.ifNumber.0+
Hopefully you get a number as a result, the number of interfaces. +If so, you can carry on and try a different program called ``snmpwalk''.
++ snmpwalk myrouter public interfaces.iftable.ifentry.ifdescr+
If it returns with a list of interfaces, you're almost there. Here's an example: - [user at host /home/alex]$ snmpwalk cisco public 2.2.1.2
-+ [user at host /home/alex]$ snmpwalk cisco public 2.2.1.2 ++interfaces.ifTable.ifEntry.ifDescr.1 = "BRI0: B-Channel 1" interfaces.ifTable.ifEntry.ifDescr.2 = "BRI0: B-Channel 2" interfaces.ifTable.ifEntry.ifDescr.3 = "BRI0" Hex: 42 52 49 30 interfaces.ifTable.ifEntry.ifDescr.4 = "Ethernet0" - interfaces.ifTable.ifEntry.ifDescr.5 = "Loopback0"-On this cisco equipment, I would like to monitor the ``Ethernet0'' -interface and see that it is number four. I try:
-- [user at host /home/alex]$ snmpget cisco public 2.2.1.10.4 2.2.1.16.4-+ interfaces.ifTable.ifEntry.ifDescr.5 = "Loopback0"+On this cisco equipment, I would like to monitor the ``Ethernet0'' +interface and see that it is number four. I try:
++ [user at host /home/alex]$ snmpget cisco public 2.2.1.10.4 2.2.1.16.4+interfaces.ifTable.ifEntry.ifInOctets.4 = 2290729126 - interfaces.ifTable.ifEntry.ifOutOctets.4 = 1256486519-So now I have two OIDs to monitor and they are (in full, this time):
-- 1.3.6.1.2.1.2.2.1.10-and
-- 1.3.6.1.2.1.2.2.1.16-both with an interface number of 4.
-Don't get fooled, this wasn't my first try. It took some time for me too + interfaces.ifTable.ifEntry.ifOutOctets.4 = 1256486519
So now I have two OIDs to monitor and they are (in full, this time):
++ 1.3.6.1.2.1.2.2.1.10+
and
++ 1.3.6.1.2.1.2.2.1.16+
both with an interface number of 4.
+Don't get fooled, this wasn't my first try. It took some time for me too to understand what all these numbers mean, it does help a lot when they get translated into descriptive text... At least, when people are talking about MIBs and OIDs you know what it's all about. Do not forget the interface number (0 if it is not interface dependent) -and try snmpwalk if you don't get an answer from snmpget.
-If you understand above part, and get numbers from your device, continue -on with this tutorial. If not, then go back and re-read this part.
--
Let the fun begin. First, create a new database. It contains data from +and try snmpwalk if you don't get an answer from snmpget.
+If you understand above part, and get numbers from your device, continue +on with this tutorial. If not, then go back and re-read this part.
++
+Let the fun begin. First, create a new database. It contains data from two counters, called input and output. The data is put into archives that average it. They take 1, 6, 24 or 288 samples at a time. They also go into archives that keep the maximum numbers. This will be explained later on. The time in-between samples is 300 seconds, a good -starting point, which is the same as five minutes.
-+starting point, which is the same as five minutes. ++1 sample "averaged" stays 1 period of 5 minutes 6 samples averaged become one average on 30 minutes 24 samples averaged become one average on 2 hours - 288 samples averaged become one average on 1 day-Lets try to be compatible with MRTG: -MRTG stores about the following amount of data:
-+ 288 samples averaged become one average on 1 day+Lets try to be compatible with MRTG: +MRTG stores about the following amount of data:
+600 5-minute samples: 2 days and 2 hours 600 30-minute samples: 12.5 days 600 2-hour samples: 50 days - 732 1-day samples: 732 days-These ranges are appended so the total amount of data kept is approximately + 732 1-day samples: 732 days
These ranges are appended so the total amount of data kept is approximately 797 days. RRDtool stores the data differently, it doesn't start the ``weekly'' archive where the ``daily'' archive stopped. For both archives the most recent data will be near ``now'' and therefore we will need to keep more data than -MRTG does!
-We will need:
-+MRTG does! ++We will need:
+600 samples of 5 minutes (2 days and 2 hours) 700 samples of 30 minutes (2 days and 2 hours, plus 12.5 days) 775 samples of 2 hours (above + 50 days) - 797 samples of 1 day (above + 732 days, rounded up to 797)-+ 797 samples of 1 day (above + 732 days, rounded up to 797)+rrdtool create myrouter.rrd \ DS:input:COUNTER:600:U:U \ DS:output:COUNTER:600:U:U \ @@ -604,11 +622,11 @@ RRA:MAX:0.5:1:600 \ RRA:MAX:0.5:6:700 \ RRA:MAX:0.5:24:775 \ - RRA:MAX:0.5:288:797-Next thing to do is collect data and store it. Here is an example. + RRA:MAX:0.5:288:797
Next thing to do is collect data and store it. Here is an example. It is written partially in pseudo code so you will have to find out what -to do exactly on your OS to make it work.
-+to do exactly on your OS to make it work. ++while not the end of the universe do get result of @@ -616,49 +634,50 @@ into variable $in get result of snmpget router community 2.2.1.16.4 - into variable $out-- rrdtool update myrouter.rrd N:$in:$out-+ into variable $out++ rrdtool update myrouter.rrd N:$in:$out+wait for 5 minutes - done-Then, after collecting data for a day, try to create an image using:
-+ done+Then, after collecting data for a day, try to create an image using:
+rrdtool graph myrouter-day.gif --start -86400 \ DEF:inoctets=myrouter.rrd:input:AVERAGE \ DEF:outoctets=myrouter.rrd:output:AVERAGE \ AREA:inoctets#00FF00:"In traffic" \ - LINE1:outoctets#0000FF:"Out traffic"-This should produce a picture with one day worth of traffic. + LINE1:outoctets#0000FF:"Out traffic"
This should produce a picture with one day worth of traffic. One day is 24 hours of 60 minutes of 60 seconds: 24*60*60=86400, we start at now minus 86400 seconds. We define (with DEFs) inoctets and outoctets as the average values from the database myrouter.rrd and draw -an area for the ``in'' traffic and a line for the ``out'' traffic.
-View the image and keep logging data for a few more days. +an area for the ``in'' traffic and a line for the ``out'' traffic.
+View the image and keep logging data for a few more days. If you like, you could try the examples from the test database and -see if you can get various options and calculations working.
-Suggestion:
-Display in bytes per second and in bits per second. Make the Ethernet -graphics go red if they are over four megabits per second.
--
A few paragraphs back I mentioned the possibility of keeping +see if you can get various options and calculations working.
+Suggestion:
+Display in bytes per second and in bits per second. Make the Ethernet +graphics go red if they are over four megabits per second.
++
+A few paragraphs back I mentioned the possibility of keeping the maximum values instead of the average values. Let's go -into this a bit more.
-Recall all the stuff about the speed of the car. Suppose we drove at 144 +into this a bit more.
+Recall all the stuff about the speed of the car. Suppose we drove at 144 KM/H during 5 minutes and then were stopped by the police for 25 minutes. At the end of the lecture we would take our laptop and create+view the image taken from the database. If we look at the second RRA we did create, we would have the average from 6 samples. The samples measured would be 144+0+0+0+0+0=144, divided by 30 minutes, corrected for the error by 1000, translated into KM/H, with a result of 24 KM/H. -I would still get a ticket but not for speeding anymore :)
-Obviously, in this case, we shouldn't look at the averages. In some +I would still get a ticket but not for speeding anymore :)
+Obviously, in this case, we shouldn't look at the averages. In some cases they are handy. If you want to know how much KM you had traveled, the picture would be the right one to look at. On the other hand, for the speed that we traveled at, the maximum number seen is much more -valuable. (later we will see more types)
-It is the same for data. If you want to know the amount, look at the +valuable. (later we will see more types)
+It is the same for data. If you want to know the amount, look at the averages. If you want to know the rate, look at the maximum. Over time, they will grow apart more and more. In the last database we have created, there are two archives that keep data per day. The @@ -666,12 +685,12 @@ shows maxima will have higher numbers. For my car this would translate in averages per day of 96/24=4 KM/H (as I travel about 94 kilometers on a day) during week days, and -maximum of 120 KM/H on weekdays (my top speed that I reach every day).
-Big difference. Do not look at the second graph to estimate the +maximum of 120 KM/H on weekdays (my top speed that I reach every day).
+Big difference. Do not look at the second graph to estimate the distances that I travel and do not look at the first graph to estimate my speed. This will work if the samples are close together, -as they are in five minutes, but not if you average.
-On some days, I go for a long ride. If I go across Europe and travel +as they are in five minutes, but not if you average.
+On some days, I go for a long ride. If I go across Europe and travel for over 12 hours, the first graph will rise to about 60 KM/H. The second one will show 180 KM/H. This means that I traveled a distance of 60 KM/H times 24 H = 1440 KM. I did this with a higher speed and @@ -688,31 +707,33 @@ higher, so you can see more. However, this takes 12 samples per hour, or 288 values per day, so it would be too much to keep for a long period of time. Therefore we average it, eventually to one value per -day. From this one value, we cannot see much detail.
-Make sure you understand the last few paragraphs. There is no value +day. From this one value, we cannot see much detail.
+Make sure you understand the last few paragraphs. There is no value in only a line and a few axis, you need to know what they mean and -interpret the data in a good way. This is true for all data.
-The biggest mistake you can make is to use the collected data for +interpret the data in a good way. This is true for all data.
+The biggest mistake you can make is to use the collected data for something that it is not suitable for. You would be better off if -you would not have the graphics at all in that case.
--
You now know how to create a database. You can put the numbers in it, +you would not have the graphics at all in that case.
++
+You now know how to create a database. You can put the numbers in it, get them out again by creating an image, do math on the data from the database and view the outcome instead of the raw data. You know about the difference between averages and maxima, and when -to use which (or at least you have an idea).
-RRDtool can do more than what we have learned up to now. Before you +to use which (or at least you have an idea).
+RRDtool can do more than what we have learned up to now. Before you continue with the rest of this doc, I recommend that you reread from the start and try some modifications on the examples. Make sure you fully understand everything. It will be worth the effort and helps you not only with the rest of this doc but also in your day to day -monitoring long after you read this introduction.
--
All right, you feel like continuing. Welcome back and get ready -for an increased speed in the examples and explanation.
-You know that in order to view a counter over time, you have to +monitoring long after you read this introduction.
++
+All right, you feel like continuing. Welcome back and get ready +for an increased speed in the examples and explanation.
+You know that in order to view a counter over time, you have to take two numbers and divide the difference of them between the time lapsed. This makes sense for the examples I gave you but there are other possibilities. For instance, I'm able to retrieve the @@ -720,8 +741,8 @@ so called hot-spot and the exhaust. These values are not counters. If I take the difference of the two samples and divide that by 300 seconds I would be asking for the temperature change per second. -Hopefully this is zero! If not, the computerroom is on fire :)
-So, what can we do ? We can tell RRDtool to store the values we measure +Hopefully this is zero! If not, the computerroom is on fire :)
+So, what can we do ? We can tell RRDtool to store the values we measure directly as they are (this is not entirely true but close enough). The graphs we make will look much better, they will show a rather constant value. I know when the router is busy (it @@ -731,13 +752,13 @@ computer room -> the inlet temperature rises) etc. The data type we use when creating the database before was counter, we now have a different data type and thus a different name for it. It is called -GAUGE. There are more such data types:
-+GAUGE. There are more such data types: ++- COUNTER we already know this one - GAUGE we just learned this one - DERIVE - - ABSOLUTE-The two new types are DERIVE and ABSOLUTE. Absolute can be used like + - ABSOLUTE
The two new types are DERIVE and ABSOLUTE. Absolute can be used like counter with one difference: RRDtool assumes the counter is reset when it's read. That is: its delta is known without calculation by RRDtool whereas RRDtool needs to calculate it for the counter type. @@ -745,9 +766,9 @@ unknown, 12, 6, 0. The rest of the calculations stay the same. The other one, derive, is like counter. Unlike counter, it can also decrease so it can have a negative delta. Again, the rest of the -calculations stay the same.
-Let's try them all:
-+calculations stay the same. +Let's try them all:
+rrdtool create all.rrd --start 978300900 \ DS:a:COUNTER:600:U:U \ DS:b:GAUGE:600:U:U \ @@ -769,44 +790,45 @@ DEF:linea=all.rrd:a:AVERAGE LINE3:linea#FF0000:"Line A" \ DEF:lineb=all.rrd:b:AVERAGE LINE3:lineb#00FF00:"Line B" \ DEF:linec=all.rrd:c:AVERAGE LINE3:linec#0000FF:"Line C" \ - DEF:lined=all.rrd:d:AVERAGE LINE3:lined#000000:"Line D"--
RRDtool under the Microscope
-
+
+This translates in the following values, starting at 23:10 and ending -at 00:10 the next day (where U means unknown/unplotted):
-+
This translates in the following values, starting at 23:10 and ending +at 00:10 the next day (where U means unknown/unplotted):
+- Line A: u u 1 1 1 1 1 1 1 1 1 u - Line B: u 1 3 5 3 1 2 4 6 4 2 u - Line C: u u 2 2 2 0 -2 -6 2 0 2 u - - Line D: u 1 2 3 4 5 6 7 8 9 10 u-
If your GIF shows all this, you know you have typed the data correct, + - Line D: u 1 2 3 4 5 6 7 8 9 10 u +
If your GIF shows all this, you know you have typed the data correct, the RRDtool executable is working properly, your viewer doesn't fool you and you successfully entered the year 2000 :) You could try the same example four times, each time with only one of -the lines.
-Let's go over the data again:
-Let's go over the data again:
+-
There are a few more basics to show. Some important options are still to +
+
+There are a few more basics to show. Some important options are still to be covered and we haven't look at counter wraps yet. First the counter wrap: In our car we notice that our counter shows 999987. We travel 20 KM and the counter should go to 1000007. Unfortunately, there are only six digits @@ -847,23 +870,23 @@ anyways. How does it work ? Type counter should never decrease and therefore RRDtool must assume it wrapped if it does decrease ! If the delta is negative, this can be compensated for by adding the -maximum value of the counter + 1. For our car this would be:
-- Delta = 7 - 999987 = -999980 (instead of 1000007-999987=20)-
- Real delta = -999980 + 999999 + 1 = 20-
At the time of writing this document, RRDtool knows of counters that +maximum value of the counter + 1. For our car this would be:
++ Delta = 7 - 999987 = -999980 (instead of 1000007-999987=20)+
+ Real delta = -999980 + 999999 + 1 = 20+
At the time of writing this document, RRDtool knows of counters that are either 32 bits or 64 bits of size. These counters can handle the -following different values:
-+following different values: ++- 32 bits: 0 .. 4294967295 - - 64 bits: 0 .. 18446744073709551615-If these numbers look strange to you, you would like to view them in -their hexadecimal form:
-+ - 64 bits: 0 .. 18446744073709551615+If these numbers look strange to you, you would like to view them in +their hexadecimal form:
+- 32 bits: 0 .. FFFFFFFF - - 64 bits: 0 .. FFFFFFFFFFFFFFFF-RRDtool handles both counters the same. If an overflow occurs and + - 64 bits: 0 .. FFFFFFFFFFFFFFFF
RRDtool handles both counters the same. If an overflow occurs and the delta would be negative, RRDtool first adds the maximum of a small counter + 1 to the delta. If the delta is still negative, it had to be the large counter that wrapped. Add the maximum possible value of the @@ -875,46 +898,46 @@ counter value for that to happen so chances are you would have several other problems as well and this particular problem would not even be worth thinking about. Even though I did include an example of it so you -can judge that for yourself.
-The next section gives you some numerical examples for counter-wraps. +can judge that for yourself.
+The next section gives you some numerical examples for counter-wraps. Try to do the calculations yourself or just believe me if your calculator -can't handle the numbers :)
-Correction numbers:
-+can't handle the numbers :) ++Correction numbers:
+- 32 bits: (4294967295+1) = 4294967296 - - 64 bits: (18446744073709551615+1)-correction1 = 18446744069414584320-+ - 64 bits: (18446744073709551615+1)-correction1 = 18446744069414584320+Before: 4294967200 Increase: 100 Should become: 4294967300 But really is: 4 Delta: -4294967196 - Correction1: -4294967196 +4294967296 = 100-+ Correction1: -4294967196 +4294967296 = 100+Before: 18446744073709551000 Increase: 800 Should become: 18446744073709551800 But really is: 184 Delta: -18446744073709550816 Correction1: -18446744073709550816 +4294967296 = -18446744069414583520 - Correction2: -18446744069414583520 +18446744069414584320 = 800-+ Correction2: -18446744069414583520 +18446744069414584320 = 800+Before: 18446744073709551615 ( maximum value ) Increase: 18446744069414584320 ( absurd increase, minimum for Should become: 36893488143124135935 this example to work ) But really is: 18446744069414584319 Delta: -4294967296 Correction1: -4294967296 + 4294967296 = 0 - (not negative -> no correction2)-+ (not negative -> no correction2)+Before: 18446744073709551615 ( maximum value ) Increase: 18446744069414584319 ( one less increase ) Should become: 36893488143124135934 But really is: 18446744069414584318 Delta: -4294967297 Correction1: -4294967297 +4294967296 = -1 - Correction2: -1 +18446744069414584320 = 18446744069414584319-As you can see from the last two examples, you need strange numbers + Correction2: -1 +18446744069414584320 = 18446744069414584319
As you can see from the last two examples, you need strange numbers for RRDtool to fail (provided it's bug free of course) so this should not happen. However, SNMP or whatever method you choose to collect the data might also report wrong numbers occasionally. We can't prevent all @@ -931,15 +954,16 @@ expect numbers to be higher than 230. Anything else, and there must have been an error. Remember: the opposite is not true, if the numbers pass this check it doesn't mean that they are correct. Always judge the -graph with a healthy dose of paranoia if it looks weird.
--
One important feature of RRDtool has not been explained yet: +graph with a healthy dose of paranoia if it looks weird.
++
+One important feature of RRDtool has not been explained yet: It is virtually impossible to collect the data and feed it into RRDtool on exact intervals. RRDtool therefore interpolates the data so it is on exact intervals. If you do not know what this means or how it works, -then here's the help you seek:
-Suppose a counter increases with exactly one for every second. You want +then here's the help you seek:
+Suppose a counter increases with exactly one for every second. You want to measure it in 300 seconds intervals. You should retrieve values that are exactly 300 apart. However, due to various circumstances you are a few seconds late and the interval is 303. The delta will also be @@ -949,31 +973,31 @@ would have been stored earlier and it will be 300 in 300 seconds. Next time you are at exactly the right time. This means that the current interval is 297 seconds and also the counter increased with 297. Again -RRDtool alters the value and stores 300 as it should be.
-- in the RDD in reality-
+RRDtool alters the value and stores 300 as it should be. +++ in the RDD in reality+time+000: 0 delta="U" time+000: 0 delta="U" time+300: 300 delta=300 time+300: 300 delta=300 time+600: 600 delta=300 time+603: 603 delta=303 - time+900: 900 delta=300 time+900: 900 delta=297-Let's create two identical databases. I've chosen the time range 920805000 -to 920805900 as this goes very well with the example numbers.
-+ time+900: 900 delta=300 time+900: 900 delta=297+Let's create two identical databases. I've chosen the time range 920805000 +to 920805900 as this goes very well with the example numbers.
+rrdtool create seconds1.rrd \ --start 920804700 \ DS:seconds:COUNTER:600:U:U \ - RRA:AVERAGE:0.5:1:24-+ RRA:AVERAGE:0.5:1:24+for Unix: cp seconds1.rrd seconds2.rrd for Dos: copy seconds1.rrd seconds2.rrd - for vms: how would I know :)-+ for vms: how would I know :)+rrdtool update seconds1.rrd \ 920805000:000 920805300:300 920805600:600 920805900:900 rrdtool update seconds2.rrd \ - 920805000:000 920805300:300 920805603:603 920805900:900-+ 920805000:000 920805300:300 920805603:603 920805900:900+rrdtool graph seconds1.gif \ --start 920804700 --end 920806200 \ --height 200 \ @@ -989,21 +1013,23 @@ DEF:seconds=seconds2.rrd:seconds:AVERAGE \ CDEF:unknown=seconds,UN \ LINE2:seconds#0000FF \ - AREA:unknown#FF0000-Both graphs should show the same.
--
-WRAPUP
-It's time to wrap up this document. You now know all the basics to be + AREA:unknown#FF0000
Both graphs should show the same.
++
+It's time to wrap up this document. You now know all the basics to be able to work with RRDtool and to read the documentation available. There is plenty more to discover about RRDtool and you will find more and more uses for the package. You could create easy graphics using just the examples provided and using only RRDtool. You could also use the front -ends that are available.
--
Remember to subscribe to the mailing-list. Even if you are not answering +ends that are available.
++
+Remember to subscribe to the mailing-list. Even if you are not answering the mails that come by, it helps both you and the rest. A lot of the stuff that I know about MRTG (and therefore about RRDtool) I've learned while just reading the list without posting to it. I did not need to ask the @@ -1011,21 +1037,23 @@ in various mails by other users. With thousands of users all over the world, there will always be people who ask questions that you can answer because you read this and other -documentation and they didn't.
--
The RRDtool manpages
--
I hope you enjoyed the examples and their descriptions. If you do, help +documentation and they didn't.
++
+The RRDtool manpages
++
+I hope you enjoyed the examples and their descriptions. If you do, help other people by pointing them to this document when they are asking basic questions. They will not only get their answer but at the same -time learn a whole lot more.
-Alex van den Bogaerdt -<alex at ergens.op.het.net>
+time learn a whole lot more. +Alex van den Bogaerdt +<alex at ergens.op.het.net>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdlast.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdlast.html (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdlast.html 2003-02-20 15:24:01.000000000 -0800 @@ -1,47 +1,54 @@ - - --
rrdtool last - Return the date of the last data sample in an RRD
--
rrdtool last filename
--
The last function returns the UNIX timestamp when the RRD was last -updated.
--
Russ Wright <rwwright at home.com>
++
+rrdtool last - Return the date of the last data sample in an RRD
++
+rrdtool last filename
++
+The last function returns the UNIX timestamp when the RRD was last +updated.
++
+Russ Wright <rwwright at home.com>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdfetch.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdfetch.txt (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdfetch.txt 2003-02-20 15:24:01.000000000 -0800 @@ -2,37 +2,37 @@ -NNNNAAAAMMMMEEEE +NNAAMMEE rrdtool fetch - fetch data from an rrd. -SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - rrrrrrrrddddttttoooooooollll ffffeeeettttcccchhhh _f_i_l_e_n_a_m_e _C_F [--------rrrreeeessssoooolllluuuuttttiiiioooonnnn|----rrrr _r_e_s_o_l_u_t_i_o_n] - [--------ssssttttaaaarrrrtttt|----ssss _s_t_a_r_t] [--------eeeennnndddd|----eeee _e_n_d] - -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - The ffffeeeettttcccchhhh function is normally used internally by the - graph function, to get data from RRRRRRRRDDDDs. ffffeeeettttcccchhhh will analyze - the RRRRRRRRDDDD and will try to retrieve the data in the resolu- +SSYYNNOOPPSSIISS + rrrrddttooooll ffeettcchh _f_i_l_e_n_a_m_e _C_F [----rreessoolluuttiioonn|--rr _r_e_s_o_l_u_t_i_o_n] + [----ssttaarrtt|--ss _s_t_a_r_t] [----eenndd|--ee _e_n_d] + +DDEESSCCRRIIPPTTIIOONN + The ffeettcchh function is normally used internally by the + graph function, to get data from RRRRDDs. ffeettcchh will analyze + the RRRRDD and will try to retrieve the data in the resolu- tion requested. The data fetched is printed to stdout. _*_U_N_K_N_O_W_N_* data is often represented by the string "NaN" depending on your OSs printf function. _f_i_l_e_n_a_m_e - the name of the RRRRRRRRDDDD you want to fetch the data + the name of the RRRRDD you want to fetch the data from. _C_F which consolidation function should have been applied to the data you want to fetch? (AVER- AGE,MIN,MAX,LAST) - --------rrrreeeessssoooolllluuuuttttiiiioooonnnn|----rrrr _r_e_s_o_l_u_t_i_o_n (default is the highest resolu- + ----rreessoolluuttiioonn|--rr _r_e_s_o_l_u_t_i_o_n (default is the highest resolu- tion) what interval should the values have (seconds per - value). rrrrrrrrddddffffeeeettttcccchhhh will try to match your request, + value). rrrrddffeettcchh will try to match your request, but it will return data even if no absolute match - is possible. NNNNBBBB.... See note below. + is possible. NNBB.. See note below. - --------ssssttttaaaarrrrtttt|----ssss _s_t_a_r_t (default end-1day) + ----ssttaarrtt|--ss _s_t_a_r_t (default end-1day) when should the data begin. A time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time. By @@ -41,16 +41,16 @@ detailed explanation on ways to specify start time. - --------eeeennnndddd|----eeee _e_n_d (default now) + ----eenndd|--ee _e_n_d (default now) when should the data end. Time in seconds since epoch. See also AT-STYLE TIME SPECIFICATION sec- tion for a detailed explanation of how to specify end time. - RRRREEEESSSSOOOOLLLLUUUUTTTTIIIIOOOONNNN IIIINNNNTTTTEEEERRRRVVVVAAAALLLL + RREESSOOLLUUTTIIOONN IINNTTEERRVVAALL In order to get rrdtool to fetch anything other than the - finest resolution RRA bbbbooootttthhhh the start and end time must be + finest resolution RRA bbootthh the start and end time must be specified on boundaries that are multiples of the wanted resolution. Consider the following example: @@ -72,7 +72,7 @@ rrdtool fetch subdata.rrd AVERAGE -r 900 -s -1h However, this will almost always result in a time series - that is NNNNOOOOTTTT in the 15 minute RRA. Therefore the highest + that is NNOOTT in the 15 minute RRA. Therefore the highest resolution RRA, i.e. 5 minute averages, will be chosen which, in this case, is not what you want. @@ -97,39 +97,38 @@ perl -e '$ctime = time; $rrdres = 900; system "rrdtool fetch subdata.rrd AVERAGE \ -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"' - - AAAATTTT----SSSSTTTTYYYYLLLLEEEE TTTTIIIIMMMMEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN + AATT--SSTTYYLLEE TTIIMMEE SSPPEECCIIFFIICCAATTIIOONN Apart from the traditional _S_e_c_o_n_d_s _s_i_n_c_e _e_p_o_c_h, rrdtool does also understand at-style time specification. The specification is called "at-style" after Unix command _a_t(1) that has moderately complex ways to specify time to run your job at. The at-style specification consists of - two parts: TTTTIIIIMMMMEEEE RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEE specification and TTTTIIIIMMMMEEEE OOOOFFFFFFFFSSSSEEEETTTT + two parts: TTIIMMEE RREEFFEERREENNCCEE specification and TTIIMMEE OOFFFFSSEETT specification. - TTTTIIIIMMMMEEEE RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN + TTIIMMEE RREEFFEERREENNCCEE SSPPEECCIIFFIICCAATTIIOONN Time reference specification is used, well,... to estab- lish a reference moment in time (for time offset to be applied to). When present, it should come first, when - omitted, it defaults to nnnnoooowwww. On its own part, time refer- + omitted, it defaults to nnooww. On its own part, time refer- ence consists of _t_i_m_e_-_o_f_-_d_a_y reference (which should come first, if present) and _d_a_y reference. - _T_i_m_e_-_o_f_-_d_a_y can be specified as HHHHHHHH::::MMMMMMMM, HHHHHHHH....MMMMMMMM, or just HHHHHHHH, - you can suffix it with aaaammmm or ppppmmmm or use 24-hours clock. The + _T_i_m_e_-_o_f_-_d_a_y can be specified as HHHH::MMMM, HHHH..MMMM, or just HHHH, + you can suffix it with aamm or ppmm or use 24-hours clock. The few special times of day are understood as well, these - include mmmmiiiiddddnnnniiiigggghhhhtttt (00:00), nnnnoooooooonnnn (12:00) and British tttteeeeaaaattttiiiimmmmeeee + include mmiiddnniigghhtt (00:00), nnoooonn (12:00) and British tteeaattiimmee (16:00). The _d_a_y can be specified as _m_o_n_t_h_-_n_a_m_e _d_a_y_-_o_f_-_t_h_e_-_m_o_n_t_h and optional 2- or 4-digit _y_e_a_r number (e.g. March 8 1999). Alternatively, you can use _d_a_y_-_o_f_-_w_e_e_k_-_n_a_m_e (e.g. - Monday), or one of the words: yyyyeeeesssstttteeeerrrrddddaaaayyyy, ttttooooddddaaaayyyy, ttttoooommmmoooorrrrrrrroooowwww. + Monday), or one of the words: yyeesstteerrddaayy, ttooddaayy, ttoommoorrrrooww. You can also specify _d_a_y as a full date in several numeri- - cal formats; these include: MMMMMMMM////DDDDDDDD////[[[[YYYYYYYY]]]]YYYYYYYY, DDDDDDDD....MMMMMMMM....[[[[YYYYYYYY]]]]YYYYYYYY, - YYYYYYYYYYYYYYYYMMMMMMMMDDDDDDDD. + cal formats; these include: MMMM//DDDD//[[YYYY]]YYYY, DDDD..MMMM..[[YYYY]]YYYY, + YYYYYYYYMMMMDDDD. _N_O_T_E_1: this is different from the original _a_t(1) behavior, which interprets a single-number date as MMDD[YY]YY. @@ -137,24 +136,24 @@ _N_O_T_E_2: if you specify _d_a_y this way, the _t_i_m_e_-_o_f_-_d_a_y is REQUIRED to be present. - Finally, you can use words nnnnoooowwww, ssssttttaaaarrrrtttt, or eeeennnndddd as your time - reference. NNNNoooowwww refers to the current moment (and is also a - default time reference). SSSSttttaaaarrrrtttt (eeeennnndddd) can be used to spec- + Finally, you can use words nnooww, ssttaarrtt, or eenndd as your time + reference. NNooww refers to the current moment (and is also a + default time reference). SSttaarrtt (eenndd) can be used to spec- ify time relative to the start (end) time for those tools that use these categories (rrdfetch, rrdgraph). Month and weekday names can be used in their naturally abbreviated form (e.g., Dec for December, Sun for Sunday, - etc.). The words nnnnoooowwww, ssssttttaaaarrrrtttt, eeeennnndddd can be abbreviated to nnnn, - ssss, eeee. + etc.). The words nnooww, ssttaarrtt, eenndd can be abbreviated to nn, + ss, ee. - TTTTIIIIMMMMEEEE OOOOFFFFFFFFSSSSEEEETTTT SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN + TTIIMMEE OOFFFFSSEETT SSPPEECCIIFFIICCAATTIIOONN Time offset specification is used to add (or subtract) certain time interval to (from) the time reference moment. - It consists of _s_i_g_n (++++ or ----) and _a_m_o_u_n_t. The following - time units can be used to specify the _a_m_o_u_n_t: yyyyeeeeaaaarrrrssss, - mmmmoooonnnntttthhhhssss, wwwweeeeeeeekkkkssss, ddddaaaayyyyssss, hhhhoooouuuurrrrssss, mmmmiiiinnnnuuuutttteeeessss, sssseeeeccccoooonnnnddddssss, these can be + It consists of _s_i_g_n (++ or --) and _a_m_o_u_n_t. The following + time units can be used to specify the _a_m_o_u_n_t: yyeeaarrss, + mmoonntthhss, wweeeekkss, ddaayyss, hhoouurrss, mmiinnuutteess, sseeccoonnddss, these can be used in singular or plural form, and abbreviated naturally or to a single letter (e.g. +3days, -1wk, -3y). Several time units can be combined together (e.g., -5mon1w2d), as @@ -190,21 +189,21 @@ '8:00 Mar 27 1999 +48 hours' = '9:00 Mar 29 1999', as expected) - _N_O_T_E_4: The single-letter abbreviation for both mmmmoooonnnntttthhhhssss and - mmmmiiiinnnnuuuutttteeeessss is mmmm. To disambiguate, the parser tries to read + _N_O_T_E_4: The single-letter abbreviation for both mmoonntthhss and + mmiinnuutteess is mm. To disambiguate, the parser tries to read your mind :) by applying the following two heuristics: - 1 If mmmm is used in context of (i.e. right after the) + 1 If mm is used in context of (i.e. right after the) years, months, weeks, or days it is assumed to mean - mmmmoooonnnntttthhhhssss, while in the context of hours, minutes, and - seconds it means minutes. (e.g., in -1y6m or +3w1m mmmm - means mmmmoooonnnntttthhhhssss, while in -3h20m or +5s2m mmmm means mmmmiiiinnnnuuuutttteeeessss) + mmoonntthhss, while in the context of hours, minutes, and + seconds it means minutes. (e.g., in -1y6m or +3w1m mm + means mmoonntthhss, while in -3h20m or +5s2m mm means mmiinnuutteess) - 2 Out of context (i.e. right after the ++++ or ---- sign) the - meaning of mmmm is guessed from the number it directly + 2 Out of context (i.e. right after the ++ or -- sign) the + meaning of mm is guessed from the number it directly follows. Currently, if the number absolute value is - below 25 it is assumed that mmmm means mmmmoooonnnntttthhhhssss, otherwise - it is treated as mmmmiiiinnnnuuuutttteeeessss. (e.g., -25m == -25 minutes, + below 25 it is assumed that mm means mmoonntthhss, otherwise + it is treated as mmiinnuutteess. (e.g., -25m == -25 minutes, while +24m == +24 months) _F_i_n_a_l _N_O_T_E_S: Time specification is case-insensitive. @@ -216,7 +215,7 @@ which also count as whitespace (e.g., midnight_Thu or mid- night,Thu) - TTTTIIIIMMMMEEEE SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS + TTIIMMEE SSPPEECCIIFFIICCAATTIIOONN EEXXAAMMPPLLEESS _O_c_t _1_2 -- October 12 this year @@ -245,9 +244,9 @@ _1_9_9_7_0_7_0_3 _1_2_:_4_5 -- 12:45 July 3th, 1997 (not quote stan- dard, but I love this ...) -AAAAUUUUTTTTHHHHOOOORRRR +AAUUTTHHOORR Tobias Oetiker-
rrdtool dump - dump the contents of an RRD to XML format
--
rrdtool dump filename.rrd > filename.xml
--
The dump function prints the contents of an RRD in human +
+
+rrdtool dump - dump the contents of an RRD to XML format
++
+rrdtool dump filename.rrd > filename.xml
++
+The dump function prints the contents of an RRD in human readable (?) XML format. This format can be read by rrdrestore. Together they allow you to transfer your files from one architecture -to another as well as manipulating the contents of an RRD file in a -somewhat more convenient manner.
--
Tobias Oetiker <oetiker at ee.ethz.ch>
+to another as well as manipulating the contents of an RRD file in a +somewhat more convenient manner. ++
+Tobias Oetiker <oetiker at ee.ethz.ch>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdinfo.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdinfo.txt (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdinfo.txt 2003-02-20 15:24:02.000000000 -0800 @@ -2,24 +2,24 @@ -NNNNAAAAMMMMEEEE +NNAAMMEE rrdtool info - extract header information from an rrd -SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - rrrrrrrrddddttttoooooooollll iiiinnnnffffoooo _f_i_l_e_n_a_m_e_._r_r_d +SSYYNNOOPPSSIISS + rrrrddttooooll iinnffoo _f_i_l_e_n_a_m_e_._r_r_d -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - The iiiinnnnffffoooo function prints the header information from an +DDEESSCCRRIIPPTTIIOONN + The iinnffoo function prints the header information from an rrd in a parsing friendly format. - Check the rrdcreate manpage if you are uncertain about the - meaning of the individual keys. + Check rrdcreate if you are uncertain about the meaning of + the individual keys. -EEEEXXXXAAAAMMMMPPPPLLLLEEEE - This is the output generated by running iiiinnnnffffoooo on a simple +EEXXAAMMPPLLEE + This is the output generated by running iinnffoo on a simple rrd which contains two datasources and one rra. Note that the number after the _l_a_s_t___u_p_d_a_t_e keyword is in seconds - since 1970. The string NNNNaaaaNNNN stands for _*_U_N_K_N_O_W_N_* data. In + since 1970. The string NNaaNN stands for _*_U_N_K_N_O_W_N_* data. In the example it means that this rrd has neither minimum not maximum values defined for either of its datasources. @@ -48,13 +48,12 @@ rra[0].cdp_prep[1].value = nan rra[0].cdp_prep[1].unknown_datapoints = 0 - _f_i_l_e_n_a_m_e_._r_r_d - The name of the RRRRRRRRDDDD you want to dump. + The name of the RRRRDD you want to dump. -AAAAUUUUTTTTHHHHOOOORRRR +AAUUTTHHOORR Tobias Oetiker-
rpntutorial - Reading RRDTtool RPN Expressions by Steve Rader
--
This tutorial should help you get to grips with rrdtool RPN expressions -as seen in CDEF arguments of rrdtool graph.
--
The LT, LE, GT, GE and EQ RPN logic operators are not as tricky as +
+
+rpntutorial - Reading RRDTtool RPN Expressions by Steve Rader
++
+This tutorial should help you get to grips with rrdtool RPN expressions +as seen in CDEF arguments of rrdtool graph.
++
+The LT, LE, GT, GE and EQ RPN logic operators are not as tricky as they appear. These operators act on the two values on the stack preceding them (to the left). Read these two values on the stack from left to right inserting the operator in the middle. If the resulting statement is true, the replace the three values from the stack with ``1''. If the statement if false, replace the three values -with ``0''.
-For example think about ``2,1,GT''. This RPN expression could be +with ``0''.
+For example think about ``2,1,GT''. This RPN expression could be read as ``is two greater than one?'' The answer to that question is ``true''. So the three values should be replaced with ``1''. Thus the -RPN expression 2,1,GT evaluates to 1.
-Now also consider ``2,1,LE''. This RPN expression could be read as ``is +RPN expression 2,1,GT evaluates to 1.
+Now also consider ``2,1,LE''. This RPN expression could be read as ``is two less than or equal to one?''. The natural response is ``no'' -and thus the RPN expression 2,1,LE evaluates to 0.
--
The IF RPN logic operator can be straightforward also. The key +and thus the RPN expression 2,1,LE evaluates to 0.
++
+The IF RPN logic operator can be straightforward also. The key to reading IF operators is to understand that the condition part of the traditional ``if X than Y else Z'' notation has *already* been evaluated. So the IF operator acts on only one value on the @@ -59,137 +64,141 @@ value to the left of the IF corresponds to the true (``Y'') branch. And the first value to the left of the IF corresponds to the false (``Z'') branch. Read the RPN expression ``X,Y,Z,IF'' from left to -right like so: ``if X then Y else Z''.
-For example, consider ``1,10,100,IF''. It looks bizzare to me. +right like so: ``if X then Y else Z''.
+For example, consider ``1,10,100,IF''. It looks bizzare to me. But when I read ``if 1 then 10 else 100'' it's crystal clear: 1 is true so the answer is 10. Note that only zero is false; all other values are true. ``2,20,200,IF'' (``if 2 then 20 else 200'') evaluates to 20. -And ``0,1,2,IF'' (``if 0 then 1 else 2) evaluates to 2.
-Notice that none of the above examples really simulate the whole +And ``0,1,2,IF'' (``if 0 then 1 else 2) evaluates to 2.
+Notice that none of the above examples really simulate the whole ``if X then Y else Z'' statement. This is because computer programmers read this statement as ``if Some Condition then Y else Z''. So it's important to be able to read IF operators along with the LT, LE, -GT, GE and EQ operators.
--
While compound expressions can look overly complex, they can be +GT, GE and EQ operators.
++
+While compound expressions can look overly complex, they can be considered elegantly simple. To quickly comprehend RPN expressions, you must know the the algorithm for evaluating RPN expressions: iterate searches from the left to the right looking for an operator, when it's found, apply that operator by popping the operator and some -number of values (and by definition, not operators) off the stack.
-For example, the stack ``1,2,3,+,+'' gets ``2,3,+'' evaluated (as ``2+3'') +number of values (and by definition, not operators) off the stack.
+For example, the stack ``1,2,3,+,+'' gets ``2,3,+'' evaluated (as ``2+3'') during the first iteration which is replaced by 5. This results in the stack ``1,5,+''. Finally, ``1,5,+'' is evaluated resulting in the answer 6. For convenience sake, it's useful to write this set of -operations as:
-+operations as: ++1) 1,2,3,+,+ eval is 2,3,+ = 5 result is 1,5,+ 2) 1,5,+ eval is 1,5,+ = 6 result is 6 - 3) 6-Let's use that notation to conviently solve some complex RPN expressions -with multiple logic operators:
-- 1) 20,10,GT,10,20,IF eval is 20,10,GT = 1 result is 1,10,20,IF-read the eval as pop ``20 is greater than 10'' so push 1 -
-- - 2) 1,10,20,IF eval is 1,10,20,IF = 10 result is 10-read pop ``if 1 then 10 else 20'' so push 10. Only 10 is left so -10 is the answer.
-Let's read a complex RPN expression that also has the traditional -multiplication operator:
-+ 3) 6+Let's use that notation to conviently solve some complex RPN expressions +with multiple logic operators:
++ 1) 20,10,GT,10,20,IF eval is 20,10,GT = 1 result is 1,10,20,IF+read the eval as pop ``20 is greater than 10'' so push 1 +
++ + 2) 1,10,20,IF eval is 1,10,20,IF = 10 result is 10+read pop ``if 1 then 10 else 20'' so push 10. Only 10 is left so +10 is the answer.
+Let's read a complex RPN expression that also has the traditional +multiplication operator:
+1) 128,8,*,7000,GT,7000,128,8,*,IF eval 128,8,* result is 1024 2) 1024,7000,GT,7000,128,8,*,IF eval 1024,7000,GT result is 0 3) 0,128,8,*,IF eval 128,8,* result is 1024 - 4) 0,7000,1024,IF result is 1024-Now let's go back to the first example of multiple logic operators -but replace the value 20 with the variable ``input'':
-- 1) input,10,GT,10,input,IF eval is input,10,GT result is A-Read eval as ``if input > 10 then true'' and replace ``input,10,GT'' + 4) 0,7000,1024,IF result is 1024
Now let's go back to the first example of multiple logic operators +but replace the value 20 with the variable ``input'':
++ 1) input,10,GT,10,input,IF eval is input,10,GT result is A+
Read eval as ``if input > 10 then true'' and replace ``input,10,GT'' with ``A: -
-+ ++- 2) A,10,input,IF eval is A,10,input,IF-read ``if A then 10 else input''. Now replace A it's verbose + 2) A,10,input,IF eval is A,10,input,IF
read ``if A then 10 else input''. Now replace A it's verbose description and--voila!--you have a easily readable description -of the expression:
-- if input > 10 then 10 else input-
Lastly, let's to back the first most complex example and replace -the value 128 with ``input'':
-- 1) input,8,*,7000,GT,7000,input,8,*,IF eval input,8,* result is A-
where A is ``input * 8''
-- 2) A,7000,GT,7000,input,8,*,IF eval is A,7000,GT result is B-
where B is ``if ((input * 8) > 7000) then true''
-- 3) B,7000,input,8,*,IF eval is input,8,* result is C-
where C is ``input * 8''
-- 4) B,7000,C,IF-
At last we have a readable decoding of the complex RPN expression with -a variable:
-- if ((input * 8) > 7000) then 7000 else (input * 8)-
-
Exercise 1:
-Compute ``3,2,*,1,+ and ''3,2,1,+,*`` by hand. Rewrite them in -traditional notation. Explain why they have different answers.
-Answer 1:
-+of the expression: +++ if input > 10 then 10 else input+Lastly, let's to back the first most complex example and replace +the value 128 with ``input'':
++ 1) input,8,*,7000,GT,7000,input,8,*,IF eval input,8,* result is A+where A is ``input * 8''
++ 2) A,7000,GT,7000,input,8,*,IF eval is A,7000,GT result is B+where B is ``if ((input * 8) > 7000) then true''
++ 3) B,7000,input,8,*,IF eval is input,8,* result is C+where C is ``input * 8''
++ 4) B,7000,C,IF+At last we have a readable decoding of the complex RPN expression with +a variable:
++ if ((input * 8) > 7000) then 7000 else (input * 8)++
+
+Exercises
+Exercise 1:
+Compute ``3,2,*,1,+ and ''3,2,1,+,*`` by hand. Rewrite them in +traditional notation. Explain why they have different answers.
+Answer 1:
+3*2+1 = 7 and 3*(2+1) = 9. These expressions have different answers because the altering of the plus and - times operators alter the order of their evaluation.-Exercise 2:
-One may be tempted to shorten the expression
-- input,8,*,56000,GT,56000,input,*,8,IF-by removing the redundant use of ``input,8,*'' like so:
-- input,56000,GT,56000,input,IF,8,*-Use tradition notation to show these expressions are not the same. + times operators alter the order of their evaluation.
Exercise 2:
+One may be tempted to shorten the expression
++ input,8,*,56000,GT,56000,input,*,8,IF+
by removing the redundant use of ``input,8,*'' like so:
++ input,56000,GT,56000,input,IF,8,*+
Use tradition notation to show these expressions are not the same. Write an expression that's equivalent to the first expression but -uses the LE and DIV operators.
-Answer 2:
-+uses the LE and DIV operators. ++Answer 2:
+if (input <= 56000/8 ) { input*8 } else { 56000 } - input,56000,8,DIV,LT,input,8,*,56000,IF-Exercise 3:
-Briefly explain why traditional mathematic notation requires the + input,56000,8,DIV,LT,input,8,*,56000,IF
Exercise 3:
+Briefly explain why traditional mathematic notation requires the use of parentheses. Explain why RPN notation does not require -the use of parentheses.
-Answer 3:
-+the use of parentheses. ++Answer 3:
+Traditional mathematic expressions are evaluated by doing multiplication and division first, then addition and subtraction. Perentences are used to force the evaluation of addition before multiplication (etc). RPN does not require parentheses because the ordering of objects on the stack - can force the evaluation of addition before multiplication.-Exercise 4:
-Explain why it is desirable for the RRDtool developers to implement -RPN notation instead of traditional mathematical notation.
-Answer 4:
-+ can force the evaluation of addition before multiplication.+Exercise 4:
+Explain why it is desirable for the RRDtool developers to implement +RPN notation instead of traditional mathematical notation.
+Answer 4:
+The algorithm that implements traditional mathematical notation is more complex then algorithm used for RPN. So implementing RPN allowed Tobias Oetiker to write less code! (The code is also less complex and therefore less - likely to have bugs.)--
-AUTHOR
-steve rader <rader at wiscnet.net>
+ likely to have bugs.)
+
+steve rader <rader at wiscnet.net> +
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdxport.html ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdxport.html (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdxport.html 2003-02-20 15:24:02.000000000 -0800 @@ -1,111 +1,130 @@ - - --
rrdtool xport - Export data in XML format based on data from one or several RRD
--
rrdtool xport -[-s|--start seconds] -[-e|--end seconds] -[-m|--maxrows rows] -[--step value] -[DEF:vname=rrd:ds-name:CF] -[CDEF:vname=rpn-expression] -[XPORT:vname[:legend]]
--
The xport functions main purpose is to write XML formatted -representation of the data stored in one or several RRDs. It -can also extract numerical reports.
-If no XPORT statements are found, there will be no output.
-+
+rrdtool xport - Export data in XML format based on data from one or several RRD
++
+rrdtool xport +[-s|--start seconds] +[-e|--end seconds] +[-m|--maxrows rows] +[--step value] +[DEF:vname=rrd:ds-name:CF] +[CDEF:vname=rpn-expression] +[XPORT:vname[:legend]]
++
+The xport functions main purpose is to write XML formatted +representation of the data stored in one or several RRDs. It +can also extract numerical reports.
+If no XPORT statements are found, there will be no output.
+-
The output is enclosed in a xport element and contains two -blocks. The first block is enclosed by a meta element and +
+
+The output is enclosed in a xport element and contains two +blocks. The first block is enclosed by a meta element and contains some meta data. The second block is enclosed by a -data element and contains the data rows.
-Let's assume that the xport command looks like this:
-+data element and contains the data rows. ++Let's assume that the xport command looks like this:
+rrdtool xport \ --start now-1h --end now \ DEF:xx=host-inout.lo.rrd:output:AVERAGE \ DEF:yy=host-inout.lo.rrd:input:AVERAGE \ CDEF:aa=xx,yy,+,8,* \ XPORT:xx:"out bytes" \ - XPORT:aa:"in and out bits"-The resulting meta data section (the values will depend on the + XPORT:aa:"in and out bits"
The resulting meta data section (the values will depend on the RRD characteristics): -
-+ ++<meta> <start>1020611700</start> @@ -117,11 +136,11 @@ <entry>out bytes</entry> <entry>in and out bits</entry> </legend> - </meta>-+ </meta>+-The resulting data section:-+The resulting data section:+<data> <row><t>1020611700</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row> <row><t>1020612000</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row> @@ -137,30 +156,35 @@ <row><t>1020615000</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row> <row><t>1020615300</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row> <row><t>1020615600</t><v>NaN</v><v>NaN</v></row> - </data>--
-EXAMPLE 1
-+ </data>++
+
+EXAMPLE 1
+rrdtool xport \ DEF:out=if1-inouts.rrd:outoctets:AVERAGE \ - XPORT:out:"out bytes"--
-EXAMPLE 2
-+ XPORT:out:"out bytes"++
+
+EXAMPLE 2
+rrdtool xport \ DEF:out1=if1-inouts.rrd:outoctets:AVERAGE \ DEF:out2=if2-inouts.rrd:outoctets:AVERAGE \ CDEF:sum=out1,out2,+ \ XPORT:out1:"if1 out bytes" \ XPORT:out2:"if2 out bytes" \ - XPORT:sum:"output sum"--
-AUTHOR
-Tobias Oetiker <oetiker at ee.ethz.ch>
+ XPORT:sum:"output sum"
+
+Tobias Oetiker <oetiker at ee.ethz.ch> - +
- + + + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/rrdgraph.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/rrdgraph.txt (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/rrdgraph.txt 2003-02-20 15:24:02.000000000 -0800 @@ -2,40 +2,42 @@ -NNNNAAAAMMMMEEEE +NNAAMMEE rrdtool graph - Create a graph based on data from one or several RRD -SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - rrrrrrrrddddttttoooooooollll ggggrrrraaaapppphhhh _f_i_l_e_n_a_m_e [----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s] [----eeee|--------eeeennnndddd _s_e_c_- - _o_n_d_s] [----xxxx|--------xxxx----ggggrrrriiiidddd _x_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l] [----yyyy|--------yyyy----ggggrrrriiiidddd _y_- - _a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l] [--------aaaalllltttt----yyyy----ggggrrrriiiidddd] [--------aaaalllltttt----yyyy----mmmmrrrrttttgggg] [--------aaaalllltttt---- - aaaauuuuttttoooossssccccaaaalllleeee] [--------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee----mmmmaaaaxxxx] [--------uuuunnnniiiittttssss----eeeexxxxppppoooonnnneeeennnntttt] - _v_a_l_u_e]> [----vvvv|--------vvvveeeerrrrttttiiiiccccaaaallll----llllaaaabbbbeeeellll _t_e_x_t] [----wwww|--------wwwwiiiiddddtttthhhh _p_i_x_e_l_s] - [----hhhh|--------hhhheeeeiiiigggghhhhtttt _p_i_x_e_l_s] [----iiii|--------iiiinnnntttteeeerrrrllllaaaacccceeeedddd] [----ffff|--------iiiimmmmggggiiiinnnnffffoooo _f_o_r_- - _m_a_t_s_t_r_i_n_g] [----aaaa|--------iiiimmmmggggffffoooorrrrmmmmaaaatttt GGGGIIIIFFFF|PPPPNNNNGGGG|GGGGDDDD] [----BBBB|--------bbbbaaaacccckkkk---- - ggggrrrroooouuuunnnndddd _v_a_l_u_e] [----OOOO|--------oooovvvveeeerrrrllllaaaayyyy _v_a_l_u_e] [----UUUU|--------uuuunnnniiiitttt _v_a_l_u_e] - [----zzzz|--------llllaaaazzzzyyyy] [----oooo|--------llllooooggggaaaarrrriiiitttthhhhmmmmiiiicccc] [----uuuu|--------uuuuppppppppeeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e] - [----llll|--------lllloooowwwweeeerrrr----lllliiiimmmmiiiitttt _v_a_l_u_e] [----gggg|--------nnnnoooo----lllleeeeggggeeeennnndddd] [----rrrr|--------rrrriiiiggggiiiidddd] - [--------sssstttteeeepppp _v_a_l_u_e] [----bbbb|--------bbbbaaaasssseeee _v_a_l_u_e] [----cccc|--------ccccoooolllloooorrrr _C_O_L_- - _O_R_T_A_G####_r_r_g_g_b_b] [----tttt|--------ttttiiiittttlllleeee _t_i_t_l_e] [DDDDEEEEFFFF::::_v_n_a_m_e====_r_r_d::::_d_s_- - _n_a_m_e::::_C_F] [CCCCDDDDEEEEFFFF::::_v_n_a_m_e====_r_p_n_-_e_x_p_r_e_s_s_i_o_n] [PPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_- - _m_a_t] [GGGGPPPPRRRRIIIINNNNTTTT::::_v_n_a_m_e::::_C_F::::_f_o_r_m_a_t] [CCCCOOOOMMMMMMMMEEEENNNNTTTT::::_t_e_x_t] - [HHHHRRRRUUUULLLLEEEE::::_v_a_l_u_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] [VVVVRRRRUUUULLLLEEEE::::_t_i_m_e####_r_r_g_g_b_b[::::_l_e_g_e_n_d]] - [LLLLIIIINNNNEEEE{1111|2222|3333}::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]]] - [AAAARRRREEEEAAAA::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_e_n_d]]] [SSSSTTTTAAAACCCCKKKK::::_v_n_a_m_e[####_r_r_g_g_b_b[::::_l_e_g_- +SSYYNNOOPPSSIISS + rrrrddttooooll ggrraapphh _f_i_l_e_n_a_m_e [--ss|----ssttaarrtt _s_e_c_o_n_d_s] [--ee|----eenndd _s_e_c_- + _o_n_d_s] [--xx|----xx--ggrriidd _x_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l] + [--yy|----yy--ggrriidd _y_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l] [--YY|----aalltt--yy--ggrriidd] + [--RR|----aalltt--yy--mmrrttgg] [--AA|----aalltt--aauuttoossccaallee] + [--MM|----aalltt--aauuttoossccaallee--mmaaxx] [--NN|----nnoo--mmiinnoorr] [--XX|----uunniittss--eexxppoo-- + nneenntt] _v_a_l_u_e]> [--vv|----vveerrttiiccaall--llaabbeell _t_e_x_t] [--ww|----wwiiddtthh _p_i_x_- + _e_l_s] [--hh|----hheeiigghhtt _p_i_x_e_l_s] [--ii|----iinntteerrllaacceedd] + [--ff|----iimmggiinnffoo _f_o_r_m_a_t_s_t_r_i_n_g] [--aa|----iimmggffoorrmmaatt GGIIFF|PPNNGG|GGDD] + [--BB|----bbaacckkggrroouunndd _v_a_l_u_e] [--OO|----oovveerrllaayy _v_a_l_u_e] + [--UU|----uunniitt _v_a_l_u_e] [--zz|----llaazzyy] [--oo|----llooggaarriitthhmmiicc] + [--uu|----uuppppeerr--lliimmiitt _v_a_l_u_e] [--ll|----lloowweerr--lliimmiitt _v_a_l_u_e] + [--gg|----nnoo--lleeggeenndd] [--rr|----rriiggiidd] [--SS|----sstteepp _v_a_l_u_e] + [--bb|----bbaassee _v_a_l_u_e] [--cc|----ccoolloorr _C_O_L_O_R_T_A_G##_r_r_g_g_b_b] + [--tt|----ttiittllee _t_i_t_l_e] [DDEEFF::_v_n_a_m_e==_r_r_d::_d_s_-_n_a_m_e::_C_F] + [CCDDEEFF::_v_n_a_m_e==_r_p_n_-_e_x_p_r_e_s_s_i_o_n] [PPRRIINNTT::_v_n_a_m_e::_C_F::_f_o_r_m_a_t] + [GGPPRRIINNTT::_v_n_a_m_e::_C_F::_f_o_r_m_a_t] [CCOOMMMMEENNTT::_t_e_x_t] + [HHRRUULLEE::_v_a_l_u_e##_r_r_g_g_b_b[::_l_e_g_e_n_d]] [VVRRUULLEE::_t_i_m_e##_r_r_g_g_b_b[::_l_e_g_e_n_d]] + [LLIINNEE{11|22|33}::_v_n_a_m_e[##_r_r_g_g_b_b[::_l_e_g_e_n_d]]] + [AARREEAA::_v_n_a_m_e[##_r_r_g_g_b_b[::_l_e_g_e_n_d]]] [SSTTAACCKK::_v_n_a_m_e[##_r_r_g_g_b_b[::_l_e_g_- _e_n_d]]] -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - The ggggrrrraaaapppphhhh functions main purpose is to create graphical - representations of the data stored in one or several RRRRRRRRDDDDs. +DDEESSCCRRIIPPTTIIOONN + The ggrraapphh functions main purpose is to create graphical + representations of the data stored in one or several RRRRDDs. Apart from generating graphs, it can also extract numeri- cal reports. _f_i_l_e_n_a_m_e - The name of the graph to generate. Since rrrrrrrrddddttttoooooooollll out- + The name of the graph to generate. Since rrrrddttooooll out- puts GIFs and PNGs, it's recommended that the filename - end in either _._g_i_f or _._p_n_g. rrrrrrrrddddttttoooooooollll does not enforce + end in either _._g_i_f or _._p_n_g. rrrrddttooooll does not enforce this, however. If the _f_i_l_e_n_a_m_e is set to '-' the image file will be written to standard out. All other output will get suppressed. @@ -47,7 +49,7 @@ If no graph functions are called, the graph will not be created. - ----ssss|--------ssssttttaaaarrrrtttt _s_e_c_o_n_d_s (default end-1day) + --ss|----ssttaarrtt _s_e_c_o_n_d_s (default end-1day) The time when the graph should begin. Time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time. By default one day @@ -55,27 +57,27 @@ SPECIFICATION section in the _r_r_d_f_e_t_c_h documentation for a detailed explanation on how to specify time. - ----eeee|--------eeeennnndddd _s_e_c_o_n_d_s (default now) + --ee|----eenndd _s_e_c_o_n_d_s (default now) The time when the graph should end. Time in seconds since epoch. See also AT-STYLE TIME SPECIFICATION section in the _r_r_d_f_e_t_c_h documentation for a detailed explanation of ways to specify time. - ----xxxx|--------xxxx----ggggrrrriiiidddd _x_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l (default autoconfigure) + --xx|----xx--ggrriidd _x_-_a_x_i_s _g_r_i_d _a_n_d _l_a_b_e_l (default autoconfigure) The x-axis label is quite complex to configure. So if you don't have very special needs, you can rely on the autoconfiguration to get this right. If you want no x-grid at all, use the magic setting - nnnnoooonnnneeee. + nnoonnee. The x-axis label and grid can be configured, using the following format: - _G_T_M::::_G_S_T::::_M_T_M::::_M_S_T::::_L_T_M:_L_S_T::::_L_P_R::::_L_F_M + _G_T_M::_G_S_T::_M_T_M::_M_S_T::_L_T_M:_L_S_T::_L_P_R::_L_F_M - You have to configure three elements making up the x- - axis labels and grid. The base grid (_G_?_?), the major + You have to configure three elements making up the + x-axis labels and grid. The base grid (_G_?_?), the major grid (_M_?_?) and the labels (_L_?_?). The configuration is based on the idea that you first specify a well known amount of time (_?_T_M) and then say how many times it @@ -86,7 +88,7 @@ (_L_F_M). The _?_T_M elements must be one of the following key- - words: SSSSEEEECCCCOOOONNNNDDDD, MMMMIIIINNNNUUUUTTTTEEEE, HHHHOOOOUUUURRRR, DDDDAAAAYYYY, WWWWEEEEEEEEKKKK, MMMMOOOONNNNTTTTHHHH or YYYYEEEEAAAARRRR. + words: SSEECCOONNDD, MMIINNUUTTEE, HHOOUURR, DDAAYY, WWEEEEKK, MMOONNTTHH or YYEEAARR. If you wanted a graph with a base grid every 10 min- utes and a major one every hour, with labels every @@ -108,42 +110,45 @@ the locale you prefere prior to calling the graph function. - ----yyyy|--------yyyy----ggggrrrriiiidddd _g_r_i_d _s_t_e_p:_l_a_b_e_l _f_a_c_t_o_r (default autoconfigure) + --yy|----yy--ggrriidd _g_r_i_d _s_t_e_p:_l_a_b_e_l _f_a_c_t_o_r (default autoconfigure) Makes vertical grid lines appear at _g_r_i_d _s_t_e_p inter- val. Every _l_a_b_e_l _f_a_c_t_o_r gridstep, a major grid line is printed, along with label showing the value of the grid line. If you want no y-grid at all set specify the magic - word nnnnoooonnnneeee. + word nnoonnee. - --------aaaalllltttt----yyyy----ggggrrrriiiidddd + --YY|----aalltt--yy--ggrriidd Place Y grid dynamically based on graph Y range. Algo- rithm ensures that you always have grid, that there are enough but not too many grid lines and the grid is metric. That is grid lines are placed every 1, 2, 5 or 10 units. (contributed by Sasha Mikheev) - --------aaaalllltttt----yyyy----mmmmrrrrttttgggg - Y grid placed on graph Y range mimmics mrtg's (rateup- - generated) graphs. Currently axis is split into 4 - parts, just as rateup does. + ----nnoo--mmiinnoorr + Turn off the minor grid lines. This is partcularly + useful for small graphs which can be cluttered with + the minor grid lines. (contributed by Travis Brown) + + --RR|----aalltt--yy--mmrrttgg + Y grid placed on graph Y range mimmics mrtg's + (rateup-generated) graphs. Currently axis is split + into 4 parts, just as rateup does. - - - --------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee + --AA|----aalltt--aauuttoossccaallee Compute Y range based on function absolute minimum and maximum values. Default algorithm uses predefined set of ranges. This is good in many cases but it fails miserably when you need to graph something like - 260 + 0.001 * _s_i_n(x). Default algorithm will use Y + 260 + 0.001 * sin(x). Default algorithm will use Y range from 250 to 300 and on the graph you will see almost straight line. With --alt-autoscale Y range will be from slightly less the 260 - 0.001 to slightly more then 260 + 0.001 and periodic behavior will be seen. (contributed by Sasha Mikheev) - --------aaaalllltttt----aaaauuuuttttoooossssccccaaaalllleeee----mmmmaaaaxxxx + --MM|----aalltt--aauuttoossccaallee--mmaaxx Where --alt-autoscale will modify both the absolute maximum AND minimum values, this option will only affect the maximum value. The minimum value, if not @@ -152,7 +157,7 @@ WAN line uses compression, and thus the throughput may be higher than the WAN line speed. - --------uuuunnnniiiittttssss----eeeexxxxppppoooonnnneeeennnntttt _v_a_l_u_e (default autoconfigure) + --XX|----uunniittss--eexxppoonneenntt _v_a_l_u_e (default autoconfigure) This sets the 10**exponent scaling of the y-axis val- ues. Normally values will be scaled to the appropri- ate units (k, M, etc.). However you may wish to dis- @@ -166,19 +171,19 @@ lionths). Use a value of 0 to prevent any scaling of the y-axis values. - ----vvvv|--------vvvveeeerrrrttttiiiiccccaaaallll----llllaaaabbbbeeeellll _t_e_x_t + --vv|----vveerrttiiccaall--llaabbeell _t_e_x_t vertical label on the left side of the graph. This is normally used to specify the units used. - ----wwww|--------wwwwiiiiddddtttthhhh _p_i_x_e_l_s (default 400 pixel) + --ww|----wwiiddtthh _p_i_x_e_l_s (default 400 pixel) Width of the drawing area within the graph. This affects the size of the gif. - ----hhhh|--------hhhheeeeiiiigggghhhhtttt _p_i_x_e_l_s (default 100 pixel) + --hh|----hheeiigghhtt _p_i_x_e_l_s (default 100 pixel) Width of the drawing area within the graph. This affects the size of the gif. - ----iiii|--------iiiinnnntttteeeerrrrllllaaaacccceeeedddd (default: false) + --ii|----iinntteerrllaacceedd (default: false) If you set this option, then the resulting GIF will be interlaced. Most web browsers display these incremen- tally as they load. If you do not use this option, the @@ -187,110 +192,109 @@ GIF on disk. It makes no changes to the layout or con- tents of the graph. - ----ffff|--------iiiimmmmggggiiiinnnnffffoooo _f_o_r_m_a_t_s_t_r_i_n_g + --ff|----iimmggiinnffoo _f_o_r_m_a_t_s_t_r_i_n_g After the image has been created, the graph function uses printf together with this format string to create output similar to the PRINT function, only that the printf is supplied with the parameters _f_i_l_e_n_a_m_e, _x_s_i_z_e - and _y_s_i_z_e. In order to generate an IIIIMMMMGGGG tag suitable + and _y_s_i_z_e. In order to generate an IIMMGG tag suitable for including the graph into a web page, the command line would look like this: --imginfo '-
rrdtool - round robin database tool
--
rrdtool - | function
--
-
It is pretty easy to gather status information from all sorts of +
+
+rrdtool - round robin database tool
++
+rrdtool - | function
++
++
+It is pretty easy to gather status information from all sorts of things, ranging from the temperature in your office to the number of octets which have passed through the FDDI interface of your router. But it is not so trivial to store this data in a efficient and -systematic manner. This is where rrdtool kicks in. It lets you -log and analyze the data you gather from all kinds of data-sources -(DS). The data analysis part of rrdtool is based on the ability to +systematic manner. This is where rrdtool kicks in. It lets you +log and analyze the data you gather from all kinds of data-sources +(DS). The data analysis part of rrdtool is based on the ability to quickly generate graphical representations of the data values -collected over a definable time period.
-In this man page you will find general information on the design and +collected over a definable time period.
+In this man page you will find general information on the design and functionality of the Round Robin Database Tool (rrdtool). For a more detailed description of how to use the individual functions of the -rrdtool check the corresponding man page.
-For an introduction to the usage of rrdtool make sure you check the rrdtutorial manpage.
--
While the man pages talk of command line switches you have to set in -order to make rrdtool work it is important to note that the -rrdtool can be 'remote controlled' through a set of pipes. This +rrdtool check the corresponding man page.
+For an introduction to the usage of rrdtool make sure you check the rrdtutorial manpage.
++
+While the man pages talk of command line switches you have to set in +order to make rrdtool work it is important to note that the +rrdtool can be 'remote controlled' through a set of pipes. This saves a considerable amount of startup time when you plan to make -rrdtool do a lot of things quickly. Check the section on Remote Control further down. There is also a number of language bindings +rrdtool do a lot of things quickly. Check the section on Remote Control further down. There is also a number of language bindings for rrdtool which allow you to use it directly from perl, python, tcl, -php, ...
--
+
+It works like this: If you want to store 1000 values in 5 minute -interval, rrdtool will allocate space for 1000 data values and a +
It works like this: If you want to store 1000 values in 5 minute +interval, rrdtool will allocate space for 1000 data values and a header area. In the header it will store a pointer telling which one of the values in the storage area was last written to. New values are written to the Round Robin Archive in a ... you guess it ... round robin manner. This automatically limits the history to the last -1000 values. Because you can define several RRAs within a single RRD, +1000 values. Because you can define several RRAs within a single RRD, you can setup another one, storing 750 data values at a 2 hour interval and thus keeping a log for the last two months although at a lower -resolution.
-The use of RRAs guarantees that the RRD does not grow over +resolution.
+The use of RRAs guarantees that the RRD does not grow over time and that old data is automatically eliminated. By using the consolidation feature, you can still keep data for a very long time, while gradually reducing the resolution of the data along the time -axis. Using different consolidation functions (CF) allows you to +axis. Using different consolidation functions (CF) allows you to store exactly the type of information that actually interests you. (Maximum one minute traffic on the LAN, minimum temperature of -the wine cellar, total minutes down time ...)
- --
When you start rrdtool with the command line option '-', it waits +
+
+When you start rrdtool with the command line option '-', it waits
for input via standard in. With this feature you can improve
-performance by attaching rrdtool to another process (mrtg is one
-example) through a set of pipes. Over the pipes rrdtool accepts the
+performance by attaching rrdtool to another process (mrtg is one
+example) through a set of pipes. Over the pipes rrdtool accepts the
same arguments as on the command line. When a command is completed,
-rrdtool will print the string 'OK', followed by timing information of
-the form u:usertime s:systemtime both values are running
+rrdtool will print the string 'OK', followed by timing information of
+the form u:usertime s:systemtime both values are running
totals of seconds since rrdtool was started. If an error occurs, a line
-of the form 'ERROR: Description of error' will be printed. rrdtool
-will not abort if possible, but follow the ERROR line with an OK line.
-
rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport
--
Bugs ? Features !
--
Tobias Oetiker <oetiker at ee.ethz.ch>
+of the form 'ERROR: Description of error' will be printed. rrdtool
+will not abort if possible, but follow the ERROR line with an OK line.
++
+rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport
++
+Bugs ? Features !
++
+Tobias Oetiker <oetiker at ee.ethz.ch>
- + - + Modified: trunk/orca/packages/rrdtool-1.0.41/doc/RRDs.txt ============================================================================== --- trunk/orca/packages/rrdtool-1.0.40/doc/RRDs.txt (original) +++ trunk/orca/packages/rrdtool-1.0.41/doc/RRDs.txt 2003-02-20 15:24:02.000000000 -0800 @@ -2,10 +2,10 @@ -NNNNAAAAMMMMEEEE +NNAAMMEE RRDs - Access rrdtool as a shared module -SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS +SSYYNNOOPPSSIISS use RRDs; RRDs::error RRDs::last ... @@ -16,9 +16,8 @@ RRDs::fetch ... RRDs::tune ... - -DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee +DDEESSCCRRIIPPTTIIOONN + CCaalllliinngg SSeeqquueennccee This module accesses rrdtool functionality directly from within perl. The arguments to the functions listed in the @@ -37,7 +36,7 @@ is also valid. - EEEErrrrrrrroooorrrr HHHHaaaannnnddddlllliiiinnnngggg + EErrrroorr HHaannddlliinngg The RRD functions will not abort your program even when they can not make sense out of the arguments you fed them. @@ -52,18 +51,17 @@ my $ERR=RRDs::error; die "ERROR while updating mydemo.rrd: $ERR\n" if $ERR; - - RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss + RReettuurrnn VVaalluueess The functions RRDs::last, RRDs::graph, RRDs::info and RRDs::fetch return their findings. - RRRRRRRRDDDDssss::::::::llllaaaasssstttt returns a single INTEGER representing the last + RRRRDDss::::llaasstt returns a single INTEGER representing the last update time. $lastupdate = RRDs::last ... - RRRRRRRRDDDDssss::::::::ggggrrrraaaapppphhhh returns an pointer to an ARRAY containing the + RRRRDDss::::ggrraapphh returns an pointer to an ARRAY containing the x-size and y-size of the created gif and results of the PRINT arguments. @@ -71,7 +69,7 @@ print "Gifsize: ${xsize}x${ysize}\n"; print "Averages: ", (join ", ", @$averages); - RRRRRRRRDDDDssss::::::::iiiinnnnffffoooo returns a pointer to a hash. The keys of the + RRRRDDss::::iinnffoo returns a pointer to a hash. The keys of the hash represent the property names of the rrd and the val- ues of the hash are the values of the properties. @@ -80,7 +78,7 @@ print "$key = $$hash{$key}\n"; } - RRRRRRRRDDDDssss::::::::ffffeeeettttcccchhhh is the most complex of the pack regarding + RRRRDDss::::ffeettcchh is the most complex of the pack regarding return values. There are 4 values. Two normal integers, a pointer to an array and a pointer to a array of pointers. @@ -102,7 +100,7 @@ See the examples directory for more ways to use this extension. -NNNNOOOOTTTTEEEE +NNOOTTEE If you are manipulating the TZ variable you should also call the posixs function tzset to initialize all internal state of the library for properly operating in the time- @@ -112,10 +110,9 @@ $ENV{TZ} = 'CET'; POSIX::tzset(); - -AAAAUUUUTTTTHHHHOOOORRRR +AAUUTTHHOORR Tobias Oetiker