-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #411 from peuter/user-manual
adding RRD examples
- Loading branch information
Showing
44 changed files
with
641 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
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.
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.
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.