<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Purrucker Page Blog &#187; Linux</title>
	<atom:link href="http://blog.purrucker.de/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.purrucker.de</link>
	<description>Informationstechnologie, Sport und anderes ...</description>
	<lastBuildDate>Sun, 01 Jan 2012 20:09:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Linux: Austausch einer defekten Festplatte im Software-RAID</title>
		<link>http://blog.purrucker.de/2011/06/01/linux-austausch-einer-defekten-festplatte-im-software-raid/</link>
		<comments>http://blog.purrucker.de/2011/06/01/linux-austausch-einer-defekten-festplatte-im-software-raid/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 21:40:53 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Festpatte]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[Speicher]]></category>
		<category><![CDATA[Storage]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=1014</guid>
		<description><![CDATA[Der Status des Software RAID (Redundant Array of Independent Disks) wird bei Linux in der Datei /proc/mdstat festgehalten. Man kann sich den Status eines RAID also mit folgenden Befehl anzeigen lassen: cat /proc/mdstat Wenn z.B. die Festplatte /dev/sdb defekt ist, &#8230; <a href="http://blog.purrucker.de/2011/06/01/linux-austausch-einer-defekten-festplatte-im-software-raid/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Der Status des <a href="http://de.wikipedia.org/wiki/RAID#Software-RAID">Software RAID</a> (Redundant Array of Independent Disks) wird bei Linux in der Datei /proc/mdstat festgehalten. Man kann sich den Status eines RAID also mit folgenden Befehl anzeigen lassen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>mdstat</pre></div></div>

<p>Wenn z.B. die Festplatte /dev/sdb defekt ist, könnte die Ausgabe von wie folgt aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Personalities : <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid0<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid6<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid5<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid10<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>linear<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>multipath<span style="color: #7a0874; font-weight: bold;">&#93;</span>
md2 : active raid1 sdb3<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>F<span style="color: #7a0874; font-weight: bold;">&#41;</span> sda3<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000;">730202368</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>U_<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
md1 : active raid1 sda2<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sdb2<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>F<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000;">264960</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>U_<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
md0 : active raid1 sdb1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>F<span style="color: #7a0874; font-weight: bold;">&#41;</span> sda1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000;">2102464</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>U_<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Details über die einzelnen RAID Devices kann man sich mit dem Befehl mdadm anzeigen lassen. Wenn man die Details von md1 sehen möchte gibt man also den folgenden Befehl ein:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm <span style="color: #660033;">--detail</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0</pre></div></div>

<p>Bevor eine neue Festplatte verbaut wird, sollte jetzt zunächst die defekte Festplatte aus dem RAID entfernt werden.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1
mdadm <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md1 <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb2
mdadm <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2 <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb3</pre></div></div>

<p>Unter Umständen kann es sein, dass eine verwendete Festplatte teilweise defekt ist und sich nicht alle Devices im Status [U_] befinden, sondern einige Devices im Status [UU] sind. In diesem Fall schlägt der Befehl fehl, da das device in Ordnung ist. In diesem Fall müssen vorher die intakten Devices mit dem Befehl mdadm als defekt markiert werden. Wenn in unserem Beispiel das Device md1 noch intakt wäre, könnte man dies mit dem folgenden Befehl erreichen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm <span style="color: #660033;">--manage</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md1 <span style="color: #660033;">--fail</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb2</pre></div></div>

<p>Danach kann die neue Festplatte verbaut werden. Wenn dies geschehen ist können Partitionierung und Bootsektor von der intakten Festplatte mit dem Befehl dd kopiert werden. Das kopieren der Partitionstabelle mit dd funktioniert nicht für extended-Partitionen, diese müssen von Hand angelegt werden. Da in unserem Beispiel keine extended-Partitionen vorkommen, könnte man mit dem folgenden Befehl Partitionierung und Bootsektor auf die neue Festplatte kopieren:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb <span style="color: #007800;">count</span>=<span style="color: #000000;">1</span> <span style="color: #007800;">bs</span>=<span style="color: #000000;">512</span></pre></div></div>

<p>Die Partitionstabelle muss nun vom Kernel neu eingelesen werden.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">sfdisk <span style="color: #660033;">-R</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb</pre></div></div>

<p>Zum Schluss müssen die Partitionen der neuen Festplatte noch in das RAID eingebunden werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mdadm <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1
mdadm <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md1 <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb2
mdadm <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md2 <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb3</pre></div></div>

<p>Die neue Partitionen sind somit Teil des Arrays und werden nun synchronisiert. Dieser Vorgang kann je nach Größe eine ganze Weile dauern. Mittels cat /proc/mdstat kann der Status der Synchronisation aufgerufen werden.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Personalities : <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid0<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid6<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid5<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid4<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>raid10<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>linear<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>multipath<span style="color: #7a0874; font-weight: bold;">&#93;</span> 
md2 : active raid1 sdb3<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sda3<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #000000;">730202368</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>U_<span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #7a0874; font-weight: bold;">&#91;</span>==<span style="color: #000000; font-weight: bold;">&gt;</span>..................<span style="color: #7a0874; font-weight: bold;">&#93;</span>  recovery = <span style="color: #000000;">11.7</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">85713024</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">730202368</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">finish</span>=143.8min <span style="color: #007800;">speed</span>=74694K<span style="color: #000000; font-weight: bold;">/</span>sec
&nbsp;
md0 : active raid1 sdb1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sda1<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #000000;">2102464</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>U_<span style="color: #7a0874; font-weight: bold;">&#93;</span>
        <span style="color: #007800;">resync</span>=DELAYED
&nbsp;
md1 : active raid1 sdb2<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> sda2<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
      <span style="color: #000000;">264960</span> blocks <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>UU<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
unused devices: <span style="color: #000000; font-weight: bold;">&lt;</span>none<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/06/01/linux-austausch-einer-defekten-festplatte-im-software-raid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1-wire Wetterstation (Teil 3: Anzeige)</title>
		<link>http://blog.purrucker.de/2011/03/29/1-wire-wetterstation-teil-3-anzeige-2/</link>
		<comments>http://blog.purrucker.de/2011/03/29/1-wire-wetterstation-teil-3-anzeige-2/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 10:14:21 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Hersteller]]></category>
		<category><![CDATA[Kommunikationstechnik]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Alix]]></category>
		<category><![CDATA[AMD]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[Geode]]></category>
		<category><![CDATA[Netzwerk]]></category>
		<category><![CDATA[Sensoren]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wetter]]></category>
		<category><![CDATA[Wetterstation]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=980</guid>
		<description><![CDATA[Nachdem man sich eine 1-wire Wetterstation nach dem Artikel 1-wire Wetterstation (Teil 1: Installation) gebaut und die Daten wie im Artikel 1-wire Wetterstation (Teil 2: Datenbank) beschrieben in einer MySQL Tabelle speichert möchte man die gesammelten Werte natürlich auch angezeigt &#8230; <a href="http://blog.purrucker.de/2011/03/29/1-wire-wetterstation-teil-3-anzeige-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Nachdem man sich eine 1-wire Wetterstation nach dem Artikel <a href="http://blog.purrucker.de/2010/03/01/1-wire-wetterstation-teil-1-installation/">1-wire Wetterstation (Teil 1: Installation)</a> gebaut und die Daten wie im Artikel <a href="http://blog.purrucker.de/2011/02/13/1-wire-wetterstation-teil-2-datenbank-2/">1-wire Wetterstation (Teil 2: Datenbank)</a> beschrieben in einer MySQL Tabelle speichert möchte man die gesammelten Werte natürlich auch angezeigt bekommen.</p>
<p>Um möglichst einfach die gemessenen Werte der Wetterstation in einer Webseite anzuzeigen, habe ich die jpgraph verwendet. Diese Software darf für private Zwecke kostenlos verwendet werden. Da sie ansonsten Geld kostet ist sie nicht im Repository zu finden. Man kann sie aber unter der URL http://jpgraph.net/download runterladen. Ich habe mir von dort die aktuelle Version 3.07 geholt und in das Verzeichnis <code>/usr/share/jpgraph3</code> entpackt. Danach benötigt man noch das Paket <code>php5-gd</code>. Diese ist im Repository enthalten und kann mit dem folgenden Befehl installiert werden.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-gd</pre></div></div>

<p>Um aus den gesammelten Wetterdaten eine Grafik mit den Werten des letzten Tages erstellen zu lassen, habe ich das Verzeichnis <code>/var/www/grafiken</code> angelegt und das folgenden PHP-Programm geschrieben, welches die Grafiken aus erzeugt.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//****************************************************************************</span>
<span style="color: #666666; font-style: italic;">//Darstellung von Temperatur und Feuchtigkeit der letzten 24 Stunden als Graph</span>
<span style="color: #666666; font-style: italic;">//14.02.2011 Kristian Purrucker</span>
<span style="color: #666666; font-style: italic;">//****************************************************************************</span>
&nbsp;
<span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/usr/share/jpgraph3/jpgraph.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/usr/share/jpgraph3/jpgraph_line.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/usr/share/jpgraph3/jpgraph_mgraph.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/usr/share/jpgraph3/jpgraph_date.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$DatabaseHost</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$DatabaseUser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;root&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$DatabasePassword</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;asdfgh&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$Database</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;wetterstation&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$Table</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;daten_min&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$fileName</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/var/www/grafiken/graph_daily.png&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Datenbankanbindung</span>
<span style="color: #666666; font-style: italic;">//******************</span>
<span style="color: #000088;">$DatabasePointer</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$DatabaseHost</span><span style="color: #339933;">,</span> <span style="color: #000088;">$DatabaseUser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$DatabasePassword</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Keine Verbindung moeglich&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Database</span><span style="color: #339933;">,</span> <span style="color: #000088;">$DatabasePointer</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Die Datenbank existiert nicht&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">//Auslesen der letzten 1440 Zeilen (= Tag) aus der Datenbank</span>
<span style="color: #666666; font-style: italic;">//**********************************************************</span>
<span style="color: #000088;">$ResultPointer</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT zeitstempel, temp_clara, humidity_clara, temp_simon, humidity_simon FROM <span style="color: #006699; font-weight: bold;">$Table</span> ORDER BY zeitstempel DESC LIMIT 1440&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$temp_clara_average</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$temp_simon_average</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$humidity_clara_average</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$humidity_simon_average</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$Export</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ResultPointer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$Daten</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ResultPointer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #000088;">$temp_clara</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">temp_clara</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$temp_clara_average</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp_clara_average</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">temp_clara</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$temp_simon</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">temp_simon</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$temp_simon_average</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp_simon_average</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">temp_simon</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$humidity_clara</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">humidity_clara</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$humidity_clara_average</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$humidity_clara_average</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">humidity_clara</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$humidity_simon</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">humidity_simon</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$humidity_simon_average</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$humidity_simon_average</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">humidity_simon</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$xdata</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Daten</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">zeitstempel</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$temp_clara_average</span> <span style="color: #339933;">=</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp_clara_average</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp_clara_average</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">1440</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$humidity_clara_average</span> <span style="color: #339933;">=</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$humidity_clara_average</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$humidity_clara_average</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">1440</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$temp_simon_average</span> <span style="color: #339933;">=</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp_simon_average</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp_simon_average</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">1440</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$humidity_simon_average</span> <span style="color: #339933;">=</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$humidity_simon_average</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$humidity_simon_average</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">1440</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">//Funktion zur Konvertierung des TimeStamp in Minuten und Sekunden</span>
<span style="color: #666666; font-style: italic;">//****************************************************************</span>
<span style="color: #000000; font-weight: bold;">function</span>  TimeCallback<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$aVal</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">#return Date ('H:i:s d.m Y',$aVal);
</span>    <span style="color: #b1b100;">return</span> <span style="color: #990000;">Date</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'H:i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$aVal</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">//Erzeugung eines Graphen fuer Claras Zimmer</span>
<span style="color: #666666; font-style: italic;">//******************************************</span>
<span style="color: #000088;">$graph</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Graph<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">700</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">200</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetScale</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'datint'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetY2Scale</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'int'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_temp_clara</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> LinePlot<span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp_clara</span><span style="color: #339933;">,</span> <span style="color: #000088;">$xdata</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_humidity_clara</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> LinePlot<span style="color: #009900;">&#40;</span><span style="color: #000088;">$humidity_clara</span><span style="color: #339933;">,</span> <span style="color: #000088;">$xdata</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Grafik Formatieren</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">img</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetMargin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#000000&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetMarginColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#333333&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetShadow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Titel</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Claras Zimmer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFont</span><span style="color: #009900;">&#40;</span>FF_FONT2<span style="color: #339933;">,</span>FS_BOLD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">subtitle</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Aktuell: <span style="color: #006699; font-weight: bold;">$temp_clara[0]</span> C / <span style="color: #006699; font-weight: bold;">$humidity_clara[0]</span>%   Durchschnittlich: <span style="color: #006699; font-weight: bold;">$temp_clara_average</span> C / <span style="color: #006699; font-weight: bold;">$humidity_clara_average</span>%&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">subtitle</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Legende</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">legend</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Pos</span><span style="color: #009900;">&#40;</span><span style="color:#800080;">0.50</span><span style="color: #339933;">,</span><span style="color:#800080;">0.95</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;center&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;bottom&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">legend</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetLayout</span><span style="color: #009900;">&#40;</span>LEGEND_HOR<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">legend</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetShadow</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_temp_clara</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetLegend</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Lufttemperatur (C) &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_humidity_clara</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetLegend</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Luftfeuchtigkeit &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//X-Achse</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Zeit&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetLabelFormatCallback</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'TimeCallback'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFont</span><span style="color: #009900;">&#40;</span>FF_FONT1<span style="color: #339933;">,</span>FS_BOLD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Y-Achse</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">yaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#FF7777&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">y2axis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#1111ee&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">yaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Grad Celsius&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">y2axis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;% Luftfeuchtigkeit&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">yaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">y2axis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">yaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFont</span><span style="color: #009900;">&#40;</span>FF_FONT1<span style="color: #339933;">,</span>FS_BOLD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">y2axis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFont</span><span style="color: #009900;">&#40;</span>FF_FONT1<span style="color: #339933;">,</span>FS_BOLD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Linie 1</span>
<span style="color: #000088;">$lineplot_temp_clara</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#FF8888&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_temp_clara</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFillColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#EE0000@0.6&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_temp_clara</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetWeight</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Linie 2</span>
<span style="color: #000088;">$lineplot_humidity_clara</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#8888ff&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_humidity_clara</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFillColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#2222DD@0.6&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_humidity_clara</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetWeight</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Die Linien zu der Grafik hinzufügen</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Add</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lineplot_temp_clara</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">AddY2</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lineplot_humidity_clara</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Erzeugung eines Graphen fuer Simons Zimmer</span>
<span style="color: #666666; font-style: italic;">//******************************************</span>
<span style="color: #000088;">$graph2</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Graph<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">700</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">200</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetScale</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'datint'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetY2Scale</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'int'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_temp_simon</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> LinePlot<span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp_simon</span><span style="color: #339933;">,</span> <span style="color: #000088;">$xdata</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_humidity_simon</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> LinePlot<span style="color: #009900;">&#40;</span><span style="color: #000088;">$humidity_simon</span><span style="color: #339933;">,</span> <span style="color: #000088;">$xdata</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Grafik Formatieren</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">img</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetMargin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#000000&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetMarginColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#333333&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetShadow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Titel</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Simons Zimmer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFont</span><span style="color: #009900;">&#40;</span>FF_FONT2<span style="color: #339933;">,</span>FS_BOLD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">subtitle</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Aktuell: <span style="color: #006699; font-weight: bold;">$temp_simon[0]</span> C / <span style="color: #006699; font-weight: bold;">$humidity_simon[0]</span>%   Durchschnittlich: <span style="color: #006699; font-weight: bold;">$temp_simon_average</span> C / <span style="color: #006699; font-weight: bold;">$humidity_simon_average</span>%&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">subtitle</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Legende</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">legend</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Pos</span><span style="color: #009900;">&#40;</span><span style="color:#800080;">0.50</span><span style="color: #339933;">,</span><span style="color:#800080;">0.95</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;center&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;bottom&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">legend</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetLayout</span><span style="color: #009900;">&#40;</span>LEGEND_HOR<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">legend</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetShadow</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_temp_simon</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetLegend</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Lufttemperatur (C) &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_humidity_simon</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetLegend</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Luftfeuchtigkeit &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//X-Achse</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Zeit&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetLabelFormatCallback</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'TimeCallback'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFont</span><span style="color: #009900;">&#40;</span>FF_FONT1<span style="color: #339933;">,</span>FS_BOLD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Y-Achse</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">yaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#FF7777&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">y2axis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#1111ee&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">yaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Grad Celsius&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">y2axis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;% Luftfeuchtigkeit&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">yaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">y2axis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#CCCCCC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">yaxis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFont</span><span style="color: #009900;">&#40;</span>FF_FONT1<span style="color: #339933;">,</span>FS_BOLD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">y2axis</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFont</span><span style="color: #009900;">&#40;</span>FF_FONT1<span style="color: #339933;">,</span>FS_BOLD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Linie 1</span>
<span style="color: #000088;">$lineplot_temp_simon</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#FF8888&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_temp_simon</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFillColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#EE0000@0.6&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_temp_simon</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetWeight</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Linie 2</span>
<span style="color: #000088;">$lineplot_humidity_simon</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#8888ff&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_humidity_simon</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetFillColor</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#2222DD@0.6&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineplot_humidity_simon</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetWeight</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Die Linien zu der Grafik hinzufügen</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Add</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lineplot_temp_simon</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$graph2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">AddY2</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lineplot_humidity_simon</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Graphen zusammen bauen</span>
<span style="color: #666666; font-style: italic;">//**********************</span>
<span style="color: #000088;">$mgraph</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MGraph<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">700</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">400</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;auto&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$mgraph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetMargin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$mgraph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Add</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$graph</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$mgraph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Add</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$graph2</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$mgraph</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Stroke</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fileName</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Anschließend habe ich zum anzeigen der Grafiken die folgende, einfache HTML-Seite geschrieben und in das Verzeichnis /var/www gelegt.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
   &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;title&gt;Herzlich Willkommen bei preetz.dnsalias.net!&lt;/title&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;/&gt;
    &lt;link rel=&quot;shortcut icon&quot; href=&quot;/favicon.ico&quot; /&gt;
    &lt;meta name=&quot;robots&quot; content=&quot;noindex&quot; /&gt;
        &lt;style type=&quot;text/css&quot;&gt;&lt;!--
    body {
        color: #444444;
        background-color: #EEEEEE;
        font-family: 'Trebuchet MS', sans-serif;
        font-size: 80%;
    }
    h1 {}
    h2 {
        font-size: 1.2em;
        text-align: center;
    }
    p.center { text-align: center; }
    #page{
        background-color: #FFFFFF;
        width: 60%;
        margin: 24px auto;
        padding: 12px;
    }
    #header{
        padding: 6px ;
        text-align: center;
    }
    .header{ background-color: #997; color: #FFFFFF; }
    #content {
        padding: 4px 0 24px 0;
    }
    #footer {
        color:#666666;
        background: #f9f9f9;
        padding: 10px 20px;
        border-top: 5px #efefef solid;
        font-size: 0.8em;
        text-align: center;
    }
    #footer a {
        color: #999999;
    }
    --&gt;&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id=&quot;page&quot;&gt;
        &lt;div id=&quot;header&quot; class=&quot;header&quot;&gt;
            &lt;h1&gt;Herzlich Willkommen bei &lt;!--ADRESSE//--&gt;preetz.dnsalias.net!&lt;!--ADRESSE//--&gt;&lt;/h1&gt;
        &lt;/div&gt;
        &lt;div id=&quot;content&quot;&gt;
            &lt;h2&gt;Hier finden Sie die aktuellen Wetterdaten aus Preetz&lt;/h2&gt;
            &lt;p class=&quot;center&quot;&gt;&lt;img src=&quot;grafiken/graph_daily.png&quot; alt=&quot;Daily Graph&quot;&gt;&lt;/p&gt;
        &lt;/div&gt;
        &lt;div id=&quot;footer&quot;&gt;
            &lt;p&gt;Powered by &lt;a href=&quot;http://www.isilife.de&quot;&gt;Isilife GbR&lt;/a&gt;&lt;/p&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>Das Ergebnis sieht dann ungefähr so aus:<br />
<img src="http://blog.purrucker.de/wp-content/uploads/2011/03/wetterstation.jpg" alt="" title="Wetterstation" width="540" height="310" class="aligncenter size-full wp-image-996" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/03/29/1-wire-wetterstation-teil-3-anzeige-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>1-wire Wetterstation (Teil 2: Datenbank)</title>
		<link>http://blog.purrucker.de/2011/02/13/1-wire-wetterstation-teil-2-datenbank-2/</link>
		<comments>http://blog.purrucker.de/2011/02/13/1-wire-wetterstation-teil-2-datenbank-2/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 17:25:04 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Kommunikationstechnik]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[Alix]]></category>
		<category><![CDATA[AMD]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[Geode]]></category>
		<category><![CDATA[Netzwerk]]></category>
		<category><![CDATA[Sensoren]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wetter]]></category>
		<category><![CDATA[Wetterstation]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=919</guid>
		<description><![CDATA[Nachdem man sich eine 1-wire Wetterstation nach dem Artikel 1-wire Wetterstation (Teil 1: Installation) gebaut hat, ist es sinnvoll die gesammelten Daten in einer Datenbank zu speichern. Dazu habe ich mir eine MySQL-Datenbank angelegt. mysql -u root -p CREATE DATABASE &#8230; <a href="http://blog.purrucker.de/2011/02/13/1-wire-wetterstation-teil-2-datenbank-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Nachdem man sich eine 1-wire Wetterstation nach dem Artikel <a href="http://blog.purrucker.de/2010/03/01/1-wire-wetterstation-teil-1-installation/">1-wire Wetterstation (Teil 1: Installation)</a> gebaut hat, ist es sinnvoll die gesammelten Daten in einer Datenbank zu speichern. Dazu habe ich mir eine MySQL-Datenbank angelegt.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span>
CREATE DATABASE wetterstation;
quit</pre></div></div>

<p>In der Datenbank wird danach noch eine Tabelle für die Werte der 1-wire Sensoren benötigt. Da ich pro Minute einen Wert festhalten will habe ich diese daten_min genannt.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span>
connect wetterstation; 
CREATE TABLE daten_min <span style="color: #7a0874; font-weight: bold;">&#40;</span> 
zeitstempel int UNSIGNED, 
temp_clara FLOAT<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">7</span>,<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> NOT NULL, 
humidity_clara FLOAT<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">7</span>,<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> NOT NULL, 
temp_simon FLOAT<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">7</span>,<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> NOT NULL, 
humidity_simon FLOAT<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">7</span>,<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> NOT NULL, 
PRIMARY KEY <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">`</span>zeitstempel<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
quit</pre></div></div>

<p>Zum Schluss habe ich mir dann noch ein PHP-Programm geschrieben, dass die Werte der Sensoren abfragt und in die Tabelle schreibt. Dieses habe ich in der Datei <code>/usr/local/sbin/datensammeln.php</code> gespeichert.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$DatabaseHost</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$DatabaseUser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;root&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$DatabasePassword</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;geheim&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$Database</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;wetterstation&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$Table</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;daten_min&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Aktuelle UNIX-Zeit abfagen</span>
<span style="color: #990000;">date_default_timezone_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Europe/Berlin&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$zeitstempel</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;U&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ##### Werte der Sensoren abfragen #####</span>
<span style="color: #666666; font-style: italic;">// Claras Zimmer</span>
<span style="color: #000088;">$temp_clara</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/var/1wire/26.7ECCCF000000/temperature&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$humidity_clara</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/var/1wire/26.7ECCCF000000/humidity&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Simons Zimmer</span>
<span style="color: #000088;">$temp_simon</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/var/1wire/26.A0AECF000000/temperature&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$humidity_simon</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/var/1wire/26.A0AECF000000/humidity&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ##### Daten in die Datenbank schreiben #####</span>
<span style="color: #000088;">$DatabasePointer</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$DatabaseHost</span><span style="color: #339933;">,</span> <span style="color: #000088;">$DatabaseUser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$DatabasePassword</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Keine Verbindung moeglich&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Database</span><span style="color: #339933;">,</span> <span style="color: #000088;">$DatabasePointer</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Die Datenbank existiert nicht&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ResultPointer</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO <span style="color: #006699; font-weight: bold;">$Table</span> (
     zeitstempel, temp_clara, humidity_clara, temp_simon, humidity_simon
   ) VALUES (
     '<span style="color: #006699; font-weight: bold;">$zeitstempel</span>', '<span style="color: #006699; font-weight: bold;">$temp_clara</span>', '<span style="color: #006699; font-weight: bold;">$humidity_clara</span>', '<span style="color: #006699; font-weight: bold;">$temp_simon</span>', '<span style="color: #006699; font-weight: bold;">$humidity_simon</span>'
   )&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Damit man php in der Shell laufen lassen kann wird übrigens das Paket php5-cli benötigt. Dieses kann man mit dem folgenden Befehl installieren</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php-cli</pre></div></div>

<p>Zum Schluss habe ich einen Cronjob angelegt, der alle 60 Sekunden das PHP-Script ausführt.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/02/13/1-wire-wetterstation-teil-2-datenbank-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu: WLAN beim booten automatisch starten</title>
		<link>http://blog.purrucker.de/2011/02/13/ubuntu-wlan-beim-booten-automatisch-starten/</link>
		<comments>http://blog.purrucker.de/2011/02/13/ubuntu-wlan-beim-booten-automatisch-starten/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 16:13:01 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Kommunikationstechnik]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Netzwerk]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WLAN]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=930</guid>
		<description><![CDATA[Bei Ubuntu wird das WLAN-Interface normaler Weise über den Networkmanager gestartet. Dies bedeutet, dass man sich mit einem Benutzer an der grafischen Oberfläche anmelden muss, damit sich das WLAN aktiviert. Bei Servern und anderen Gräten ohne grafische Oberfläche möchte man &#8230; <a href="http://blog.purrucker.de/2011/02/13/ubuntu-wlan-beim-booten-automatisch-starten/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bei Ubuntu wird das WLAN-Interface normaler Weise über den Networkmanager gestartet. Dies bedeutet, dass man sich mit einem Benutzer an der grafischen Oberfläche anmelden muss, damit sich das WLAN aktiviert. Bei Servern und anderen Gräten ohne grafische Oberfläche möchte man aber oft sofort nach dem Booten ein funktionierendes WLAN. In diesem Fall sollte man wpa_supplicant installieren und konfigurieren. Eine Anleitung dazu findet man auf der Webseite <a href="http://wiki.ubuntuusers.de/WLAN/wpa_supplicant">wiki.ubuntuusers.de</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/02/13/ubuntu-wlan-beim-booten-automatisch-starten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OMSA unter Ubuntu für den Dell PERC H700 einrichten</title>
		<link>http://blog.purrucker.de/2011/01/24/omsa-unter-ubuntu-fur-den-dell-perc-h700-einrichten/</link>
		<comments>http://blog.purrucker.de/2011/01/24/omsa-unter-ubuntu-fur-den-dell-perc-h700-einrichten/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 12:53:03 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Hersteller]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[OMSA]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=904</guid>
		<description><![CDATA[In den Dell PowerEdge Servern wird aktuell häufig der PERC H700 RAID-Controler verbaut. Als ich Heute bei einem solchen Server &#8211; der mit der aktuellen &#8220;Long Term Support&#8221; Ubuntu-Version &#8220;10.04 LTS&#8221; läuft &#8211; den OMSA (OpenManage Server Administrator) installierte, überraschte &#8230; <a href="http://blog.purrucker.de/2011/01/24/omsa-unter-ubuntu-fur-den-dell-perc-h700-einrichten/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In den Dell PowerEdge Servern wird aktuell häufig der PERC H700 RAID-Controler verbaut. Als ich Heute bei einem solchen Server &#8211; der mit der aktuellen &#8220;Long Term Support&#8221; Ubuntu-Version  &#8220;10.04 LTS&#8221; läuft &#8211; den OMSA (OpenManage Server Administrator) installierte, überraschte mich dieser gleich mit der Warnung: <code>Controller 0 [PERC H700 Integrated]: Driver '00.00.04.01' is out of date</code>.</p>
<p>Nach ein wenig Recherche im Internet zeigte sich, dass der Treiber 00.00.04.01 eigentlich o.k. ist. Da bei RedHat und SuSe aber inzwischen neuere Treiber verwendet werden, verlangt der OMSA hier den neuen.</p>
<p>Da mich die Warnung in der Überwachung stört, habe ich diese einfach abgeschaltet. Dazu ändert man einfach die Datei <code>lsiver.cfg</code> entsprechend ab. Wenn man das OMSA 6.4 Paket von Dell installiert hat (dieses finde man unter der URL: <a href="http://linux.dell.com/repo/community/deb/">http://linux.dell.com/repo/community/deb/</a>), liegt diese Datei in dem Verzeichnis <code>/opt/dell/srvadmin/etc/srvadmin-storage/</code>.</p>
<p>In der Datei <code>lsiver.cfg</code> gibt es einen Abschnitt der wie folgt beginnt:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">ID</span>=0x1F17
<span style="color: #007800;">VENDORID</span>=<span style="color: #000000;">4</span>
<span style="color: #007800;">NAME</span>=PERC H700 Integrated</pre></div></div>

<p>In diesem Abschnitt steht etwas weiter unten die Zeile:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DEF-LX26-<span style="color: #000000;">64</span>=00.00.04.27</pre></div></div>

<p>Wenn man hier die <code>27</code> in <code>01</code> ändert und alle OMSA Services (am besten den ganzen Server) neu startet ist der Alarm weg.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/01/24/omsa-unter-ubuntu-fur-den-dell-perc-h700-einrichten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aus der Dell OMSA Live-CD einen Live-USB-Stick machen</title>
		<link>http://blog.purrucker.de/2011/01/21/aus-der-dell-omsa-live-cd-einen-live-usb-stick-machen/</link>
		<comments>http://blog.purrucker.de/2011/01/21/aus-der-dell-omsa-live-cd-einen-live-usb-stick-machen/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 14:51:11 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Hersteller]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[OMSA]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=902</guid>
		<description><![CDATA[Bei heutigen Server kommt es oft vor, dass man kein CD-ROM oder DVD Laufwerk mehr hat. In diesem Fall kann es sehr nützlich sein, anstelle einer Live-CD einen Live-USB-Stick zu haben. Dazu benötigt man nur das Image der OMSA Live-CD &#8230; <a href="http://blog.purrucker.de/2011/01/21/aus-der-dell-omsa-live-cd-einen-live-usb-stick-machen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bei heutigen Server kommt es oft vor, dass man kein CD-ROM oder DVD Laufwerk mehr hat. In diesem Fall kann es sehr nützlich sein, anstelle einer Live-CD einen Live-USB-Stick zu haben. Dazu benötigt man nur das Image der OMSA Live-CD von dem Webserver von Dell (die aktuelle Version ist die <a href="http://linux.dell.com/files/openmanage-contributions/omsa-64-live/OMSA64-CentOS55-x86_64-LiveCD.iso">OMSA Lice-CD 6.4</a>) und den <a href="https://fedorahosted.org/releases/l/i/liveusb-creator/">liveusb-creator</a>. Und schon kann man sich innerhalb von wenigen Minuten einen Dell OMSA Live-USB-Stick erstellen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/01/21/aus-der-dell-omsa-live-cd-einen-live-usb-stick-machen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Broadcom NetXtreme II Firmware unter Debian</title>
		<link>http://blog.purrucker.de/2011/01/17/broadcom-netxtreme-ii-firmware-unter-debian/</link>
		<comments>http://blog.purrucker.de/2011/01/17/broadcom-netxtreme-ii-firmware-unter-debian/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 15:08:30 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Hersteller]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Broadcom]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[Netzwerk]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=899</guid>
		<description><![CDATA[Ab Debian 5 ist die Firmware für die Broadcom NetXtreme II Netzwerkkarte (diese ist z.B. bei HP DL3xx und Dell PowerEdge Servern verbaut) in die non-free Paketquellen verschoben worden. Wenn man einen Server neu installiert oder aktualisiert hat muss man &#8230; <a href="http://blog.purrucker.de/2011/01/17/broadcom-netxtreme-ii-firmware-unter-debian/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ab Debian 5 ist die Firmware für die Broadcom NetXtreme II Netzwerkkarte (diese ist z.B. bei HP DL3xx und Dell PowerEdge Servern verbaut) in die <strong>non-free</strong> Paketquellen verschoben worden. Wenn man einen Server neu installiert oder aktualisiert hat muss man diese gegebenenfalls wie folgt nachinstallieren:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> firmware-bnx2</pre></div></div>

<p>Die Voraussetzung ist natürlich, dass die <strong>non-free</strong> Paketquellen eingebunden sind.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/01/17/broadcom-netxtreme-ii-firmware-unter-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dell OMSA 6.3 Live CD</title>
		<link>http://blog.purrucker.de/2010/12/10/dell-omsa-6-3-live-cd/</link>
		<comments>http://blog.purrucker.de/2010/12/10/dell-omsa-6-3-live-cd/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 12:20:19 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Hersteller]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[OMSA]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=888</guid>
		<description><![CDATA[Wie gewohnt hat Dell mal wieder eine aktualisierte Live CD mit dem OMSA (Open Manage Server Agent) 6.3 auf Basis von CentOS bereit gestellt. Man findet diese auf einem FTP-Server von Dell unter der folgenden URL: http://linux.dell.com/files/openmanage-contributions/omsa-63-live/ In der Vergangenheit &#8230; <a href="http://blog.purrucker.de/2010/12/10/dell-omsa-6-3-live-cd/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wie gewohnt hat Dell mal wieder eine aktualisierte Live CD mit dem OMSA (Open Manage Server Agent) 6.3 auf Basis von CentOS bereit gestellt. Man findet diese auf einem FTP-Server von Dell unter der folgenden URL: <a href="http://linux.dell.com/files/openmanage-contributions/omsa-63-live/">http://linux.dell.com/files/openmanage-contributions/omsa-63-live/</a></p>
<p>In der Vergangenheit hatte Dell bereit regelmäßig solche Live CDs veröffentlicht. darüber habe ich bereit in dem Post <a href="http://blog.purrucker.de/2009/02/25/omsa-55-livecd-mit-vielen-dell-treibern-und-diagnose-tools/">OMSA 5.5 LiveCD mit vielen Dell-Treibern und Diagnose-Tools</a> berichtet.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2010/12/10/dell-omsa-6-3-live-cd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware Tools unter Ubuntu 10.04 installieren</title>
		<link>http://blog.purrucker.de/2010/11/08/vmware-tools-unter-ubuntu-10-04-installieren/</link>
		<comments>http://blog.purrucker.de/2010/11/08/vmware-tools-unter-ubuntu-10-04-installieren/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 13:48:17 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Hersteller]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VM-Ware]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=853</guid>
		<description><![CDATA[Bei Windows Gastsystemen können die VMware Tools per Mausklick über den &#8220;VMware Infrastucture Client&#8221; installiert werden. Bei Ubuntu muss man selber Hand anlegen. Dies war leider auch schon bei älteren VMware Tools und Ubuntu 9.04 so. Zudem ist zu beachten, &#8230; <a href="http://blog.purrucker.de/2010/11/08/vmware-tools-unter-ubuntu-10-04-installieren/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bei Windows Gastsystemen können die VMware Tools per Mausklick über den &#8220;VMware Infrastucture Client&#8221; installiert werden. Bei Ubuntu muss man selber Hand anlegen. Dies war leider auch schon bei älteren <a href="http://blog.purrucker.de/2009/05/01/vmware-tools-unter-ubuntu-904-installieren/">VMware Tools und Ubuntu 9.04</a> so. Zudem ist zu beachten, dass man bei vSphere 4.0 mindestens das Update 2 installiert haben muss, damit die VMware Tools unter Ubuntu 10.04 laufen.</p>
<p>Um die VMware Tools bei Ubuntu 10.04 zu installieren, benötigt man das zum VMware Server oder zur VMware Workstation passende CD-Image der &#8220;VMware Tools CD&#8221;. Diese kann über den vSphere Client gemountet werden. Dies geschieht automatisch, wenn man in den Einstellungen der virtuellen Maschine als virtuelles CDROM den Gerätetyp &#8220;Clientgerät&#8221; aktiviert hat und im Menü unter Gast die Aktion &#8220;Installation und Aktualisierung von VMware Tools&#8221; anklickt. Danach muss man sich über die VMware Console an dem Gast anmelden und die CD einbinden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>cdrom <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></div></div>

<p>Wenn man die CD eingebunden hat, braucht man nur noch das Archiv auf die Festplatte kopieren, auspacken und mit dem Installationsprogramm vmware-install.pl installieren (dies funktioniert allerdings nur wenn man als root auf der VMware-Konsole angemeldet ist. Bei einer SSH-Verbindung schlägt die Installation fehl!):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential linux-headers-<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`</span> psmisc
<span style="color: #7a0874; font-weight: bold;">cd</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>VMwareTools<span style="color: #000000; font-weight: bold;">*</span>.tar.gz .
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvf VMwareTools<span style="color: #000000; font-weight: bold;">*</span>.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> vmware-tools-distrib<span style="color: #000000; font-weight: bold;">/</span>
.<span style="color: #000000; font-weight: bold;">/</span>vmware-install.pl</pre></div></div>

<p>Bei der Installation können normaler Weise alle vorgeschlagenen Einstellungen übernommen werden. Nachdem die Installation abgeschlossen ist werden die VMware Tools automatisch gestartet. Weitere Informationen über die VMware Tools unter Ubuntu kann man im <a href="http://wiki.ubuntuusers.de/VMware/Tools">Wiki der deutschen Ubuntu User finden</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2010/11/08/vmware-tools-unter-ubuntu-10-04-installieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mit Postfix einen BCC automatisch setzen</title>
		<link>http://blog.purrucker.de/2010/11/01/mit-postfix-einen-bcc-automatisch-setzen/</link>
		<comments>http://blog.purrucker.de/2010/11/01/mit-postfix-einen-bcc-automatisch-setzen/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 11:44:10 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Kommunikationstechnik]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[E-Mail]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=847</guid>
		<description><![CDATA[Ab Postfix 2.1 kann man mit der Direktive recipient_bcc_maps einen BCC (blind carbon-copy) Empfänger automatisch setzen lassen. Wenn man bei E-Mails von user1@domain1.com automatisch user2@domain2.com als BCC Empfänger setzen möchte, legt man eine Datei /etc/postfix/recipient_bcc an, die wir folgt aussehen &#8230; <a href="http://blog.purrucker.de/2010/11/01/mit-postfix-einen-bcc-automatisch-setzen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ab Postfix 2.1 kann man mit der Direktive recipient_bcc_maps einen BCC (blind carbon-copy) Empfänger automatisch setzen lassen. </p>
<p>Wenn man bei E-Mails von user1@domain1.com automatisch user2@domain2.com als BCC Empfänger setzen möchte, legt man eine Datei <code>/etc/postfix/recipient_bcc</code> an, die wir folgt aussehen sollte:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">user1<span style="color: #000000; font-weight: bold;">@</span>domain1.com user2<span style="color: #000000; font-weight: bold;">@</span>domain2.com</pre></div></div>

<p>Danach erzeugt man eine Hash-Tabelle aus der Datei:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">postmap <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>recipient_bcc</pre></div></div>

<p>Zum Schluss bindet man die Datei in Postfix ein, indem man in die Datei <code>main.cf</code> zusätzlich die folgende Zeile schreibt und Postfix einmal neu startet:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">recipient_bcc_maps = <span style="color: #7a0874; font-weight: bold;">hash</span>:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>postfix<span style="color: #000000; font-weight: bold;">/</span>recipient_bcc</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2010/11/01/mit-postfix-einen-bcc-automatisch-setzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

