<spanclass="p">|</span> Module <spanclass="p">|</span> Sources <spanclass="p">|</span> Destinations <spanclass="p">|</span> Status <spanclass="p">|</span> CPU <spanclass="p">|</span> mem <spanclass="p">|</span>
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span>18:05:41<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span>18:05:41<spanclass="o">]</span> Starting random stream: <spanclass="m">2</span> elements @ 10.0Hz
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="m">18</span>:05:41<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="m">18</span>:05:41<spanclass="o">]</span> Starting random stream: <spanclass="m">2</span> elements @ <spanclass="m">10</span>.0Hz
<spanclass="c1"># confirm data is entering NilmDB</span>
$> nilmtool list -E /demo/random
/demo/random
interval extents: Fri, <spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="c1"># ...</span>
total data: <spanclass="m">1559</span> rows, 155.700002 seconds
total data: <spanclass="m">1559</span> rows, <spanclass="m">155</span>.700002 seconds
</pre></div>
</div>
</div>
...
...
@@ -165,8 +165,8 @@ it will display a description of the operations it will perform on the data</p>
<spanclass="c1"># ... list of filter modules</span>
$> joule filter <spanclass="nb">help</span> mean
<spanclass="c1"># ... help with the mean module</span>
$> joule filter mean 9
per-element moving average with a window size of 9
$> joule filter mean <spanclass="m">9</span>
per-element moving average with a window size of <spanclass="m">9</span>
</pre></div>
</div>
<p>To add this filter to our pipeline copy the following into a file at
<spanclass="p">|</span> Module <spanclass="p">|</span> Sources <spanclass="p">|</span> Destinations <spanclass="p">|</span> Status <spanclass="p">|</span> CPU <spanclass="p">|</span> mem <spanclass="p">|</span>
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span>18:22:48<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span>18:22:48<spanclass="o">]</span> Starting random stream: <spanclass="m">2</span> elements @ 10.0Hz
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="m">18</span>:22:48<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="m">18</span>:22:48<spanclass="o">]</span> Starting random stream: <spanclass="m">2</span> elements @ <spanclass="m">10</span>.0Hz
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span>18:22:48<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span>18:22:48<spanclass="o">]</span> Starting moving average filter with window size 9
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="m">18</span>:22:48<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="m">18</span>:22:48<spanclass="o">]</span> Starting moving average filter with window size <spanclass="m">9</span>
<spanclass="c1"># confirm data is entering NilmDB</span>
$> nilmtool list -E -n /demo/*
/demo/filtered
interval extents: Fri, <spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="c1"># ...</span>
total data: <spanclass="m">132</span> rows, 13.100001 seconds
total data: <spanclass="m">132</span> rows, <spanclass="m">13</span>.100001 seconds
/demo/random
interval extents: Fri, <spanclass="m">27</span> Jan <spanclass="m">2017</span><spanclass="c1"># ...</span>
total data: <spanclass="m">147</span> rows, 14.600001 seconds
total data: <spanclass="m">147</span> rows, <spanclass="m">14</span>.600001 seconds
</pre></div>
</div>
</div>
...
...
@@ -278,8 +278,8 @@ $> nilmtool list -E -n /demo/*
Active: active <spanclass="o">(</span>running<spanclass="o">)</span> since Tue 2017-01-17 09:53:21 EST<spanclass="p">;</span> 7s ago
Active: active <spanclass="o">(</span>running<spanclass="o">)</span> since Tue <spanclass="m">2017</span>-01-17 <spanclass="m">09</span>:53:21 EST<spanclass="p">;</span> 7s ago
Main PID: <spanclass="m">2296</span><spanclass="o">(</span>jouled<spanclass="o">)</span>
<spanclass="p">|</span> Module <spanclass="p">|</span> Sources <spanclass="p">|</span> Destinations <spanclass="p">|</span> Status <spanclass="p">|</span> CPU <spanclass="p">|</span> mem <spanclass="p">|</span>
<spanclass="p">|</span> serial data capture <spanclass="p">|</span><spanclass="p">|</span><spanclass="p">|</span><spanclass="p">|</span><spanclass="p">|</span><spanclass="p">|</span>
@@ -111,22 +111,22 @@ running the following command:</p>
<strong>joule logs</strong> command to print recent log entries. The logs are
automatically rotated: see the ProcDB:MaxLogLines parameter in <aclass="reference internal"href="reference.html#main-conf"><spanclass="std std-ref">main.conf</span></a></p>
<spanclass="o">[</span><spanclass="m">23</span> Jan <spanclass="m">2017</span>16:14:56<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">23</span> Jan <spanclass="m">2017</span><spanclass="m">16</span>:14:56<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">23</span> Jan <spanclass="m">2017</span>16:14:56<spanclass="o">]</span> ---starting module---
<spanclass="o">[</span><spanclass="m">23</span> Jan <spanclass="m">2017</span><spanclass="m">16</span>:14:56<spanclass="o">]</span> ---starting module---
</pre></div>
</div>
<p>Check that the data is entering NilmDB using the <strong>nilmtool</strong> command. Joule inserts data periodically, see NilmDB:InsertionPeriod in <aclass="reference internal"href="reference.html#main-conf"><spanclass="std std-ref">main.conf</span></a></p>
<divclass="highlight-bash"><divclass="highlight"><pre><span></span>$> nilmtool list -En /meter4/prep*
/meter4/prep-a
interval extents: Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span>16:11:01.833447 -0500 -> Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span> 16:16:29.322283 -0500
total data: <spanclass="m">18054</span> rows, 300.878769 seconds
interval extents: Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span><spanclass="m">16</span>:11:01.833447 -0500 -> Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span><spanclass="m">16</span>:16:29.322283 -0500
total data: <spanclass="m">18054</span> rows, <spanclass="m">300</span>.878769 seconds
/meter4/prep-b
interval extents: Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span>16:11:01.833447 -0500 -> Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span> 16:16:29.322283 -0500
total data: <spanclass="m">18054</span> rows, 300.878769 seconds
interval extents: Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span><spanclass="m">16</span>:11:01.833447 -0500 -> Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span><spanclass="m">16</span>:16:29.322283 -0500
total data: <spanclass="m">18054</span> rows, <spanclass="m">300</span>.878769 seconds
/meter4/prep-c /meter4/prep-a
interval extents: Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span>16:11:01.833447 -0500 -> Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span> 16:16:29.322283 -0500
total data: <spanclass="m">18054</span> rows, 300.878769 seconds
interval extents: Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span><spanclass="m">16</span>:11:01.833447 -0500 -> Mon, <spanclass="m">23</span> Jan <spanclass="m">2017</span><spanclass="m">16</span>:16:29.322283 -0500
total data: <spanclass="m">18054</span> rows, <spanclass="m">300</span>.878769 seconds
<spanid="id1"></span><h3><aclass="toc-backref"href="#id10">main.conf</a><aclass="headerlink"href="#main-conf"title="Permalink to this headline">¶</a></h3>
<p>Joule uses a set of default configurations that should work for most
cases. These defaults can be customized by editing
<strong>/etc/joule/main.conf</strong>. Start joule with the <strong>–config</strong> flag to use a configuration file at
<strong>/etc/joule/main.conf</strong>. Start joule with the <strong>–config</strong> flag to use a configuration file at
an alternate location. The example <strong>main.conf</strong> below shows the
full set of options and their default settings:</p>
e2e_joule_1 exited with code <spanclass="m">0</span>
<spanclass="c1">#...output from Docker omitted...</span>
</pre></div>
</div>
...
...
@@ -352,8 +352,8 @@ though you need to set up the appropriate configuration files to run your module
<h3><aclass="toc-backref"href="#id15">Configuration Files</a><aclass="headerlink"href="#configuration-files"title="Permalink to this headline">¶</a></h3>
<p>The E2E tests run joule just like a production system, therefore you
must include module and stream configuration files in order for joule
to recognize and run your module. It provides a type of “live”
documentation. These file serve as a type of “live” documentation that
to recognize and run your module. It provides a type of “live”
documentation. These file serve as a type of “live” documentation that
others can use as a guide when setting up your module on other their
system.</p>
<p>The example_modules e2e test runs both the reader and filter module. The
<spanclass="k">print</span><spanclass="p">(</span><spanclass="s2">"OK"</span><spanclass="p">)</span><spanclass="c1"># no asserts failed, so things are good</span>
</pre></div>
...
...
@@ -516,8 +516,8 @@ and the e2eutils reference for details on the testing API.</p>
<spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">help</span><spanclass="o">=</span><spanclass="s2">"a paragraph: this reader does x,y,z etc..."</span>
<spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">help</span><spanclass="o">=</span><spanclass="s2">"a paragraph: this reader does x,y,z etc..."</span>