<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I want to graph the data of my energy meter. But it is measuring only in 1kWh raster. So with normal power usage I have every 2..4 hours a step of 1kWh. The meter displays it’s data as kWh, so it gives e.g 600 for the absolute counter value of 600kWh.<o:p></o:p></p><p class=MsoNormal>I sample the absolute energy every 5 minutes. So I took this as step and 600s as heartbeat.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What I get is short peaks with a height which is displayed as 330u over a period of 24h. With longer periods like a week the values get smaller and smaller and there are weird stepping curves. So how can I measure/graph such low resolution measures in a senseful way?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This is how I defined the data:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> ret = rrdtool.create(rrdname + '.rrd', '--step', '300', '--start', str(starttime),<o:p></o:p></p><p class=MsoNormal> 'DS:Gauge:GAUGE:600:U:U',<o:p></o:p></p><p class=MsoNormal> 'DS:Counter:COUNTER:600:U:U',<o:p></o:p></p><p class=MsoNormal> 'RRA:AVERAGE:0.5:5m:24h',<o:p></o:p></p><p class=MsoNormal> 'RRA:AVERAGE:0.5:2h:31d',<o:p></o:p></p><p class=MsoNormal> 'RRA:AVERAGE:0.5:6h:31d',<o:p></o:p></p><p class=MsoNormal> 'RRA:AVERAGE:0.5:1d:1y')<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>And this is how I graph them<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> ret = rrdtool.graph(rrdname + '24h.png', '--start', 'end-24h', '--end', 'now', <o:p></o:p></p><p class=MsoNormal> '--upper-limit', '650', '--lower-limit', '600', '--rigid', '--right-axis', '0.00001:-0.006',<o:p></o:p></p><p class=MsoNormal> 'DEF:gauge=./' + rrdname + '.rrd:Gauge:AVERAGE',<o:p></o:p></p><p class=MsoNormal> 'DEF:counter=./' + rrdname + '.rrd:Counter:AVERAGE',<o:p></o:p></p><p class=MsoNormal> 'CDEF:cnt1000=600,counter,10000,*,+',<o:p></o:p></p><p class=MsoNormal> 'LINE1:gauge#00ff00:Gauge',<o:p></o:p></p><p class=MsoNormal> 'LINE1:cnt1000#ff0000:Counter')<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The gauge line looks good, but the counter line looks weird.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks<o:p></o:p></p><p class=MsoNormal>Thorsten<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>