Skip to content

Commit

Permalink
Merge pull request #411 from peuter/user-manual
Browse files Browse the repository at this point in the history
adding RRD examples
  • Loading branch information
ChristianMayer committed Sep 6, 2016
2 parents 3ba8294 + 87f2bab commit f97d481
Show file tree
Hide file tree
Showing 44 changed files with 641 additions and 17 deletions.
2 changes: 1 addition & 1 deletion doc/manual/de/colab/doc/rst.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Die Grundsätzliche Syntax von Links enthält einen Title und den Link selbst in
```Titel des Links <URL des Links>`__``. Natürlich kann man auch auf andere Dokumente innerhalb der Dokumentation verweisen:
``:doc:`Titel <relativer/pfad/zum/document>```. Zu beachten ist hierbei, dass man die `.rst` Dateiendung weglassen muss.
Möchte man also ein Dokument namens *dok.rst* im Unterverzeichnis *test* verlinkten, sieht das so aus:
``:doc:`<test/dok>```. Der Titel des Links ist optional, wird er weggelassen, wird der Seitentitel des verlinkten Dokuments
``:doc:`test/dok```. Der Titel des Links ist optional, wird er weggelassen, wird der Seitentitel des verlinkten Dokuments
als Titel benutzt (also die Überschrift auf der höchsten Ebene innerhalb des Dokuments).


Expand Down
Binary file added doc/manual/de/config/_static/Puffer1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Puffer9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Rohr1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Rohr2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Rohr3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Rohr4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Rohr5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Rohr6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/Rohr7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/XML1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/XML2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/XML3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/XML4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/XML5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/manual/de/config/_static/mappong_formula.png
Binary file added doc/manual/de/config/_static/oh_datetime.png
191 changes: 191 additions & 0 deletions doc/manual/de/config/hydraulik.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
Anleitung zum Erstellen eines Animierten Hydraulikplans
=======================================================

Voraussetzung
-------------

- Inkscape

Wir erstellen einen Puffer
--------------------------

- Inkscape Starten
- Rechteck erstellen

.. figure:: _static/Puffer1.png
:alt: Puffer1.png

- Füllen und Kontur auswählen

.. figure:: _static/Puffer2.png
:alt: Puffer2.png

- Farbe der Kontur auf Grau stellen

.. figure:: _static/Puffer3.png
:alt: Puffer3.png

- Breite der Kontur einstellen

.. figure:: _static/Puffer4.png
:alt: Puffer4.png

- Ergebnis

.. figure:: _static/Puffer5.png
:alt: Puffer5.png

- Füllung mit Farbverlauf erstellen

.. figure:: _static/Puffer6.png
:alt: Puffer6.png

- Mit der Bearbeitungsfunktion zwei Farben für den Verlauf zuweisen

- Farbe 1 (rot) Zuweisen mit 100% Deckung

.. figure:: _static/Puffer7.png
:alt: Puffer7.png

-

- Farbe zwei (blau) mit 50% Deckung

.. figure:: _static/Puffer8.png
:alt: Puffer8.png

- Farbverlauf ändern

- es gibt zwei Möglichkeiten

- Objekt drehen

.. figure:: _static/Puffer9.png
:alt: Puffer9.png

-
-
- Farbverlauflinie verschieben

.. figure:: _static/Puffer10.png
:alt: Puffer10.png

- Ecken abrunden

.. figure:: _static/Puffer11.png
:alt: Puffer11.png

Wir erstellen Leitungen
-----------------------

Rohere werden mit dem Freihandlinien Zeichner erstellt. Es ist damit
möglich auch gerade Linien zu Zeichnen Am Startpunkt mit der Maus
klicken. Am Zielpunk wider klicken, fertig ist die Gerade. Wenn man mit
der neuen neuen Linie am letzten Kästchen der alte Linie beginnt werden
die Linien zusammenhängen. Die Zeichenrichtung bestimmt wie später die
Animation läuft. Von rechts nach links gezeichnet, Flüssigkeit fließt
von rechts nach links.

|Rohr1.png| |Rohr2.png|

- Linie ein Volumen geben

- Füllung der Kontur

- Muster der Kontur

.. figure:: _static/Rohr3.png
:alt: Rohr3.png

-
-
- Farbe der Kontur

.. figure:: _static/Rohr4.png
:alt: Rohr4.png

.. figure:: _static/Rohr5.png
:alt: Rohr5.png

- Dem Objekt einen Namen zuweisen. Wird später für die Animation
benötigt.

- Linie mit der rechten Maustaste anklicken

- Objekteigenschaften wählen

.. figure:: _static/Rohr6.png
:alt: Rohr6.png

- ID ändern

.. figure:: _static/Rohr7.png
:alt: Rohr7.png

XML-File anpassen (Inkscape)
----------------------------

Nun kommt das Geheiniss der animierten Leitungen

- Gruppen Bilden

Die benötigte Werte können nur eingetragen werden, wenn die Leitung als
Gruppe definiert wurde.

.. figure:: _static/XML1.png
:alt: XML1.png

- Parameter der Gruppe zuordnen

- id="<eindeutige id>"
- class="pipe_group show_flow flow_control"
- data-cometvisu-active="1/0/3"

Die Parameter pipe_group, show_flow, data-cometvisu-active und
flow_control bedeuten:

- pipe_group => aus dem Pfad wird eine Röhrenform erzeugt
- show_flow => wird eine fliesende (abstraktes) Fluid "simuliert".
- data-cometvisu-active="<ga>" => animiert die Flüssigkeit bei aktiver GA
- flow_control => Animation

.. figure:: _static/XML2.png
:alt: XML2.png

XML-File anpassen (Editor)
--------------------------

Es ist auch möglich die SVG Datei direkt per Editor zu bearbeiten. Basis
ist die Leitung als Gruppe eingefasst

- Mit einem Editor die svg Datei öffnen und nach dem Kenner (blaues
Rohr) suchen

.. figure:: _static/XML3.png
:alt: XML3.png

- den Abschnitt mit dem folgendem Code anreichern.

.. code-block:: xml
<g
id="<eindeutige id>"
class="pipe_group show_flow flow_control"
data-cometvisu-active="1/0/3">
<path
…..
…./>
</g>
.. figure:: _static/XML4.png
:alt: XML4.png

Das Fertige Ergebnis im Webbrowser
----------------------------------

.. figure:: _static/XML5.png
:alt: XML5.png

.. |Rohr1.png| image:: _static/Rohr1.png
.. |Rohr2.png| image:: _static/Rohr2.png

8 changes: 5 additions & 3 deletions doc/manual/de/config/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,13 @@ CometVisu - Beispiele

.. TODO::

Hinzufügen
Beispiele hinzufügen

sonstiges
---------

.. TODO::
.. toctree::
:maxdepth: 1

Hinzufügen der alten Inhalte (RRD-Beispiele, Animierter Hydraulikplan)
rrd_examples
hydraulik
43 changes: 43 additions & 0 deletions doc/manual/de/config/rrd/1wire_owfs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Temperatur vom 1wire (lokale 1wire-Schnittstelle mit owfs)
----------------------------------------------------------

Wenn man 1wire einsetzt kann man mit diesem Script die Werte direkt von einem 1wire Sensor lesen und in eine RRD Datenbank füllen:

Hier hat der 1wire Sensor die ID 28.AB8BCB040000, diese muss angepasst werden!!

Dieses Script funktioniert so wenn es unter /var/www/rrd/1wire_temp_aussen gespeichert (und ausführbar) ist.

.. code-block:: bash
#!/bin/bash
#
cd /var/www/rrd
# create database if not exists
[ -f 1wire_temp_aussen.rrd ] || {
/usr/bin/rrdtool create 1wire_temp_aussen.rrd --step 300 \
DS:temp:GAUGE:1200:U:U \
RRA:AVERAGE:0.5:1:3200 \
RRA:AVERAGE:0.5:6:3200 \
RRA:AVERAGE:0.5:36:3200 \
RRA:AVERAGE:0.5:144:3200 \
RRA:AVERAGE:0.5:1008:3200 \
RRA:AVERAGE:0.5:4320:3200 \
RRA:AVERAGE:0.5:52560:3200 \
RRA:AVERAGE:0.5:525600:3200
}
# read the temperature (degrees celsius)
TEMPERATURE=`owget /uncached/28.AB8BCB040000/temperature`
# remove leading character
TEMPERATURE=`echo $TEMPERATURE | cut -c 1-`
/usr/bin/rrdtool update 1wire_temp_aussen.rrd N:$TEMPERATURE
Im /etc/crontab muss folgende Zeile hinzugefügt werden, um das Script alle 5 Minuten aufzurufen:

.. code-block:: bash
*/5 * * * * root /var/www/rrd/1wire_temp_aussen
40 changes: 40 additions & 0 deletions doc/manual/de/config/rrd/cpuload.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
CPU load für Linux Systeme
--------------------------

Die CPU Load eines Linux-Systems (1 Min, 5 Min, 15 Min) kann man mit diesem Script in **eine** RRD
Datenbank füllen. (Dies muss bei der Visualisierung beachtet werden, es muss der datasourceIndex gesetzt werden)

Dieses Script funktioniert, wenn es unter ``/var/www/rrd/cpuload`` gespeichert (und ausführbar) ist

.. code-block:: bash
#!/bin/bash
cd /var/www/rrd
# create database if not exists
[ -f cpuload.rrd ] || {
/usr/bin/rrdtool create cpuload.rrd --step 300 \
DS:load1:GAUGE:1200:U:U \
DS:load5:GAUGE:1200:U:U \
DS:load15:GAUGE:1200:U:U \
RRA:AVERAGE:0.5:1:3200 \
RRA:AVERAGE:0.5:6:3200 \
RRA:AVERAGE:0.5:36:3200 \
RRA:AVERAGE:0.5:144:3200 \
RRA:AVERAGE:0.5:1008:3200 \
RRA:AVERAGE:0.5:4320:3200 \
RRA:AVERAGE:0.5:52560:3200 \
RRA:AVERAGE:0.5:525600:3200
}
LOAD=$(awk '{print $1":"$2":"$3}' < /proc/loadavg)
/usr/bin/rrdtool update cpuload.rrd N:$LOAD
Im ``/etc/crontab`` muss folgende Zeile hinzugefügt werden, um das Script alle 5 Minuten aufzurufen:

.. code-block:: bash
*/5 * * * * root /var/www/rrd/cpuload
53 changes: 53 additions & 0 deletions doc/manual/de/config/rrd/ifHCoctets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Internet-Bandbreite
-------------------

Die genutzte Internet-Bandbreite kann man mit diesem Script in eine RRD Datenbank füllen:

Es werden über das SNMP Protokoll die 64-bit Counter der Interface-Statistiken ausgelesen und beide
Richtungen in eine RRD Datenbank geschrieben. Dies muss später bei der Visualisierung beachtet werden
(der datasourceIndex muss gesetzt werden)

Um dieses Script benutzen zu können muss der Router SNMP unterstützen und es muss eine READ-Community
konfiguriert werden. Zudem muss der Router die IF-MIB nach RFC2233 unterstützen, dies sollte jedoch heute
bei allen Geräten gegeben sein.

Es muss angepasst werden:

* SNMP community (im Beispiel GEHEIMECOMMUNITY)
* IP-Addresse des Routers (im Beispiel 192.168.1.1)
* evt. der Interface-Index (im Beispiel .1 in IF-MIB::ifHCInOctets.1, hier können andere Zahlen erforderlich sein - notfalls probieren)

Dieses Script funktioniert so wenn es unter /var/www/rrd/xxx gespeichert (und ausführbar) ist.

.. code-block:: bash
#!/bin/bash
#
cd /var/www/rrd
# create database if not exists
[ -f network_internet.rrd ] || {
/usr/bin/rrdtool create network_internet.rrd --step 60 \
DS:Internet_IN:COUNTER:1200:U:U \
DS:Internet_OUT:COUNTER:1200:U:U \
RRA:AVERAGE:0.5:1:3200 \
RRA:AVERAGE:0.5:6:3200 \
RRA:AVERAGE:0.5:36:3200 \
RRA:AVERAGE:0.5:144:3200 \
RRA:AVERAGE:0.5:1008:3200 \
RRA:AVERAGE:0.5:4320:3200 \
RRA:AVERAGE:0.5:52560:3200 \
RRA:AVERAGE:0.5:525600:3200
}
NET_INTERNET_IN=$(expr $(snmpget -Oqv -v 2c -c GEHEIMECOMMUNITY 192.168.1.1 IF-MIB::ifHCInOctets.1) / 1000 \* 8)
NET_INTERNET_OUT=$(expr $(snmpget -Oqv -v 2c -c GEHEIMECOMMUNITY 192.168.1.1 IF-MIB::ifHCOutOctets.1) / 1000 \* 8)
/usr/bin/rrdtool update network_internet.rrd `date +%s`:$NET_INTERNET_IN:$NET_INTERNET_OUT
Im /etc/crontab muss folgende Zeile hinzugefügt werden, um das Script alle 5 Minuten aufzurufen:

.. code-block:: bash
*/5 * * * * root /var/www/rrd/network_internet
Loading

0 comments on commit f97d481

Please sign in to comment.