<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:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 5 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.error
        {mso-style-name:error;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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=EN-NZ link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This is not a problem with rrdcached; it is because you are trying to update too frequently.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd at 1398215351 sec, 387208 usec<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd at 1398215351 sec, 395156 usec<br><br></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The error message you give seems to indicate that rrdcached is being told to update with the time not changing or even going backwards.&nbsp; This most likely indicates a problem with your script that does the update calls &#8211; this should only happen once every step.&nbsp; How long is a Step?&nbsp; This depends on how you created the RRD files, but usually it is 60s or 300s.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Try this command, which will tell you your Step size:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>rrdtool info </span><span style='font-family:"Calibri","sans-serif"'>/usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> | grep step<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The two lines above show you are trying to update twice at time </span><span style='font-family:"Calibri","sans-serif"'>1398215351 </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;(the usec do not matter).&nbsp; This is way too quickly and gives the error.&nbsp; Your update script should sleep by Step seconds before trying another update.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Steve<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Steve Shipway<o:p></o:p></span></b></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>s.shipway@auckland.ac.nz<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch [mailto:rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] <b>On Behalf Of </b>Hassan Noureddine<br><b>Sent:</b> Wednesday, 23 April 2014 2:39 p.m.<br><b>To:</b> rrd-users@lists.oetiker.ch<br><b>Subject:</b> [rrd-users] rrdcached updating too fast<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>Hi all,<br><br>I was debugging the root cause of getting a long list of rrdcached&nbsp; log errors. like the on below. ( Illegal attempt to update in less than 1 sec. step).<br><br><span class=error>[err]</span> collectd<span class=error>[3565]</span>: rrdcached plugin: rrdc_update (/usr/var/.../df-root/df_complex-free.rrd, <span class=error>[1386607176:21342183424.000000]</span>, 1) failed with status -1.<br><br>The rrdcached is configured to update every 10 seconds, but when running scripts consuming&nbsp; memory, and cpu usage, I can see single update for some RRDs happening very frequent, causing long list of error logs.<br><br>I added debug codes to display update time, once I ran the scripts, I see the updates occur much faster for some of the RRDs. I am listing son below.<br><br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd at 1398215341 sec, 387199 usec<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd at 1398215351 sec, 387208 usec<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd at 1398215351 sec, 395156 usec<br>rrdcached plugin: rrdc_update (/usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd, [1398215351:36382], 1) failed with status -1.<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd at 1398215362 sec, 958488 usec<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-idle.rrd at 1398215371 sec, 393588 usec<br><br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-steal.rrd at 1398215341 sec, 387544 usec<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-steal.rrd at 1398215351 sec, 387590 usec<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-steal.rrd at 1398215351 sec, 488583 usec<br>rrdcached plugin: rrdc_update (/usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-steal.rrd, [1398215351:0], 1) failed with status -1.<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-steal.rrd at 1398215362 sec, 958920 usec<br>rrdupdate to /usr/var/lib/collectd/rrd/localhost/cpu-7/cpu-steal.rrd at 1398215371 sec, 393950 usec<br><br>Have this issue been addressed, and if not, which part of the code could be causing it.<br><br>Thanks.<o:p></o:p></span></p></div></div></body></html>