<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi all.<br>
    <br>
    i testing the database rrd. I create the shellscript follow bellow:<br>
    <br>
    <br>
    ------------------- test.sh ----------------------<br>
    set -x<br>
    ARQUIVO_RRD="kakaroto.rrd"<br>
    rm $ARQUIVO_RRD<br>
    rrdtool create $ARQUIVO_RRD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --start N --step 15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DS:dados:COUNTER:20:U:U&nbsp;&nbsp; \<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RRA:AVERAGE:0.5:1:60&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>
    <br>
    <br>
    date +%s<br>
    INICIO=$( rrdtool first $ARQUIVO_RRD )<br>
    ATUAL=$INICIO<br>
    sleep 15<br>
    INICIO=$( expr $INICIO + 15)<br>
    rrdtool update $ARQUIVO_RRD $INICIO:10<br>
    ---------------------------------------------------<br>
    <br>
    when execute the shell script<br>
    <br>
    --------------------<br>
    [ricardobarbosa@shark transito]$ bash eeee.sh<br>
    + ARQUIVO_RRD=kakaroto.rrd<br>
    + rm kakaroto.rrd<br>
    + rrdtool create kakaroto.rrd --start N --step 15
    DS:dados:COUNTER:20:U:U RRA:AVERAGE:0.5:1:60<br>
    + date +%s<br>
    1403813403<br>
    ++ rrdtool first kakaroto.rrd<br>
    + INICIO=1403812515<br>
    + ATUAL=1403812515<br>
    + sleep 15<br>
    ++ expr 1403812515 + 15<br>
    + INICIO=1403812530<br>
    + rrdtool update kakaroto.rrd 1403812530:10<br>
    ERROR: kakaroto.rrd: illegal attempt to update using time 1403812530
    when last update time is 1403813403 (minimum one second step)<br>
    [ricardobarbosa@shark transito]$<br>
    ---------------------------<br>
    [ricardobarbosa@shark transito]$ bash eeee.sh<br>
    + ARQUIVO_RRD=kakaroto.rrd<br>
    + rm kakaroto.rrd<br>
    + rrdtool create kakaroto.rrd --start N --step 15
    DS:dados:COUNTER:20:U:U RRA:AVERAGE:0.5:1:60<br>
    + date +%s<br>
    1403813422<br>
    ++ rrdtool first kakaroto.rrd<br>
    + INICIO=1403812530<br>
    + ATUAL=1403812530<br>
    + sleep 15<br>
    ++ expr 1403812530 + 15<br>
    + INICIO=1403812545<br>
    + rrdtool update kakaroto.rrd 1403812545:10<br>
    ERROR: kakaroto.rrd: illegal attempt to update using time 1403812545
    when last update time is 1403813422 (minimum one second step)<br>
    [ricardobarbosa@shark transito]$<br>
    <br>
    <br>
    --------------------<br>
    <br>
    The value th output command (rrdtool first) is correct?<span
      id="result_box" class="" lang="en"><span class="hps"> should not
        be</span> <span class="hps">the current</span> <span
        class="hps">epoch</span><span class="">, since it was</span> <span
        class="hps">not</span> <span class="hps">updated</span> <span
        class="hps">anything in the</span> <span class="hps">file.</span>
      <span class="hps">rrd</span><span class="">?<br>
        <br>
      </span></span><span id="result_box" class="" lang="en"><span
        class="hps">in the last</span> <span class="hps">example</span>
      <span class="hps">the timestamp</span> <span class="hps">used</span>
      <span class="hps">when</span> <span class="hps">creating the</span>
      <span class="hps">rrd</span> <span class="hps">file is</span> <span
        class="hps">1403813422</span><span>, but</span> <span
        class="hps">the</span> <span class="hps">output of</span> <span
        class="hps"></span><span class="hps">command</span> <span
        class="hps">(rrdtool first)</span> <span class="hps">he shows
        how</span> <span class="hps">the timestamp</span> <span
        class="hps">1403812530</span> <span class="hps">is smaller.</span>
      <span class="hps">The value of the</span> <span class="hps">output</span>
      <span class="hps atn">of the command (</span><span>rrdtool</span>
      <span class="hps">first)</span> <span class="hps">should not be</span>
      <span class="hps">at least</span> <span class="hps">1403813XXX.<br>
      </span></span><br>
    <div id="gt-src-tools">
      <div id="gt-src-tools-l">
        <div style="display: inline-block;" id="gt-input-tool">
          <div id="itamenu"><span class="ita-kd-inputtools-div"></span></div>
        </div>
      </div>
    </div>
    <div id="gt-res-content" class="almost_half_cell">
      <div dir="ltr" style="zoom:1"><span id="result_box" class=""
          lang="en"><span class="hps">each</span> <span class="hps">execution
            of the script</span> <span class="hps">I delete</span> <span
            class="hps">the</span> <span class="hps">rrd</span> <span
            class="hps">file.</span> <span class="hps">he should not</span>
          <span class="hps">reset</span><span>?</span> <span
            class="hps">it seems that</span> <span class="hps">he is</span>
          <span class="hps">guarding the</span> <span class="hps">first</span>
          <span class="hps">of the previous file</span><span class="">.</span>
          <span class="hps">If</span> <span class="hps">someone can</span>
          <span class="hps">help me understand</span> <span class="hps">I
            thank</span><span class="">.</span></span></div>
    </div>
    <span id="result_box" class="" lang="en"><span class="hps"><br>
        Regards.<br>
      </span></span>
  </body>
</html>