I created a rrd file using:<div><span class="Apple-tab-span" style="white-space:pre"><br></span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (! -e "$rrd/mysql.rrd")<div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>print "creating rrd database for mysql...\n";</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>RRDs::create "$rrd/mysql.rrd",</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>"-s 60",</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>"DS:queries:COUNTER:60:0:12500000",</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>"DS:datain:DERIVE:60:0:12500000",</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>"DS:dataout:DERIVE:60:0:12500000",</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>"RRA:LAST:0.5:1:9999",</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>"RRA:AVERAGE:0.5:1:576",</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>"RRA:AVERAGE:0.5:6:672",</div><div>
<span class="Apple-tab-span" style="white-space:pre">                        </span>"RRA:AVERAGE:0.5:24:732",</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>"RRA:AVERAGE:0.5:144:1460";</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div>
</div><div><br></div><div>I am populating it using this:</div><div><br></div><div><div>for i in `mysql -e 'show status'|grep Innodb_rows_|grep ted|cut -f 2`</div><div>do</div><div> sum=`expr $sum + $i`</div><div>
done</div></div><div>rrdtool update mysql.rrd N:$sum:0:0</div><div><br></div><div><div>root@main [/home/dgobrien/public_html/collector]# ./net.sh</div><div>rrdtool update mysql.rrd N:271801:0:0</div><div>1081x197</div><div>
root@main [/home/dgobrien/public_html/collector]# ./net.sh</div><div>rrdtool update mysql.rrd N:271807:0:0</div></div><div><br></div><div>the counter is incrementing and the script runs thru cron once a minute</div><div>I am graphing using this:</div>
<div><br></div><div>DATE=`date +%Y%m%d`</div><div><div>rrdtool graph mysqlstats_$DATE.png --width=1000 --height=125 \</div><div> -l 0 -X 0 --color CANVAS#000000 --color GRID#888888 --color SHADEA#FFFFFF --color SHADEB#FFFFFF --color BACK#FFFFFF --color MGRID#BBBBBB \</div>
<div> DEF:mysql=mysql.rrd:queries:AVERAGE \</div><div> AREA:mysql#337722:"Queries\:" \</div><div> GPRINT:mysql:MAX:" Max\\: %5.1lf %s" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> GPRINT:mysql:AVERAGE:" Avg\\: %5.1lf %S" \</div>
<div> GPRINT:mysql:LAST:" Current\\: %5.1lf %S"</div></div><div><br></div><div>but the graph always says "nan" and no values show up </div><div>I tried with both DERIVE and COUNTER </div><div>
<br></div><div><a href="http://duelingelectrons.com/collector/">http://duelingelectrons.com/collector/</a></div><div><br></div><div>can anyone assist me in figuring this out?</div>