Code

added v-interface example
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sat, 4 Oct 2008 22:35:49 +0000 (22:35 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sat, 4 Oct 2008 22:35:49 +0000 (22:35 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1577 a5681a0c-68f1-0310-ab6d-d61299d08faa

tutorial/lisa2008/rrd-by-example/body.tex
tutorial/lisa2008/rrd-by-example/ex/v-interfaces.pl [new file with mode: 0644]
tutorial/lisa2008/rrd-by-example/ex/v-interfaces.txt [new file with mode: 0644]

index 6229a87de717f97293f9bde0310f92d3f3a6d328..461a7d5c0e847b3c1f24d9ac451ab4bf8758870f 100644 (file)
@@ -759,11 +759,37 @@ LINE1:pred#0a0:Prediction
 \addgraph{HW-p48-a0_03-b0_001}
 \end{frame}
 
-\begin{frame}{hw demo: tuning II}
+\begin{frame}{hw demo: tuning III}
 \addgraph{HW-p48-a0_03-b0_001}\\
 \addgraph{HW-p48-a0_03-b0_1}
 \end{frame}
 
+\newpage
+
+\section{The *v Interfaces}
+
+\begin{frame}{graphv script}
+\lstinputlisting{ex/v-interfaces.pl}
+\end{frame}
+
+\begin{frame}{graphv output}
+\lstinputlisting{ex/v-interfaces.txt}
+\end{frame}
+
+\mode<article>{The image key only shows up when the graph file name is '-'.}
+
+\begin{frame}{v-interfaces}
+\begin{itemize}
+\item rrdtool info
+\item rrdtool update\textbf{v}
+\item rrdtool graph\textbf{v}
+\end{itemize}
+\end{frame}
+
+\mode<article>{Using the output of updatev is much more efficient than
+re-reading the rrd file after running normal update against them.}
+
+\newpage  
 \section{Real Live Example}
 
 \mode<article>{The following example shows how to create a simple
diff --git a/tutorial/lisa2008/rrd-by-example/ex/v-interfaces.pl b/tutorial/lisa2008/rrd-by-example/ex/v-interfaces.pl
new file mode 100644 (file)
index 0000000..0dcdc0a
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/perl -w
+use strict;
+use lib qw( /scratch/rrd4/lib/perl );
+use RRDs;
+my $out = RRDs::graphv(
+     '-', '--start' => '00:00 20080916',
+     '--end' => 'start+8d',
+     '--lower-limit' => 0,
+     '--imgformat' => 'PDF',
+     'DEF:a=hw-demo.rrd:in:AVERAGE',
+     'LINE1:a#c00:InOctets');
+my $ERROR = RRDs::error;
+die "ERROR: $ERROR\n" if $ERROR;
+map { 
+    print $_.' = '.substr($out->{$_},0,8)."\n" 
+} sort keys %$out;
diff --git a/tutorial/lisa2008/rrd-by-example/ex/v-interfaces.txt b/tutorial/lisa2008/rrd-by-example/ex/v-interfaces.txt
new file mode 100644 (file)
index 0000000..452a466
--- /dev/null
@@ -0,0 +1,9 @@
+graph_height = 100
+graph_left = 51
+graph_top = 22
+graph_width = 400
+image = %PDF-1.4
+image_height = 163
+image_width = 481
+value_max = 60000000
+value_min = 0