<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 7/21/2015 11:09 AM, teor wrote:</div><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">
    <blockquote cite="mid:B008FBC6-FEBD-48B6-A5B8-1084DE4550F6@gmail.com" type="cite" class="">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252" class="">
      <br class="">
      <div class="">
        <blockquote type="cite" class="">
          <div class="">On 21 Jul 2015, at 03:12 , Tor Operator <<a moz-do-not-send="true" href="mailto:tor@coldnorthadmin.com" class="">tor@coldnorthadmin.com</a>>
            wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <meta http-equiv="content-type" content="text/html;
              charset=windows-1252" class="">
            <div bgcolor="#FFFFFF" text="#000000" class=""> Hi gents, <br class="">
              <br class="">
              I rencetly had one of my relay fall into hibernation. It
              seems that simply restarting the service doesn't change
              the hibernation status since Tor is still thinking that
              the BW limits have been overrun. Is the proper method to
              reset the status of the node is simply to delete the
              "state" file in "<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>var/lib/tor<span class="moz-txt-tag">/</span></i>". For now, I just set
              back to 0 the "AccountingBytesReadInInterval" and
              "AccountingBytesWrittenInInterval" counters and the node
              was able to wake up but that doesn't seem like a very
              elegant way to do it.
              <br class="">
            </div>
          </div>
        </blockquote>
        <br class="">
      </div>
      <div class="">Why not edit or remove the accounting limits in the torrc?</div>
      <div class="">We might need a little more context: why are the accounting
        limits set lower than you want?</div>
      <div class="">What exactly are you trying to achieve?</div></blockquote></div></div></blockquote><div><br class=""></div><blockquote type="cite" class=""><div class="">On 22 Jul 2015, at 15:30 , Tor Operator <<a href="mailto:tor@coldnorthadmin.com" class="">tor@coldnorthadmin.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">Here goes.<br class=""><br class="">The relay was configured to turn off when 1TB of traffic was reached. It did so way faster than I anticipated. Moreover, my VPS host actually doesn't count inbound traffic as part of my monthly limit. Since a TOR relay traffic is mostly symmetric, it does mean that BWAccounting will still consider the inbound traffic as part of the hard-limit.<br class=""></div></div></blockquote><div><br class=""></div><div>We have a ticket logged to add accounting rules "in" and "out", but no-one has submitted a patch yet.</div><div><br class=""></div><div>#15989 (Add AccountingRule in and out)</div><div><a href="https://trac.torproject.org/projects/tor/ticket/15989" class="">https://trac.torproject.org/projects/tor/ticket/15989</a></div><br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">The old configuration was :<br class="">AccountingRule sum<br class="">AccountingMax 1000 GBytes<br class=""><br class="">That was obviously a mistake since the "sum" method meant that I would hit the hard-limit really quickly. Here is the current configuration that I'm testing. What I want is simply to reset the accounting cycle on the first of every month. The max statement should allow me to use 1.5TB~ of data (750 GB inbound / 750 GB outbound) : <br class=""><br class="">AccountingRule max<br class="">AccountingStart month 1 00:00<br class="">AccountingMax 750 GBytes<br class=""><br class="">Now, since accounting also tracks the "old" data, is there a way to "start anew"? To reset the data accumulated so far?<br class=""></div></div></blockquote><br class=""></div><div>Recent versions of Tor record the "in" and "out" amounts in the state file, then calculate the "sum" or "max" when applying the rule. Are you using a version which doesn't do this?</div><div><br class=""></div><div>I have in my state file:</div><div>AccountingBytesReadInInterval 1…<br class="">AccountingBytesWrittenInInterval 1…</div><div><br class=""></div><div>But you're right, we also need a way of resetting the bandwidth once. Adding command-line arguments such as AccountingSetRead/Written would seem to be the way to go.</div><div>I've added a ticket for this:</div><div><a href="https://trac.torproject.org/projects/tor/ticket/16636" class="">https://trac.torproject.org/projects/tor/ticket/16636</a></div><div><br class=""></div><div>For the moment, there are two workarounds:</div><div>* Set the reset time for 2 minutes time, send a HUP to Tor, let it reset, then set the reset for the first of the month, and send another HUP</div><div>* Stop Tor, edit the state file manually, and remove all the "Accounting" lines, and start Tor</div><div><br class=""></div><div>Tim</div><br class=""><div apple-content-edited="true" class="">
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Tim Wilson-Brown (teor)</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""></div><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">teor2345 at gmail dot com<br class="">pgp ABFED1AC<br class=""><a href="https://gist.github.com/teor2345/d033b8ce0a99adbc89c5" class="">https://gist.github.com/teor2345/d033b8ce0a99adbc89c5</a><br class=""><br class="">teor at blah dot im<br class="">OTR D5BE4EC2 255D7585 F3874930 DB130265 7C9EBBC7</div></div></div></div></div></div></div></div></div></div></div></div>
</div>
<br class=""></body></html>