-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path13_execution.html
More file actions
443 lines (297 loc) · 16.9 KB
/
13_execution.html
File metadata and controls
443 lines (297 loc) · 16.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Understanding program execution — RPi-Monitor v2.13-r0</title>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="next" title="Frequently Asked Questions" href="14_faq.html" />
<link rel="prev" title="Custom installation" href="12_custom_installation.html" />
<script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-6853682829194266",
enable_page_level_ads: true
});
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-114314379-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-18642541-8');
</script>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> RPi-Monitor
</a>
<div class="version">
2.13
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="01_features.html">Keys features of RPi-Monitor</a></li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="10_index.html">Getting started</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="11_installation.html">Installation and upgrade</a></li>
<li class="toctree-l2"><a class="reference internal" href="12_custom_installation.html">Custom installation</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Understanding program execution</a></li>
<li class="toctree-l2"><a class="reference internal" href="14_faq.html">Frequently Asked Questions</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="20_index.html">Configuration</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="30_index.html">Usages</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="40_index.html">To go further</a></li>
</ul>
<hr />
<div style="padding: 0;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-6853682829194266"
data-ad-slot="2876944524"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">RPi-Monitor</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li><a href="10_index.html">Getting started</a> »</li>
<li>Understanding program execution</li>
<li class="wy-breadcrumbs-aside">
<!-- User defined GitHub URL -->
<a href="https://github.com/XavierBerger/RPi-Monitor/blob/develop/docs/source/13_execution.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="understanding-program-execution">
<h1>Understanding program execution<a class="headerlink" href="#understanding-program-execution" title="Permalink to this headline">¶</a></h1>
<div class="section" id="command-line">
<h2>Command line<a class="headerlink" href="#command-line" title="Permalink to this headline">¶</a></h2>
<p><code class="docutils literal"><span class="pre">rpimonitord</span></code> can be directly executed with the following parameters:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rpimonitord</span> <span class="p">[</span><span class="o">-</span><span class="n">a</span> <span class="n">address</span><span class="p">][</span> <span class="o">-</span><span class="n">b</span> <span class="n">pidfile</span><span class="p">][[</span><span class="o">-</span><span class="n">c</span> <span class="n">configuration_file</span><span class="p">]</span><span class="o">...</span><span class="p">][</span><span class="o">-</span><span class="n">d</span> <span class="n">delay</span><span class="p">][</span><span class="o">-</span><span class="n">h</span><span class="p">][</span><span class="o">-</span><span class="n">k</span><span class="p">][</span><span class="o">-</span><span class="n">l</span> <span class="n">logfile</span><span class="p">]</span>
<span class="p">[</span><span class="o">-</span><span class="n">m</span><span class="p">][</span><span class="o">-</span><span class="n">n</span><span class="p">][</span><span class="o">-</span><span class="n">p</span> <span class="n">port</span><span class="p">][</span><span class="o">-</span><span class="n">s</span><span class="p">][</span><span class="o">-</span><span class="n">t</span> <span class="n">timeout</span><span class="p">][</span><span class="o">-</span><span class="n">v</span><span class="p">[</span><span class="n">v</span><span class="p">[</span><span class="o">...</span><span class="p">]]][</span><span class="o">-</span><span class="n">V</span><span class="p">]</span>
</pre></div>
</div>
<div class="section" id="options">
<h3>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3>
<dl class="docutils">
<dt>-a,–addr address</dt>
<dd>Web server bind address
Default: 0.0.0.0</dd>
<dt>-b,–background pid-file</dt>
<dd>Define the pid file when run in background
Default: not set, application run in foreground</dd>
<dt>-c,–conf conf-file</dt>
<dd>Define the configuration file
Default: <code class="docutils literal"><span class="pre">/etc/rpimonitor/data.conf</span></code> <code class="docutils literal"><span class="pre">/etc/rpimonitor/daemon.conf</span></code></dd>
<dt>-d,–delay delay</dt>
<dd>Delay between check ins seconds
Default : 10</dd>
<dt>-l,–logfile log-file</dt>
<dd>Logfile directory and prefix (ex: <code class="docutils literal"><span class="pre">/var/log/rpimonitor.log</span></code>)
Default: <code class="docutils literal"><span class="pre">/dev/null</span></code></dd>
<dt>-p,–port port</dt>
<dd>Web server port
Default: 8888</dd>
<dt>-t,–timeout timeout</dt>
<dd>KPI read timeout in seconds
Default: 5</dd>
</dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you want to change the default <code class="docutils literal"><span class="pre">delay</span></code>, the rrd file will have to be deleted.
<code class="docutils literal"><span class="pre">rpimonitord</span></code> will recreate database at next startup with the new time slice.</p>
</div>
<dl class="docutils">
<dt>-h,–help</dt>
<dd>Shows this help and exit</dd>
<dt>-i,–interactive</dt>
<dd>Interactive configuration helper</dd>
<dt>-k,–keep</dt>
<dd>Keep log file (Default: logfile is delete at each start)</dd>
<dt>-m,–mib</dt>
<dd>Get MIB for current configuration</dd>
<dt>-n,–noserver</dt>
<dd>Don’t start embeded web server</dd>
<dt>-r,–readonly</dt>
<dd>Read only mode.</dd>
<dt>-s,–show</dt>
<dd>Show configuration as loaded and exit</dd>
<dt>-v,–verbose</dt>
<dd>Write debug info on screen</dd>
<dt>-V,–Version</dt>
<dd>Show version and exit</dd>
</dl>
</div>
</div>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
<p>Configuration can be defined into <code class="docutils literal"><span class="pre">/etc/rpimonitor/daemon.conf</span></code> and
<code class="docutils literal"><span class="pre">/etc/rpimonitor/data.conf</span></code> or in a list of files specified by <code class="docutils literal"><span class="pre">-c</span></code> parameter.</p>
<p>In <code class="docutils literal"><span class="pre">/etc/rpimonitor/template/*.conf</span></code>, provided at installation, you can see
how to customize <code class="docutils literal"><span class="pre">rpimonitord</span></code>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li>Configuration defined inside a configuration file always overwrite default values.</li>
<li>Configuration given as command line option always overwrite values defined in files.</li>
</ul>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Be sure to use Linux filefeed format with line ending with LF (and not CR/LF like in Windows)</p>
</div>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">See <a class="reference external" href="20_index.html">configuration</a> chapter for details or <a class="reference external" href="30_index.html">usage</a> chapter for examples.</p>
</div>
</div>
<div class="section" id="snmp-agent">
<h2>snmp-agent<a class="headerlink" href="#snmp-agent" title="Permalink to this headline">¶</a></h2>
<p><code class="docutils literal"><span class="pre">rpimonotord-snmp</span></code> is the snmp agent provided by <strong>RPi-Monitor</strong>. This agent
allow <code class="docutils literal"><span class="pre">snmpd</span></code> to access to data exctracted by <code class="docutils literal"><span class="pre">rpimonitord</span></code>.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">See <a class="reference external" href="20_index.html">configuration</a> chapter for details or <a class="reference external" href="30_index.html">usage</a> chapter for examples.</p>
</div>
</div>
<div class="section" id="raw-data-access">
<h2>Raw data access<a class="headerlink" href="#raw-data-access" title="Permalink to this headline">¶</a></h2>
<p>Once <code class="docutils literal"><span class="pre">rpimonitord</span></code> is started the data representing the current status are
available in json format and can be downloaded from the root of the web interface
(ex: <a class="reference external" href="http://raspberrypi.local:8888">http://raspberrypi.local:8888</a>)</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">static.json</span></code> : Static information extracted at startup</li>
<li><code class="docutils literal"><span class="pre">dynamic.json</span></code> : Current values of dynamic information extracted periodically</li>
<li><code class="docutils literal"><span class="pre">menu.json</span></code> : Description of menus when multiple pages are configured</li>
</ul>
<p>The web interface configuration can also be downloaded in json format:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">statistics.json</span></code> : Description of statistics page</li>
<li><code class="docutils literal"><span class="pre">status.json</span></code> : Description of status page</li>
<li><code class="docutils literal"><span class="pre">friends.json</span></code> : List of friends</li>
<li><code class="docutils literal"><span class="pre">addons.json</span></code> : List of addons</li>
</ul>
<p>Statistic information are stored into RRD file available in the directory <code class="docutils literal"><span class="pre">/var/lib/rpimonitor/stat/</span></code></p>
</div>
<div class="section" id="startup-script">
<h2>Startup script<a class="headerlink" href="#startup-script" title="Permalink to this headline">¶</a></h2>
<p><strong>RPi-Monitor</strong> is configured to start automatically. <code class="docutils literal"><span class="pre">/etc/init.d/rpimonitor</span></code>
and link in runlevel startup directory (<code class="docutils literal"><span class="pre">/etc/rc?.d/</span></code>) do the job.
This script can be executed with the following parameters:</p>
<dl class="docutils">
<dt>start</dt>
<dd>Start <code class="docutils literal"><span class="pre">rpimonitord</span></code> daemon</dd>
<dt>stop</dt>
<dd>Stop <code class="docutils literal"><span class="pre">rpimonitord</span></code> daemon</dd>
<dt>restart</dt>
<dd>Stop and start <code class="docutils literal"><span class="pre">rpimonitord</span></code> daemon</dd>
<dt>status</dt>
<dd>Show <code class="docutils literal"><span class="pre">rpimonitord</span></code> status</dd>
<dt>update</dt>
<dd>Update ‘packages to be installed’ list. This information is displayed in default
configuration of Web interface</dd>
<dt>install_auto_package_status_update</dt>
<dd>Add a script to automatically call package update script when <code class="docutils literal"><span class="pre">apt</span></code> commands are executed</dd>
<dt>remove_auto_package_status_update</dt>
<dd>Remove script automatically call for package update</dd>
</dl>
</div>
<div class="section" id="manpages">
<h2>Manpages<a class="headerlink" href="#manpages" title="Permalink to this headline">¶</a></h2>
<p>See also <strong>RPi-Monitor</strong> manpages :</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">man</span> <span class="n">rpimonitor</span>
<span class="n">man</span> <span class="n">rpimonitor</span><span class="o">-</span><span class="n">data</span>
<span class="n">man</span> <span class="n">rpimonitor</span><span class="o">-</span><span class="n">daemon</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="14_faq.html" class="btn btn-neutral float-right" title="Frequently Asked Questions" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="12_custom_installation.html" class="btn btn-neutral" title="Custom installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2018, Xavier Berger.
Last updated on Mar 18, 2018.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-6853682829194266"
data-ad-slot="2876944524"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: ''
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enableSticky();
});
</script>
</body>
</html>