<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
I am trying to get my first RDD database going.<br>
I think that I understand the doc/tutorial, so tried a really simple
example.<br>
<br>
The database:<br>
<blockquote><tt>rrdtool create test.rrd --start N --step 5
DS:value:GAUGE:5:-1:101 RRA:AVERAGE:0.5:1:12</tt><br>
</blockquote>
What I think this does:<br>
<ul>
<li>Creates a database called test.rrd (it does).</li>
<li>Has a step time of 5 seconds (don't want to wait forever to
see data).</li>
<li>Starts from "now".</li>
<li>Has a single data source called "value", which is a GUAGE
(keeps the value presented)</li>
<li>Data must be greater than -1 and less than 101<br>
</li>
<li>Has a single value stored, which is the AVERAGE of one
"record", so will be equivalent to the value stored.</li>
<li>Keeps 12 x 5 = 60 seconds of data.</li>
</ul>
My data producer:<br>
<blockquote><tt>#!/usr/bin/perl<br>
<br>
my $random_number;<br>
<br>
while (sleep(5)) {<br>
$random_number = rand(100);<br>
print "Adding $random_number\n";<br>
@cmd = ("rrdtool", "update", "test.rrd",
"N:$random_number");<br>
system(@cmd) == 0 or die "Failed: $?";<br>
}</tt><br>
</blockquote>
Once every 5 seconds call "rddtool update test.rrd N:<random
number in range 0 to 100>"<br>
<br>
The database does change after each update.<br>
<br>
My graph:<br>
<blockquote><tt>rrdtool graph mygraph.png -a PNG --start -240
--title="Test" --vertical-label="Random"\<br>
'DEF:v1=test.rrd:value:AVERAGE' 'LINE1:v1#0400ff:Rnd Value'</tt><br>
</blockquote>
What it produces:<br>
<br>
<img src="cid:part1.05070508.03010800@vogon.net" alt=""><br>
<br>
Database doesn't seem to be getting the values:<br>
<blockquote><tt>$ rrdtool fetch test.rrd AVERAGE -s -30 <br>
value<br>
<br>
1282069345: nan<br>
1282069350: nan<br>
1282069355: nan<br>
1282069360: nan<br>
1282069365: nan<br>
1282069370: nan<br>
1282069375: nan</tt><br>
</blockquote>
<br>
I am obviously doing something wrong ... but what???<br>
<br>
Any help appreciated.<br>
<br>
Philip<br>
</body>
</html>