<?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/kategorien/computer-technik/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.purrucker.de</link>
	<description>Informationstechnologie, Sport und anderes ...</description>
	<lastBuildDate>Tue, 07 Feb 2012 12:20:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>FreeRADIUS: Begrenzung der Zugriffszeit nach der ersten Benutzung</title>
		<link>http://blog.purrucker.de/2011/09/13/freeradius-begrenzung-der-zugriffszeit-nach-der-ersten-benutzung/</link>
		<comments>http://blog.purrucker.de/2011/09/13/freeradius-begrenzung-der-zugriffszeit-nach-der-ersten-benutzung/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 10:13:41 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Kommunikationstechnik]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Authentisierung]]></category>
		<category><![CDATA[Authorisierung]]></category>
		<category><![CDATA[Benutzer]]></category>
		<category><![CDATA[FreeRADIUS]]></category>
		<category><![CDATA[Zugang]]></category>
		<category><![CDATA[Zugriff]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=1062</guid>
		<description><![CDATA[Mit Hilfe eines Moduls kann man den FreeRADIUS dazu bringen, dass ein Benutzerzugang nach einer vorgegebenen Zeit nach der ersten Anmeldung abläuft. Dazu erzeugt man ein neues Modul innerhalb des Modulverzeichnisses (dieses findet man meistens unter /etc/freeradius/modules/). Ich habe da &#8230; <a href="http://blog.purrucker.de/2011/09/13/freeradius-begrenzung-der-zugriffszeit-nach-der-ersten-benutzung/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Mit Hilfe eines Moduls kann man den FreeRADIUS dazu bringen, dass ein Benutzerzugang nach einer vorgegebenen Zeit nach der ersten Anmeldung abläuft. Dazu erzeugt man ein neues Modul innerhalb des Modulverzeichnisses (dieses findet man meistens unter /etc/freeradius/modules/). Ich habe da Modul passender Weise accessperiod genannt und es sollte wie folgt aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> sqlcounter accessperiod <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    counter-name = Max-Access-Period-Time
    check-name = Access-Period
    sqlmod-inst = sql
    key = User-Name
    reset = never
    query = <span style="color: #ff0000;">&quot;SELECT IFNULL((SELECT TIME_TO_SEC(TIMEDIFF(Now(),AcctStartTime)) FROM radacct WHERE UserName = '%{%k}' ORDER BY AcctStartTime LIMIT 1),0)&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Danach fügt man das Modul am Ende der entsprechenden Authorize-Section der Site des FreeRADIUS ein. Diese könnte dann z.B. wie folgt aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">authorize <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        preprocess
        chap
        mschap
        suffix
        eap <span style="color: #7a0874; font-weight: bold;">&#123;</span>
                ok = <span style="color: #7a0874; font-weight: bold;">return</span>
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
        unix
        sql
        expiration
        logintime
        pap
        noresetcounter
        dailycounter
        monthlycounter
        accessperiod
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Damit die Konfiguration aktiv wird, muss der FreeRADIUS neu gestartet oder geladen werden und bei den entsprechenden Benutzern muss in der Tabelle radcheck noch das Attribut Access-Period vorgegeben werden. Das könnte z.B. wie folgt aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">+—-+———–+——————-+—-+————-+
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000; font-weight: bold;">|</span> UserName <span style="color: #000000; font-weight: bold;">|</span> Attribute <span style="color: #000000; font-weight: bold;">|</span> op <span style="color: #000000; font-weight: bold;">|</span> Value <span style="color: #000000; font-weight: bold;">|</span>
+—-+———–+——————-+—-+————-+
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">|</span> benutzer2 <span style="color: #000000; font-weight: bold;">|</span> Access-Period <span style="color: #000000; font-weight: bold;">|</span> := <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">3600</span> <span style="color: #000000; font-weight: bold;">|</span>
+—-+———–+——————-+—-+————-+</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/09/13/freeradius-begrenzung-der-zugriffszeit-nach-der-ersten-benutzung/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>Grafikkartentreiber für VMware-Gäste bei Windows 2008R2</title>
		<link>http://blog.purrucker.de/2011/03/07/grafikkartentreiber-fur-vmware-gaste-bei-windows-2008r2/</link>
		<comments>http://blog.purrucker.de/2011/03/07/grafikkartentreiber-fur-vmware-gaste-bei-windows-2008r2/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 22:50:16 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Hersteller]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[2008R2]]></category>
		<category><![CDATA[Grafikkarte]]></category>
		<category><![CDATA[Treiber]]></category>
		<category><![CDATA[VM-Ware]]></category>
		<category><![CDATA[VMware-Tools]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=972</guid>
		<description><![CDATA[Bei älteren Windows Versionen wurde bei der Installation der VMware-Tools automatisch ein spezieller Grafikkartentreiber aktiviert. Dieser sorgt dafür das die Maus nicht mehr so nachzieht. Bei Windows 2008R2 wird dieser zwar noch in das Verzeichnis C:\Program Files\Common Files\VMware\Drivers\wddm_video kopiert, aber &#8230; <a href="http://blog.purrucker.de/2011/03/07/grafikkartentreiber-fur-vmware-gaste-bei-windows-2008r2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bei älteren Windows Versionen wurde bei der Installation der VMware-Tools automatisch ein spezieller Grafikkartentreiber aktiviert. Dieser sorgt dafür das die Maus nicht mehr so nachzieht. Bei Windows 2008R2 wird dieser zwar noch in das Verzeichnis <code>C:\Program Files\Common Files\VMware\Drivers\wddm_video</code> kopiert, aber nicht mehr installiert und aktiviert. Man sollte bei Windows 2008R2 Servern also darauf achten, dass man diesen Treiber hinterher von Hand installiert und aktiviert.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/03/07/grafikkartentreiber-fur-vmware-gaste-bei-windows-2008r2/feed/</wfw:commentRss>
		<slash:comments>0</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>Ubuntu als Router verwenden</title>
		<link>http://blog.purrucker.de/2011/01/24/ubuntu-als-router-verwenden/</link>
		<comments>http://blog.purrucker.de/2011/01/24/ubuntu-als-router-verwenden/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 17:05:55 +0000</pubDate>
		<dc:creator>kristian</dc:creator>
				<category><![CDATA[Computer & Technik]]></category>
		<category><![CDATA[Hersteller]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Netzwerk]]></category>
		<category><![CDATA[Router]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.purrucker.de/?p=915</guid>
		<description><![CDATA[Bei einer Standard-Installation von Ubuntu ist das Routing bzw. IP-Forwarding deaktiviert. Das IP-Forwarding kann aber mit dem folgenden Befehl temporär aktiviert werden: sudo sysctl -w net.ipv4.ip_forward=1 Wenn man es dauerhaft einschalten möchte muss in der Datei /etc/sysctl.conf die Variable net.ipv4.ip_forward &#8230; <a href="http://blog.purrucker.de/2011/01/24/ubuntu-als-router-verwenden/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bei einer Standard-Installation von Ubuntu ist das Routing bzw. IP-Forwarding deaktiviert. Das IP-Forwarding kann aber mit dem folgenden Befehl temporär aktiviert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> sysctl <span style="color: #660033;">-w</span> net.ipv4.ip_forward=<span style="color: #000000;">1</span></pre></div></div>

<p>Wenn man es dauerhaft einschalten möchte muss in der Datei <code>/etc/sysctl.conf</code> die Variable <code>net.ipv4.ip_forward</code> auf <code>1</code> gesetzt werden. Die Zeile sollte dann wie folgt aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">net.ipv4.ip_forward=<span style="color: #000000;">1</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.purrucker.de/2011/01/24/ubuntu-als-router-verwenden/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>
	</channel>
</rss>

