<?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>Jeans Weblog</title>
	<atom:link href="http://jeanbruenn.info/feed" rel="self" type="application/rss+xml" />
	<link>http://jeanbruenn.info</link>
	<description>a computer without windows is like a chocolatecake without mustard</description>
	<lastBuildDate>Thu, 04 Mar 2010 00:55:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Update</title>
		<link>http://jeanbruenn.info/general_update.html</link>
		<comments>http://jeanbruenn.info/general_update.html#comments</comments>
		<pubDate>Sun, 28 Feb 2010 13:20:36 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[The daily insanity]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=647</guid>
		<description><![CDATA[Hello,
today i updated this wordpress installation and moved all &#8220;pages&#8221; to &#8220;posts&#8221;. I also removed old posts, predominantly private ones, because i think i don&#8217;t want to write about my private life anymore. There are much more interesting topics about which i could write. To be honest right now i&#8217;m not even sure someone except [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>today i updated this wordpress installation and moved all &#8220;pages&#8221; to &#8220;posts&#8221;. I also removed old posts, predominantly private ones, because i think i don&#8217;t want to write about my private life anymore. There are much more interesting topics about which i could write. To be honest right now i&#8217;m not even sure someone except for 5 friends is reading this blog &#8211; So leave me a comment to prove the opposite :p</p>
<p>However, the switch from pages to post makes it possible to write &#8220;comments&#8221; to my howtos. You can see there are two new categories, one for Video stuff and one for Audio stuff. I merged &#8220;special and security&#8221; into Linux (as they&#8217;re Linux related) and &#8220;stuff&#8221; went into &#8220;general&#8221;.</p>
<p>BTW. i will continue to write in English and sometimes in German. Usually I&#8217;m writing in English, because it&#8217;s &#8220;learning by doing&#8221;.</p>
<p>Have fun <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/general_update.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DVB-T &amp; Linux</title>
		<link>http://jeanbruenn.info/video_dvb-t-linux.html</link>
		<comments>http://jeanbruenn.info/video_dvb-t-linux.html#comments</comments>
		<pubDate>Sun, 28 Feb 2010 12:16:13 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[Videos and more]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=579</guid>
		<description><![CDATA[DVB-T und Linux ist ein Spass. Zumindest solange, wie man nichts aufzeichnen will. Ich habe eine menge Probleme gehabt, Streams vernünftig aufzuzeichnen und in ein andere Format als .mpeg zu bringen. Da ich jetzt schon 3 Tage hierdran hocke, war ich kurz vorm verzweifeln. Fangen wir aber mal ganz vorne an. DVB steht für Digital [...]]]></description>
			<content:encoded><![CDATA[<p>DVB-T und Linux ist ein Spass. Zumindest solange, wie man nichts aufzeichnen will. Ich habe eine menge Probleme gehabt, Streams vernünftig aufzuzeichnen und in ein andere Format als .mpeg zu bringen. Da ich jetzt schon 3 Tage hierdran hocke, war ich kurz vorm verzweifeln. Fangen wir aber mal ganz vorne an. DVB steht für Digital Video Broadcasting. Es gibt verschiedene Arten von DVB. Diese sind erkenntlich an dem Zusatz S (Satelit), T (Terrestrisch), C (Kabel). Daneben gibt es noch ein paar Standards &#8211; Ich beschäftige mich hier allerdings ausschliesslich mit DVB-T, also der terrestrischen Übertragung.</p>
<p><span id="more-579"></span></p>
<h2>Empfang</h2>
<p>In vielen Orten ist es nicht so einfach DVB-T zu empfangen in manchen Orten angeblich sogar unmöglich. Meiner Erfahrung nach kommt es hierbei sehr stark auf die Antenne an. Das heisst: Wenn man mit der mitgelieferten Antenne nix empfängt, muss das nicht heißen das es kein DVB-T gibt. Wenn auf einer Website steht &#8220;Nur via. Dachantenne&#8221; heisst dies nicht automatisch das man unbedingt eine Dachantenne bräuchte. Hier ist angeblich nur DVB-T via Dachantenne möglich. Ich hab&#8217;s mal ausprobiert &#8211; Die mitgelieferte Stabantenne bringt keinen Empfang. Eine Stabantenne für 20 Euro mit Verstärker (15dB) bringt, sofern direkt am Fenster) einen Empfang der alle paar Minuten abbricht und relativ schlecht ist &#8211; Also auch keine Lösung. Spasseshalber habe ich als Antenne eine alte Rahmenantenne die vor 10 Jahren mal an meiner Stereo-Anlage war, angeschlossen &#8211; ca. 70% der empfangbaren Programme funktionieren fein und Problemlos &#8211; Und das ganze ohne Verstärker. Eine bessere Möglichkeit wäre es, sich eine DVB-T Antenne selber zu bauen. Der Aufwand ist, je nachdem für was für eine Antenne man sich entscheidet, sehr gering und der Kostenpunkt ebenfalls. Ein paar Artikel dazu habe ich unten verlinkt. Ich habe mich selber auch daran versucht &#8211; Mein erster Versuch ist aber fehlgeschlagen. Ich habe aber auch etwas improvisiert und nicht die richtigen Materialien verwendet&#8230; <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
<li><a href="http://www.cnet.de/praxis/insider/39189229/dvb_t_antenne+fuer+5+euro+so+klappt+der+eigenbau.htm">CNET Artikel: DVB-T-Antenne für 5 Euro: So klappt der Eigenbau</a></li>
<li><a href="http://www.cnet.de/praxis/wochenend/41001557/die+beste+eigenbau_dvb_t_antenne+doppelquad+fuer+5+euro+basteln.htm">CNET Artikel: Die beste Eigenbau-DVB-T-Antenne: Doppelquad für 5 Euro basteln</a></li>
<li><a href="http://www.cnet.de/praxis/wochenend/41002569/die+beste+dvb_t_antenne+der+welt+multi_doppelquad+im+eigenbau.htm">CNET Artikel: Die beste DVB-T-Antenne der Welt: Multi-Doppelquad im Eigenbau</a></li>
<li><a href="http://www.cnet.de/praxis/wochenend/41503233/page/2/dvb_t_antennen+im+eigenbau+bester+empfang+dank+reflektor.htm">CNET Artikel: DVB-T-Antennen im Eigenbau: bester Empfang dank Reflektor</a></li>
<li><a href="http://www.cnet.de/praxis/wochenend/41524218/dvb_t_antennenverstaerker+im+eigenbau+fuer+perfekten+tv_empfang.htm">CNET Artikel: DVB-T-Antennenverstärker im Eigenbau für perfekten TV-Empfang</a></li>
<li><a href="http://www.cnet.de/praxis/wochenend/41527204/dvb_t_antennenverstaerker+mit+externer+speisung+im+eigenbau.htm">CNET Artikel: DVB-T-Antennenverstärker mit externer Speisung im Eigenbau</a></li>
<li><a href="http://www.vdr-wiki.de/wiki/index.php/DVB-T_Antennen">Artikel über DVB-T Antennen im VDR Wiki</a></li>
</ul>
<h2>Einrichtung</h2>
<p>Die Einrichtung ist relativ einfach. Ich würde an dieser Stelle empfehlen, das Script dvbt-scanaid zu benutzen. Es wird eine Liste mit Frequenzen erstellen die man dann mit &#8220;scan&#8221; durchsuchen kann. Eine genaue Anleitung dafür findet sich auch auf der dazugehörigen Website welche ich unten verlinkt habe.</p>
<ul>
<li><a href="http://www.johannes-bauer.com/dvbt/">DVB-T unter Linux</a></li>
</ul>
<h2>Aufnahme</h2>
<p>Zum Aufnehmen von DVB-T finden sich eine menge Anleitungen. Leider haben die bei mir alle nicht funktioniert. Sobald ich avidemux oder dvbcut genutzt habe, war das Video nichtmehr in Sync. Sobald ich das endlich hinbekommen hatte, konnte ich das Video nicht in ein andere Format encodieren aufgrund von Fehlern im Video. Ich habe wie gesagt 3 Tage an dem Kram gesessen, mag sein das bei jemandem anderen, anderes gut funktioniert; hier tats die folgende Variante.</p>
<pre>
# direkt als mpeg aufzeichnen
mencoder -oac copy -ovc copy -of mpeg -mpegopts format=dvd dvb://KANAL -o /pfad/wohin/es/soll/Datei.mpg -endpos 00:90:00 -quiet
</pre>
<p>Wobei ich mit Endpos angebe das ich 90 Minuten aufzeichnen will.</p>
<h2>Encodieren</h2>
<p>Sobald man diesen Stream aufgenommen hat, will man ihn wahrscheinlich in ein andere Format bringen (x264, aac, mp4 hier). Vorher natürlich Werbung entfernen. Zum Werbung entfernen bieten sich 2 Tools an. Avidemux und dvbcut. Macht man das ganze nun in avidemux hat man a/v sync Probleme. dvbcut erschien mir da mehr zu funktionieren. Wie auch immer, damit es nicht zu A/V Sync Problemen kommt muss man die Datei erstmal transkodieren. Dies soll angeblich mit &#8220;replex&#8221; gehen und auch mit &#8220;projectx&#8221; &#8211; Bei replex hatte ich anschliessend eine Datei die im mplayer ständig Fehler liefert aber funktioniert &#8211; Trotzdem A/V Sync Probleme nach Bearbeitung mit avidemux. Projectx wollte ich eigentlich nicht benutzen weil es Java ist, habe mich dann aber doch dafuer entschieden.</p>
<h3>Probleme &#038; Anmerkungen</h3>
<uli>
<li>Da es häufiger zu A/V Sync Problemen bei mir gekommen ist, vorallem am Anfang (ich tippe auch darauf das es an DVB-T liegt) muss man ein wenig mit den Parametern rumspielen. Bei &#8220;mplex&#8221; kann man mit -O beispielsweise ein Delay eintragen. Bei Avidemux kann man dasselbe mit Shift tun. Ich musste bei meinem ersten Video 80ms benutzen und in Avidemux bei Shift -1000 (Wahrscheinlich hab ich da einfach irgendwas vermurkst) bei dem zweiten Video hatte nen Shift von -180 gereicht in Avidemux + 80 in mplex. Bei meinem dritten Video musste ich gar nichts machen A/V Sync war automatisch gegeben.</li>
<li>Der Parameter &#8220;nr=&#8221; sollte in der manpage von mencoder unter x264 nachgeschlagen werden. Genauso die Filter gradfun und hqdn3d (-vf), sowie -sws. Bei meinem ersten Video sah gradfun ganz brauchbar aus, bei den beiden letzteren habe ich das nicht benötigt. &#8211; Also auch hier ist probieren angesagt. Während des Encodierens kann man sich das Ergebnis auch laufend ansehen, wenn man nicht gerade zu sehr vorspult.</li>
<li>Manchmal ist das ganze im 4:3 Format aufgenommen. Wenn man das dann einheitlich alles in 16:9 haben will, hat man ein kleines Problemchen. Hierbei gilt zu beachten: Es gehen mit großer Wahrscheinlichkeit Informationen verloren. Ich habe weiter unten ein Beispiel gebracht wie man das ganze nach 16:9 bringt, dadurch wirkt das ganze aber etwas &#8220;näher&#8221; und ein kleiner Bereich des Videos geht verloren.</li>
<h3>Vorbereitungen</h3>
<pre>
projectx Datei.mpg
</pre>
<p>eingeben und abwarten. Die Ausgabe wird wohl ähnlich dieser hier sein:</p>
<pre>
summary of created media files:
.Video (m2v):   239668 Frames   02:39:46.720            '/home/wdp/Datei.m2v'
Audio 0 (mp2):  399447 Frames   02:39:46.728    0/0/3/25        '/home/wdp/Datei.mp2'
=&gt; 2,643,770,092 bytes written...
-&gt; we have 101 warnings/errors.
done...    1 collection(s) processed  @ 00:30:27.832
</pre>
<p>101 warnings/errors &#8211; Klingt ja ganz nett <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Wie auch immer. ProjectX hat das ganze in Spuren aufgeteilt und gesynced. Wir müssen das jetzt also nur noch wieder zusammenfügen &#8211; Das funktioniert mit &#8220;mplex&#8221;:</p>
<pre>
mplex -f 8 -o repaired.mpg Datei.m2v Datei.mp2
</pre>
<p>Jetzt können wir die repaired.mpg kurz mit mplayer abspielen und stellen fest: A/V Sync ist nicht ganz perfekt. Ich habe hier ca. 80ms zu späten Sound. Dies merkt man fast nicht, aber mir fällts halt auf &#8211; Daher rufe ich mplex nochmal mit einer anderen Option auf, und zwar: -O 80ms. Dadurch wird der Sound um ca. 80ms nach hinten geschoben. Insgesamt sieht der Befehl also wie folgt aus:</p>
<pre>
mplex -f 8 -o repaired.mpg Datei.m2v -O 80ms Datei.mp2
</pre>
<p>Zumindest wirkt A/V jetzt sehr viel besser. Also öffnen wir die Datei nun mit &#8220;avidemux&#8221; um die Werbung rauszuschneiden und stellen fest &#8211; avidemux liefert Fehler und die Datei lässt sich nicht öffnen. Wenigstens öffnet dvbcut die Datei problemlos &#8211; also entfernen wir die Werbung nun mit dvbcut. Funktioniert auch Klasse &#8211; AV/Sync is ebenfalls Perfekt, aber ein Manko gibt es doch, das resultierende MPEG file hat fehler. Tjo diese Fehler sieht man mal im Film und mal nicht. Also hilft mir dvbcut auch nicht weiter&#8230; Bzw. irgendwas stimmt noch nicht. Ich habe daher jetzt nochmal ffmpeg über die repaired.mpg gejagt mittels:</p>
<pre>
ffmpeg -y -i repaired.mpg -vcodec copy -acodec copy -f dvd repaired2.mpg
</pre>
<p>Und siehe da.. Die Datei lässt sich mit avidemux öffnen. Das ausschneiden klappt auch wunderbar &#8211; A/V Sync stimmt aber nicht. Sobald ich -1000ms eingebe bei &#8220;shift&#8221; in Avidemux klappt aber alles wunderbar und so kann ich dann weiter arbeiten. Ich speichere das ganze als final_source.mpg. Bei manchen Sendungen habe ich immernoch A/V Sync Probleme, das heisst -1000ms kann nicht als allgemein gültiger Wert genommen werden.. bei der zweiten Aufnahme war&#8217;s -180ms.</p>
<h3>Nach x264, aac in mp4</h3>
<p>Ich möchte das ganze als mp4 mit x264 (video) und aac (audio) codec. Ich musste auch hier eine ganze Weile rumprobieren. Die besten Ergebnisse und nen relativ &#8220;schnellen&#8221; encode habe ich mit folgender Zeile hinbekommen:</p>
<p><strong>Anmerkung: Aspect Ratio</strong><br />
Bei Aufzeichnungen via DVB-T und allgemein direkt vom Fernsehen kommt es häufig vor, das sich die Aspect-Ratio ändert, beispielsweise in der Werbung, und manche Sendungen werden 4:3 übertragen, andere 16:9. Man möchte das wahrscheinlich einheitlich haben und aus 4:3 16:9 machen. Das ginge z.B. wie folgt:</p>
<pre>
-vf crop=704:480:8:32,dsize=16/9,scale=720:576
</pre>
<p>Das beschneidet zuerst das Bild auf 704:480px von 720&#215;576px (Das heisst: Ja. Es gehen Bildinhalte verloren, und zwar exakt 16&#215;64px. Anschliessend wird mit dsize die neue Aspect Ratio gesetzt und wir skalieren das ganze wieder auf 720&#215;576px hoch (Ja, upscaling ist schlecht) &#8211; Daher ändern wir die Filter noch etwas um:</p>
<pre>
-vf crop=704:480:8:32,dsize=16/9,scale=720:576,hqdn3d,gradfun -sws 9
</pre>
<p>Schwups, sieht das Ergebnis brauchbar aus. Unabhängig von dem Aspect-Ratio wechsel würde es nun wie folgt weiter gehen:</p>
<pre>
mencoder -sws 7 -ovc x264 -x264encopts subq=5:bframes=3:weight_b:bitrate=1800:nr=300:keyint=25 -oac pcm -channels 1 -srate 4000 -of rawvideo -o title.264 final_source.mpg -vf pullup,softskip,yadif=0,harddup
</pre>
<p>Mit dem Aspect-Ratio wechsel wie hier:</p>
<pre>
mencoder -sws 7 -ovc x264 -x264encopts subq=5:bframes=3:weight_b:bitrate=1800:nr=300:keyint=25 -oac pcm -channels 1 -srate 4000 -of rawvideo -o title.264 final_source.mpg -vf pullup,softskip,yadif=0,crop=704:480:8:32,dsize=16/9,scale=720:576,hqdn3d,gradfun,harddup
</pre>
<p><strong>Weitere Anmerkungen</strong><br />
Mit den Parametern -sws und nr= würde ich etwas herumspielen und auch mal die manpage befragen. Genauso wie &#8220;gradfun&#8221; &#8211; wird eventuell gar nicht benötigt. Beispielsweise reicht bei mir auch -sws 9 nr=200 und das ganze ohne gradfun.</p>
<p>Ihr fragt euch eventuell warum ich Audio und Video getrennt behandele: h264 mit B-Frames direkt zu mp4 mit mplayer ist möglich, wird aber nicht empfohlen &#8211; und die B-Frames ausschalten möchte ich nicht. -oac pcm -channels 1 -srate 4000 benutze ich, weil es empfohlen wurde und besser ist als -nosound (Sonst hat man später evtl. A/V Sync Probleme). Da dauert das Encodieren ca. 120 Minuten für nen 120 Minütigen Film auf meinem Rechner. Mit dem Ergebnis bin ich zufrieden &#8211; Es sieht nach High Quality aus. <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Jetzt fehlt noch der Audiotrack, den holen wir uns via:</p>
<pre>
# dump audio to pcm
mplayer -ao pcm:fast -vc null -vo null final_source.mpg
# convert it to aac
faac -q 100 -c 48000 -b 192 --mpeg-vers 4 audiodump.wav
</pre>
<p>Als nächstes können wir das ganze mit MP4Box zusammenfügen und erhalten (endlich) die gewünschte MP4:</p>
<pre>
MP4Box -fps 25 -add title.264 -add audiodump.aac movie.mp4
</pre>
<p>Und das Ergebnis, ist super <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Jedenfalls hier.</p>
<h2>Brauchbare Software</h2>
<ul>
<li><a href="http://www.mplayerhq.hu">mplayer/mencoder</a></li>
<li><a href="http://www.ffmpeg.org">ffmpeg</a></li>
<li><a href="http://www.lucike.info/index.htm?http://www.lucike.info/page_projectx.htm">projectx</a></li>
<li><a href="http://www.avidemux.org/">avidemux</a></li>
<li><a href="http://dvbcut.sourceforge.net/">dvbcut</a></li>
<li><a href="http://sourceforge.net/projects/replex/">replex</a></li>
<li><a href="http://gpac.sourceforge.net/">gpac/MP4Box</a></li>
<li><a href="http://sourceforge.net/projects/faac/">faac</a></li>
</ul>
</uli>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/video_dvb-t-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Die deutsche Rechtschreibung</title>
		<link>http://jeanbruenn.info/general_die-deutsche-rechtschreibung.html</link>
		<comments>http://jeanbruenn.info/general_die-deutsche-rechtschreibung.html#comments</comments>
		<pubDate>Fri, 29 Jan 2010 13:14:14 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[The daily insanity]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=518</guid>
		<description><![CDATA[Ich interessiere mich momentan ziemlich für Sprachen im Allgemeinen und bin kürzlich in der Schule (Man erinnere sich, ich besuche eine Abendschule um Realschulabschluss, sowie Fachabitur nachzuholen) an dem Punkt angekommen, wo ich die deutsche Sprache einfach hinterfragen musste, beziehungsweise Aspekte aus der dt. Rechtschreibung als unlogisch erachtet habe. Lehrer kommen hier häufig mit der [...]]]></description>
			<content:encoded><![CDATA[<p>Ich interessiere mich momentan ziemlich für Sprachen im Allgemeinen und bin kürzlich in der Schule (Man erinnere sich, ich besuche eine Abendschule um Realschulabschluss, sowie Fachabitur nachzuholen) an dem Punkt angekommen, wo ich die deutsche Sprache einfach hinterfragen musste, beziehungsweise Aspekte aus der dt. Rechtschreibung als unlogisch erachtet habe. Lehrer kommen hier häufig mit der Begründung &#8220;Ist einfach so&#8221; und zwei Freunde von mir meinten ebenfalls das liegt daran, dass Sprachen dynamisch sind. Wie auch immer, meine Lehrerin hat mir empfohlen mich an den Rat der dt. Rechtschreibung zu wenden. Das habe ich dann auch mit folgender eMail gemacht:<br />
<span id="more-518"></span></p>
<pre class="noserif">Sehr geehrte Damen und Herren,

ich schreibe Ihnen diese eMail, da Sie für Änderungen an der deutschen Rechtschreibung
zuständig sind und ich einige Vorschläge habe, die deutsche Rechtschreibung zu verbessern.
Ausserdem möchte ich einige Fälle in der deutschen Rechtschreibung mit dieser eMail
hinterfragen, um ein besseres Verständnis zu entwickeln.

Fangen wir bei "das" und "dass" an. Mir persönlich ist der genaue Unterschied der beiden
Wörter nicht geläufig, so weiss ich zwar, wann ich welches einsetzen muss, verstehe aber
nicht warum man nicht vereinfacht "das" für beides nutzt.  Sobald man "das" und "dass"
ausspricht wird klar, dass es sprachlich gesehen keinen Unterschied gibt. Ich schlage daher
vor, "dass" abzuschaffen. Weiterhin sehe ich ein Problem bei "Vase" und "Vogel". So
wären meiner Meinung nach "Wase" und "Fogel", auch wenn es seltsam aussieht, definitiv
logischer. Eine weitere Reihe an Beispielen bei denen der sprachliche und schriftliche
Unterschied zur Geltung kommen würde, wären: "vulgär", "video" oder auch "viele", "voll",
"vollends", "vokal", "votum". Worauf ich hinaus will ist, dass nicht klar ersichtlich ist,
warum manche Wörter mit einem V geschrieben werden, aber mit einem W gesprochen
werden. Andere mit einem V geschrieben werden aber nach einem F klingen. Natürlich
gilt dies auch für Wörter mit F: Foto beispielsweise ist ein sehr interessantes Wort in diesem
Zusammenhang, soweit mir bekannt sind zwei Formen möglich: Photo und Foto. Allerdings
kein Voto. Spreche ich Foto aus, klingt der F-Laut exakt wie der F-Laut bei Vogel.

Ich würde mich sehr über Rückmeldung freuen, gerne auch mit Erläuterungen, warum Sie
mit meinen Vorschlägen einverstanden, oder nicht einverstanden sind. Sofern erlaubt, würde
ich Ihre Antwort auch gerne im Deutschunterricht an der Abendrealschule, welche ich derzeit
besuche, meiner Deutschlehrerin zeigen.

Mit freundlichen Grüßen</pre>
<p>Ich war sehr gespannt, ob es eine Antwort geben würde und umso begeisteter als diese heute eintraf. Natürlich möchte ich die Antwort niemandem vorenthalten und habe um Erlaubnis gebeten, diese in meinem Blog zu veröffentlichen. Nachdem ich die Erlaubnis erhalten habe, habe ich diesen Eintrag geschrieben. Nachfolgend die Antwort-eMail von Herrn Weber zu meinen Fragen:</p>
<pre class="noserif">Sehr geehrter Herr Bruenn,

zunächst einmal ist es erfreulich, dass sich so viele Menschen mit den
Aspekten der deutschen Rechtschreibung so intensiv auseinandersetzen und
dabei an einen Punkt gelangen, an dem scheinbar Selbstverständliches
hinterfragt werden muss.

Zur Unterscheidung von <em>dass</em> und <em>das</em>:

Tatsächlich handelt es sich hierbei um zwei ganz verschiedene Wortarten.
Während <em>das</em> einen Artikel oder ein Pronomen darstellt, wird <em>dass</em>
ausschließlich als Konjunktion zum Einleiten von Nebensätzen verwendet.
Offenbar werden beide Wörter gleich ausgesprochen, obwohl es in einigen
deutschen Regionen durchaus einen hörbaren Unterschied gibt, da hier der
Artikel mit längerem <em>a</em> als in der Konjunktion gesprochen wird. Dass
Grimm'sche Wörterbuch gibt übrigens an, dass die Unterscheidung seit
Mitte des 16. Jahrhunderts gemacht wurde und seitdem weitgehend
anerkannt ist. Ihr Vorschlag, die beiden Worte zusammenzulegen, ist
somit nicht neu, sondern gibt sogar den ursprünglichen Zustand wieder.
Es gab laut Grimm sogar Bestrebungen, auch das Pronomen mit einem,
damals noch gültigen, <em>ß</em> zu schreiben. Eine scheinbar gleiche Lautung
hebt den offensichtlichen Unterschied in den Wortarten und der daraus
resultierenden Verwendung jedoch nicht auf. Würden Artikel/Pronomen und
Konjunktion zusammengelegt, so wäre folgerichtig <em>das</em> der einzige
Artikel, der mit einer Konjunktion zusammenfiele -- <em>der</em> und <em>die</em>
hätten diese Entsprechung nicht. Für Lernende der deutschen Sprache wäre
diese Vermengung sicher auch nicht ganz trivial, wenn man an dann
gültige Beispielsätze denkt, die Artikel und Konjunktion nicht trennen:

<em><strong>Ich finde es gut, das der Baum hier steht.</strong></em>

Insbesondere bei einem Vergleich mit anderen europäischen Sprache täte
sich hier eine Eigenart des Deutschen auf, die grammatikalisch nur
schwer zu begründen wäre. Sie sehen also, dass eine Unterscheidung der
beiden Wortarten durchaus sinnvoll erscheint -- auch wenn man es mit
sehr ähnlichen Wörtern zu tun hat.

Es kommt hinzu, dass jede Sprache von den Sprachbenutzer eigens
mitgestaltet ist und daher nie ein starres System vorliegt. Das führt
aber im Umkehrschluss auch dazu, dass viele Eigenarten einer Sprache als
solche akzeptiert werden und bei der Verwendung keine Schwierigkeiten
bereiten, da sie über die Jahre der Sprachverwendung "gewachsen" sind
und von der Gemeinschaft der Sprachbenutzer aus den unterschiedlichsten
Gründen herausgebildet wurden.

Dies führt direkt zum nächsten Punkt Ihrer Anfrage. Sie hinterfragen
das, was in der Orthographie als "Laut-Buchstaben-Zuordnung" bekannt
ist. Natürlich ist gerade der Wechsel der Lautung für den Buchstaben
<em>v</em>, der als <em>f</em> (<em>Vogel</em>) und als <em>v</em> (<em>Vase</em>) ausgesprochen werden
kann, dabei augenscheinlich kompliziert. Die scheinbar willkürliche
Zuordnung hängt aber in den meisten Fällen mit der Wortherkunft
zusammen. Steht in Fremdwörtern ein <em>v</em>, so wird dies, gemäß §30 der
amtlichen Regelung, in der Regel als <em>v</em> ausgesprochen. Oftmals sind
aber einheimische Wörter, die man mit einer f-Schreibung erwarten würde,
ebenfalls mit <em>v</em> geschrieben. Ein Beispiel hierfür ist <em>Vater</em>, das
noch im Althochdeutschen <em>fater</em> geschrieben wurde und das im
Mittelhochdeutschen als <em>vater</em> auftauchte und auch heute im Englischen
als <em>father</em> existiert. In der Literatur ist die Tendenz belegt, dass
bei dem Phonem <em>f</em> am Wortanfang vor a, e, i, o ein <em>v</em> steht, während
<em>f</em> meist vor u, lr und r steht:

<em>Freund
viel
voll
Vater</em> usw.

Hierbei handelt es sich aber tatsächlich nur um eine Tendenz, die nicht
immer zutreffen muss.

Die Wechsel in solcherlei Schreibungen sind oft nicht mehr eindeutig zu
klären und gründen sich auf Konventionen der Gemeinschaft der
Sprachbenutzer, die sich vor anderen Schreibungen durchgesetzt haben.

Ich hoffe, dass ich, obwohl ich aus Zeitgründen natürlich nicht auf
jedes Beispiel eingehen konnte, die prinzipiellen Umstände klären
konnte. Bei Rückfragen stehe ich natürlich jederzeit zur Verfügung.

Mit den besten Grüßen aus Mannheim
Constantin Weber</pre>
<p><strong>Quellangabe</strong>: Constantin Weber, Mitarbeiter der Geschäftsstelle des Rats für deutsche Rechtschreibung | Internetseite: <a href="http://www.rechtschreibrat.com/">http://www.rechtschreibrat.com/</a></p>
<p>Fand ich persönlich ziemlich interessant, indirekt ist es zwar immernoch ein &#8220;ist einfach so&#8221;, dennoch ist man hier auch auf die Entwicklung eingegangen und ich kann mit der Antwort definitiv mehr anfangen, als mit einem &#8220;ist einfach so&#8221;. In diesem Sinne: Wieder was gelernt, vielen Dank für die Antwort!</p>
<p><strong>P.S</strong>: In einem Jahr hinterfrage ich dann nochmal, warum man im Deutschen 42 (Zwei (2) und Vierzig (40)) und im Englischen 42 (Fourty (40) Two (2)) sagt (Die Zahlen also genau umgedreht. Da wirkt das Englische richtig, das Deutsche falsch.) <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/general_die-deutsche-rechtschreibung.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Elfenkönigin</title>
		<link>http://jeanbruenn.info/books_elfenkonigin.html</link>
		<comments>http://jeanbruenn.info/books_elfenkonigin.html#comments</comments>
		<pubDate>Mon, 28 Dec 2009 16:29:20 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=493</guid>
		<description><![CDATA[Ich habe gestern zu meinem Geburtstag das Buch bekommen und bin recht begeistert. Der Author Bernhard Hennen hat es mal wieder geschafft ein ~900 Seitiges Buch zu bringen und mich an den Inhalt zu fesseln. Ich habe in letzter Zeit recht wenig gelesen, aber da ich die anderen Elfenbänder/Bücher aus seiner Feder (oder besser Schreibmaschine?) [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe gestern zu meinem Geburtstag das Buch bekommen und bin recht begeistert. Der Author Bernhard Hennen hat es mal wieder geschafft ein ~900 Seitiges Buch zu bringen und mich an den Inhalt zu fesseln. Ich habe in letzter Zeit recht wenig gelesen, aber da ich die anderen Elfenbänder/Bücher aus seiner Feder (oder besser Schreibmaschine?) auch habe, musste das einfach sein &#8211; Ich glaube ich habe meinen ganzen Geburtstag gelesen, aber ich hatte eh nicht vor zu feiern <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Der Schreibstil ist eigentlich ganz Klasse, was mich manchmal ein bisschen stört ist das die Wortwahl hin und wieder nichtmehr auf dem hohen Niveau gehalten wird. Beispielsweise stört mich das Wort &#8220;Schiss&#8221; im Verlaufe des Buches (Nein, nicht das von &#8220;Angst haben&#8221;) &#8211; Bei einem Kentauren würde man sich über diese Wortwahl nur wenig wundern. Nunja.</p>
<p>Aber zum Buch:</p>
<p><span id="more-493"></span></p>
<p><strong>Elfenkönigin</strong></p>
<p style="margin: 0pt 10px 10px; padding: 0pt 5px 5px; float: right; display: inline"><a href="http://www.amazon.de/gp/product/3453533402?ie=UTF8&amp;tag=jeanbruenn-21&#038;linkCode=as2&#038;camp=1638&#038;creative=6742&#038;creativeASIN=3453533402"><img border="0" src="elfenkoenigin.jpg" style="border: 1px solid #000000; width: 105px; height: 160px" border="0"/></a><img src="http://www.assoc-amazon.de/e/ir?t=jeanbruenn-21&#038;l=as2&#038;o=3&#038;a=3453533402" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><em>Das Buch gibt interessante Einblicke in das Leben und die Gefühlswelt von Emerelle, der Elfenkönigin. Interessant finde ich auch den Rückblick beziehungsweise die Erzählungen von vergangenen Zeiten, wie den Drachenelfen. Schlussendlich fragt man sich nach dem Buch aber wahrscheinlich immernoch ob Emerelle nun eigentlich gut oder böse ist &#8211; Eigentlich gut, aber irgendwie auch wieder nicht. Was ich besonders interessant fand in diesem Buch sind die Trolle. Der Troll der den &#8220;Welpen&#8221; half und Ogrim, mit seiner Entscheidung. Klasse gemacht.</em></p>
<p><br style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/books_elfenkonigin.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Video-Encoding Snippets</title>
		<link>http://jeanbruenn.info/video_video-encoding-snippets.html</link>
		<comments>http://jeanbruenn.info/video_video-encoding-snippets.html#comments</comments>
		<pubDate>Fri, 25 Dec 2009 18:00:03 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[Videos and more]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=574</guid>
		<description><![CDATA[Well, i&#8217;m more or less new to video-encoding. I&#8217;m playing around with mencoder and other tools for some years, though i&#8217;m never gone into detail nor i tried to understand. This changed somehow in the past few weeks, thus i was reading everything again what i already read ago some years. This said you might [...]]]></description>
			<content:encoded><![CDATA[<p>Well, i&#8217;m more or less new to video-encoding. I&#8217;m playing around with mencoder and other tools for some years, though i&#8217;m never gone into detail nor i tried to understand. This changed somehow in the past few weeks, thus i was reading everything again what i already read ago some years. This said you might know that there are a lot of information and websites about how to encode videos and video-editing in general. It&#8217;ll take you weeks to read all of them &#8211; Thus i wrote this little article, covering the information i&#8217;m interested in. It might or might not be helpful for you &#8211; For me it&#8217;s some sort of reminder <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<span id="more-574"></span></p>
<h2>Questions &amp; Answers</h2>
<p>I got a lot of Questions and managed to ask a few guys (for example in the Freenode Channel #mplayer on irc.freenode.net) to answer those, some of the answers i found in the man-pages or documentation of several projects.</p>
<h3>Reason(s) for Encoding, or: Why should i re-encode a Video.</h3>
<p>The simpliest answer to this is: You should not. Encoding a Video, or Re-Encoding a Video is mostly done to make the overall filesize smaller, or to play it on another hardware or software player (or on lower-end hardware). As soon as you encode a Video to a compressed format, it will loose information. If you re-encode a already compressed video it will loose even more information. If you want the highest Quality, you don&#8217;t want to (re-)encode a video, you want to let it as it is.</p>
<h3>Black Borders: Bad or Good?</h3>
<p>The mencoder documentation says (25th dec 09) that you want to avoid black borders within a video, because they hurt quality. On another page in the documentation they give examples how to add black borders with the expand video filter. One might get confused, first they say it&#8217;s bad, and then they show you how to do it. The documentation is correct though: Some Video Players (Hard &amp; Software) don&#8217;t play videos correctly if the dimensions aren&#8217;t correct. You can make the dimensions (resolution) correct by adding black borders. Thus the Answer to this question is: Try to Avoid them, use them only if needed.</p>
<h3>Can you improve Quality of Videos by Re-Encoding?</h3>
<p>Even if i&#8217;d answer &#8220;yes&#8221; this wouldn&#8217;t be true. And if you don&#8217;t know the answer, you probably didn&#8217;t read the first Entry in this small FAQ. No. Video Quality does not get better if you re-encode a video. There are a few Reasons why it might look better, it could probably look more softer (loosing detail, means losing noise). It might also be possible to remove artifacts by re-encoding.</p>
<h2>Formula / Maths</h2>
<p>Due to reading a lot of pages, i found out some useful formula to calculate some stuff and i added my own stuff. Here&#8217;s a list:</p>
<h3>Calculating the Bitrate with a given target_size.</h3>
<pre>BITRATE = ( TARGET_SIZE_IN_MB - SOUND_SIZE_IN_MB ) * 1024 * 1024 / LENGTH_IN_SEC * 8 / 1000</pre>
<p><span style="text-decoration: underline;"><strong>Example:</strong></span></p>
<pre>    # A Video of 90 Minutes (5400 Seconds) with 120 MB
    # of Audio - We want a Size of 700 MB overall.
    ( 700 - 120 ) * 1024 * 1024 / 5400 * 8 / 1000
    = 900.99863</pre>
<p><strong><span style="text-decoration: underline;">Explaination:</span></strong><br />
In case you&#8217;re using a fixed bitrate for video-encoding (like i) this might be useful. You can calculate what bitrate you need for a given Filesize. You need to set a bitrate for example for Two-Pass Encoding.</p>
<h3>Calculate the Bits per Pixel</h3>
<pre>BPP = ( BITRATE * 1000 ) / ( WIDTH * HEIGHT * FPS )</pre>
<p><strong><span style="text-decoration: underline;">Example:</span></strong></p>
<pre>    ( 900 * 1000 ) / ( 784 * 326 * 25 )
    = 0.14085</pre>
<p><span style="text-decoration: underline;"><strong>Explaination:</strong></span><br />
This Formula can give you an &#8220;idea&#8221; on how good your movie will look later with your settings (Resolution and Bitrate). Of course it depends on the Source Material and a few other things, however, it can give you an idea whether to change the bitrate or the resolution. Here&#8217;s a list what the resulting lines could mean:</p>
<pre>    0.0  - 0.15  = Will most likely look bad
    0.16 - 0.20  = Will look okay, you might notice blocks
    0.21 - 0.25  = Will look good
    &gt; 0.25       = You won't notice much difference or you're wasting bits.</pre>
<h3>Calculate the Bits per Block</h3>
<pre>BPB = ( BITRATE * 1000 ) / ( FPS * ( ( WIDTH * HEIGHT ) / BLOCKSIZE ) )</pre>
<p><span style="text-decoration: underline;"><strong>Example:</strong></span></p>
<pre>    ( 900 * 1000 ) / ( 25 * ( ( 784 * 326 ) / ( 16 * 16 ) )
    = 36.05859</pre>
<p><strong><span style="text-decoration: underline;">Explaination:</span></strong><br />
A Block is usually 16*16. The BPB are just another variant of the BPP (Which gives you numers with 0., while the BPB can have numbers starting with 0 up to 100 or more. The following List might give you an idea what BPB are good and which not:</p>
<pre>    0  - 39  = Most likely bad quality (might be still okay for you)
   40  - 49  = Quality is okay
   50  - 59  = Quality is good
   &gt; 60      = You're wasting bits</pre>
<h3>Calculate nearest 16</h3>
<pre>NUM = VALUE + (( X - 0.( VALUE / 16 ) ) * 16 )</pre>
<p><span style="text-decoration: underline;"><strong>Example:</strong></span></p>
<pre>    # VALUE = 700
    700 + ( ( 1 - 0.75 ) * 16 )
    = 704
    # VALUE = 231
    231 + ( ( 0 - 0.43750 ) * 16 )
    = 224</pre>
<p><strong><span style="text-decoration: underline;">Explaination:</span></strong><br />
One important side note: You might need to calculate with more than 2 numbers after the comma. 5 is a good choice. This depends ofc on how good your calculator is doing rounding. However. This Calculation is somewhat tricky. First you&#8217;re dividing the value through 16. Remove the part before the comma: 43,7544 = 0,7544. If that number is greater than 0.5, X will be 1, if it&#8217;s smaller than 0.5 X will be 0. (Thats was the tricky part). Now you just need to calculate as shown in my examples and it will give you the nearest through 16 dividable number. This is handy if you want to scale the width and height and want to make sure that it&#8217;s dividable through 16 (thats usually what you want at videos).</p>
<h2>Getting Information &amp; Calculating Stuff &#8211; Bash Snippets</h2>
<p>Most people will tell you, and the documentation states &#8220;identify the source material&#8221;. Here are some Bash Snippets which will try to help you with that job. However, you still want to have some additional tools  installed.</p>
<h3>Calculate Bitrate</h3>
<pre>###
# this function
# calculates the bitrate. You need to provide:
# fps, length, audio-size in mb, wanted video size
#
# param fps
# param length
# param audio size
# param overall wanted size
# return $BITRATE
###
function calculateBitrate() {

	local FPS=$1
	local LENGTH=$2
	local AUDIO_SIZE=$3
	local SIZE=$4
	# calculate with scale=5 to be more precise
	local A=$(echo "scale=5;$SIZE - $AUDIO_SIZE" | bc);
	local B=$(echo "scale=5;$A*1024*1024/$LENGTH*8/1000" | bc);
	# remove the decimal part
	local C=$(echo $B | sed 's/\..*//g');

	NEWBITRATE=$C

}</pre>
<h3>Calculate the Size</h3>
<pre>function calculateSize() {
	#calculateSize $FPS $LENGTH $AUDIO_SIZE $NEWBITRATE
	local FPS=$1
	local	LENGTH=$2
	local	AUDIO_SIZE=$3
	local BITRATE=$4
	# calculate with scale=5 to be more precise
	local A=$(echo "scale=5;$BITRATE*1000*$LENGTH/8/1024/1024" | bc);
	local B=$(echo "scale=5;$A+$AUDIO_SIZE" | bc);
	# remove the decimal part
	local C=$(echo $B | sed 's/\..*//g');

	NEWSIZE=$C

}</pre>
<h3>Calculate the BPB</h3>
<pre>###
# The Bits per Block (BPB) are also important
# 40-60 is a good value, everything below is not
# good for quality, and everything higher than 60
# is a waste of bits.
# You need to provide width, height, bitrate and
# fps to this function and it will tell you the
# bpb
#
# param width
# param height
# param bitrate
# param fps
# return $BPB
###
function calculateBPB() {

	local WIDTH="$1"
	local HEIGHT="$2"
	local BITRATE="$3"
	local FPS="$4"

	local A=$(echo "$BITRATE * 1000" | bc);
	local B=$(echo "$WIDTH * $HEIGHT" | bc);
	local C=$(echo "$B / 256" | bc);
	local D=$(echo "$FPS * $C" | bc);
	local E=$(echo "$A / $D" | bc);

	NEWBPB=$E;

}</pre>
<h3>Calculate Nearest 16</h3>
<pre>function calculateNearestSixteen() {

	local VALUE="$1"

	local A=$(echo "scale=2;$VALUE / 16" | bc);
	local B=$(echo "$A" | sed 's/.*\.//g');
	local C=0.$B;

	if [[ $B -gt 50 ]]; then
		local M=1;
	else
		local M=0;
	fi

	local D=$(echo "$M - $C" | bc);
	local E=$(echo "$D * 16" | bc);
	local F=$(echo "$VALUE + $E" | bc | sed 's/\..*//g');

	NEWVALUE=$F;

}</pre>
<h3>Getting Length of a Video in Seconds</h3>
<pre># getting the original duration
OV_DURATION=$(tcprobe -i "$INPUTFILE" -X | grep "duration" | awk 'NR == 1 { print $2; }');
# getting the hours
OV_HR=$(echo "$OV_DURATION" | cut -d ":" -f1 | sed 's/\..*//g');
OV_HRS=$(echo "$OV_HR*60*60" | bc);
# getting the minutes
OV_MI=$(echo "$OV_DURATION" | cut -d ":" -f2 | sed 's/\..*//g');
OV_MIS=$(echo "$OV_MI*60" | bc);
# getting the seconds
OV_SE=$(echo "$OV_DURATION" | cut -d ":" -f3 | sed 's/\..*//g');
# getting the length
OV_LENGTH=$(echo "$OV_HRS+$OV_MIS+$OV_SE" | bc);</pre>
<h3>Getting the FPS of a Video</h3>
<pre># getting the framerate
OV_FPS=$(tcprobe -i "$INPUTFILE" -X | grep "frame rate" | awk 'NR == 1 { print $3; }');</pre>
<h3>Getting the Bitrate of a Video</h3>
<pre># getting the bitrate
OV_BITRATE=$(tcprobe -i "$INPUTFILE" -X -M | grep "bitrate" | awk 'NR == 1 { print $2; }');</pre>
<h3>Getting Audio Data</h3>
<pre># getting bitrate
OA_BITRATE=$(tcprobe -i "$INPUTFILE" -X -M | grep "bitrate" | awk 'NR == 2 { print $2; }');
# getting sample rate
OA_SAMPLERATE=$(tcprobe -i "$INPUTFILE" -X -M | grep "sample rate" | awk 'NR == 1 { print $3; }');
# getting bits per sample
OA_SAMPLEBITS=$(tcprobe -i "$INPUTFILE" -X -M | grep "bits for sample" | awk 'NR == 1 { print $3; }');</pre>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/video_video-encoding-snippets.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux (File/Storage) Clustering using DRBD and OCFS2</title>
		<link>http://jeanbruenn.info/linux_linux-filestorage-clustering-using-drbd-and-ocfs2.html</link>
		<comments>http://jeanbruenn.info/linux_linux-filestorage-clustering-using-drbd-and-ocfs2.html#comments</comments>
		<pubDate>Tue, 15 Sep 2009 20:01:00 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=428</guid>
		<description><![CDATA[The company i work for asked me to write a document about how to use DRBD and OCFS2 for MySQL Clustering as replacement for the MySQL NDB Stuff. This Document is nearly finished, however, today i talked with a friend, who&#8217;s working a lot with oracle databases and asked him what tests he would do [...]]]></description>
			<content:encoded><![CDATA[<p>The company i work for asked me to write a document about how to use DRBD and OCFS2 for MySQL Clustering as replacement for the MySQL NDB Stuff. This Document is nearly finished, however, today i talked with <a href="http://www.usn-it.de/">a friend, who&#8217;s working a lot with oracle databases</a> and asked him what tests he would do to test the locking characteristics of the Filesystem. He told me this can be made using dd in 4 Tests:</p>
<ol>
<li>&#8220;dd if=/dev/zero of=/mnt/filename bs=100M count=100&#8243; on Node1 on the Clusterfilesystem</li>
<li>The same on the other node (Node2), the times should be equal.</li>
<li>Two times (2x) the same on Node1, the time will break in</li>
<li>Now on both nodes at the same time &#8211; The time should be higher, the higher the worse.</li>
</ol>
<p>So, i did this checks on the System i&#8217;ve setup with DRBD and OCFS2, here are the results:<br />
<span id="more-428"></span><br />
<strong>Check 1</strong></p>
<pre>ER-40021:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=10
1048576000 bytes (1.0 GB) copied, 88.1202 s, 11.9 MB/s
real    1m29.530s
user    0m0.000s
sys     0m3.496s</pre>
<p><strong>Check 2</strong></p>
<pre>ER-20026:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=10
1048576000 bytes (1.0 GB) copied, 84.3576 s, 12.4 MB/s
real    1m24.622s
user    0m0.000s
sys     0m5.408s</pre>
<p><strong>Check 3</strong></p>
<pre>ER-40021:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=10 &amp;
[1] 5252
ER-40021:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=10
1048576000 bytes (1.0 GB) copied, 84.1481 s, 12.5 MB/s
real    1m24.314s
user    0m0.000s
sys     0m2.964s
1048576000 bytes (1.0 GB) copied, 137.668 s, 7.6 MB/s
[1]+  Done                    time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=10
real    2m19.164s
user    0m0.000s
sys     0m5.364s</pre>
<p><strong>Check 4</strong></p>
<pre>Node 1:
    ER-40021:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=10
    1048576000 bytes (1.0 GB) copied, 156.417 s, 6.7 MB/s
    real    2m36.583s
    user    0m0.004s
    sys     0m2.512s
Node 2:
    ER-20026:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=10
    1048576000 bytes (1.0 GB) copied, 173.982 s, 6.0 MB/s
    real    3m24.200s
    user    0m0.000s
    sys     0m3.372s</pre>
<p>My friend was interested into the %CPU and %WAIT Data of the nodes during test 3 and 4, so i will redo the tests now. As you can see above, i used 1 GB instead of 10 GB. My next test will use 2 GB:</p>
<p><strong>The Box(es)</strong></p>
<ul>
<li>2 GB Ram</li>
<li>Intel(R) Core(TM)2 Duo CPU     E7200  @ 2.53GHz</li>
<li>160 GB Sata (Seagate Barracuda 7200.10 family, ST3160215AS)</li>
<li>Debian Lenny</li>
</ul>
<pre>top - 22:54:22 up 1 day,  7:04,  1 user,  load average: 0.08, 0.15, 0.11
Cpu0  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st</pre>
<p><strong>Check 1</strong></p>
<pre>dd:
    ER-40021:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=20
    2097152000 bytes (2.1 GB) copied, 187.962 s, 11.2 MB/s
    real    3m8.043s
    user    0m0.000s
    sys     0m9.937s
Top after 30 seconds:
    top - 22:56:31 up 1 day,  7:07,  1 user,  load average: 1.86, 0.63, 0.27
    Cpu0  :  0.0%us,  1.6%sy,  0.0%ni, 66.3%id, 32.1%wa,  0.0%hi,  0.0%si,  0.0%st
    Cpu1  :  0.0%us,  8.9%sy,  0.0%ni, 18.4%id, 66.6%wa,  1.3%hi,  4.7%si,  0.0%st</pre>
<p><strong>Check 2</strong></p>
<pre>dd:
    2097152000 bytes (2.1 GB) copied, 178.706 s, 11.7 MB/s
    real    2m59.232s
    user    0m0.000s
    sys     0m5.836s
Top after 30 seconds:
    ER-40021:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=20
    top - 22:38:37 up 1 day,  7:10,  1 user,  load average: 1.97, 0.53, 0.31
    Cpu0  :  0.0%us,  4.0%sy,  0.0%ni, 30.2%id, 61.1%wa,  1.7%hi,  3.0%si,  0.0%st
    Cpu1  :  0.0%us,  9.3%sy,  0.0%ni,  9.6%id, 78.0%wa,  0.7%hi,  2.4%si,  0.0%st</pre>
<p><strong>Check 3</strong></p>
<pre>dd:
    ER-20026:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=20 &amp;
    ER-20026:/var/lib/mysql# time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=20 &amp;
    2097152000 bytes (2.1 GB) copied, 205.511 s, 10.2 MB/s
    real    3m25.861s
    user    0m0.000s
    sys     0m6.152s
    2097152000 bytes (2.1 GB) copied, 205.622 s, 10.2 MB/s
    real    3m25.692s
    user    0m0.000s
    sys     0m3.500s
    [1]-  Done                    time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=20
    [2]+  Done                    time dd if=/dev/zero of=/var/lib/mysql/test bs=100M count=20
Top after 30 seconds:
    top - 22:44:15 up 1 day,  7:16,  1 user,  load average: 2.29, 1.41, 0.80
    Cpu0  :  0.0%us,  2.7%sy,  0.0%ni,  3.7%id, 89.0%wa,  0.7%hi,  4.0%si,  0.0%st
    Cpu1  :  0.0%us,  2.1%sy,  0.0%ni, 92.8%id,  0.4%wa,  0.8%hi,  3.8%si,  0.0%st</pre>
<p><strong>Check 4</strong></p>
<pre>Node1:
    dd:
        2097152000 bytes (2.1 GB) copied, 410.541 s, 5.1 MB/s
        real    6m50.703s
        user    0m0.008s
        sys     0m3.448s
    Top after 30 seconds:
        top - 23:15:07 up 1 day,  7:25,  1 user,  load average: 1.19, 0.40, 0.37
        Cpu0  :  0.0%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
        Cpu1  :  0.0%us, 12.9%sy,  0.0%ni, 79.6%id,  4.2%wa,  0.8%hi,  2.5%si,  0.0%st
Node2:
    dd:
        2097152000 bytes (2.1 GB) copied, 400.627 s, 5.2 MB/s
        real    6m40.983s
        user    0m0.000s
        sys     0m7.560s
    Top after 30 seconds:
        top - 22:53:29 up 1 day,  7:25,  1 user,  load average: 2.03, 1.42, 1.19
        Cpu0  :  0.0%us,  2.0%sy,  0.0%ni, 88.7%id,  6.0%wa,  0.3%hi,  3.0%si,  0.0%st
        Cpu1  :  0.0%us,  4.4%sy,  0.0%ni, 67.4%id, 25.8%wa,  0.3%hi,  2.0%si,  0.0%st</pre>
<p>As you can see, the Wait is quite high, this might be due to too slow discs or most likely the network. Both boxes are connected with each other over a 100mbit/s NIC so the datatransfer between those boxes is limited to technically 12MB/s (practically 10MB/s). However, i&#8217;ve shown this data to my friend and his comments were:</p>
<blockquote><p>What we can see here is a mixture of two concurrency problems. Firsthand, it&#8217;s hard disk internal concurrency, the write head has to jump back and forth to write the different positions, of course. It&#8217;s the usual IOPS problem of magnetic disks.</p>
<p>The other problem here is concurrency between the nodes, two in this case. Changing blocks within the same file in the same directory and changing blocks that may still be in the file system cache of the opposite node &#8211; all that is stuff the cluster file system has to manage. It has to provide integrity, but should avoid locks whenever possible.</p>
<p>Now about the numbers of the 2GB test series. Tests 1 and 2 are desired to find the absolute range of IO power we are talking about. Test 3 tells us, how much the disk-internal concurrency affects our result, and Test 4 is what we are looking for.</p>
<p>You can see, Test 1+2 are 11MB/s each, if started concurrently on one node, it&#8217;s still 10MB/s but with about 90% of IO wait of the CPU. The high wait rate of Test 3 means, that the media is about to go in a saturation state now, luckily Jean caught something near the break even point with his test.</p>
<p>In preparation for Test 4, this tells us: All degradation in speed we can see from now on, is made by the cluster FS, not by the disk. Despite we have much less IO speed in Test 4 (5 MB/s vs. 10MB/s in reference), there is much less WAIT% now. WAIT% is &#8220;waiting for IO&#8221; &#8211; unlocking mechanisms my OCFS2 via network are causing slight SYS% increase instead. One last point of interest is to look for the limitation now &#8211; the values don&#8217;t provide it.</p>
<p>My guess is Networking: Bandwidth, or more likely: Latency.</p></blockquote>
<p>Thanks to Martin (usn) for his time <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/linux_linux-filestorage-clustering-using-drbd-and-ocfs2.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Acer Aspire One</title>
		<link>http://jeanbruenn.info/linux_acer-aspire-one.html</link>
		<comments>http://jeanbruenn.info/linux_acer-aspire-one.html#comments</comments>
		<pubDate>Sun, 30 Aug 2009 23:26:08 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=417</guid>
		<description><![CDATA[Hey,
ich hab von glako (danke!) nen&#8217; acer aspire one bekommen, da habe ich mir jetzt erstmal Lunar Linux installiert, läuft ganz fein.  Wobei ich anfangs schon etwas Probleme hatte bei der Installation. Aber das liegt eher daran das ich kein externes CD Rom bzw DVD Rom habe und somit leichte Probleme hatte irgendwas auf [...]]]></description>
			<content:encoded><![CDATA[<p>Hey,</p>
<p>ich hab von glako (danke!) nen&#8217; acer aspire one bekommen, da habe ich mir jetzt erstmal Lunar Linux installiert, läuft ganz fein. <a href="http://jeanbruenn.info/wp-content/uploads/2009/08/aao2-large.png"><img src="http://jeanbruenn.info/wp-content/uploads/2009/08/aao2.png" alt="aao2" title="aao2" class="alignright size-thumbnail wp-image-418" /></a> Wobei ich anfangs schon etwas Probleme hatte bei der Installation. Aber das liegt eher daran das ich kein externes CD Rom bzw DVD Rom habe und somit leichte Probleme hatte irgendwas auf dem Teil zu installieren mangels Media. Wie auch immer. Rechts solltet ihr nen Screenshot sehen können.</p>
<p>Die Auflösung ist 1024&#215;600px. Es läuft alles einwandfrei, bis auf die Grafikkarte. Manchmal wackelt das Bild, als ob es kurz nach rechts und links geht, als ob der Display sowas wie Autoadjustment macht. Wobei das wirklich nicht so häufig passiert, das passiert nur unter Last. Möglicherweise irgendwas, was ich falsch eingestellt habe, in der xorg.conf oder so.</p>
<p>Bin ich mir gerade nicht sicher. Mal sehen ich will demnächst mal sehen das ich Bluetooth einbaue, eine 1.8&#8243; oder 2.5&#8243; Festplatte, sowie die grünen Leds durch blaue austausche. Erstes sollte beides möglich sein, dafür habe ich schon Howtos gefunden. Bin etwas verwirrt was die SSD angeht &#8211; Dazu existiert ein Haufen an Informationen, Fakt ist einfach: Niemand kann sagen wann die SSD den Geist aufgibt, weil ich nicht einsehen kann (auch nicht mit smartctl) wieviele cycles die SSD schon hatte. Anders als Festplatten ist eine SSD limitiert &#8211; Hat eine SSD also maximal 100 000 write cycles &#8211; Hält Sie exakt 100 000 mal &#8211; beim 101 000 mal ist sie tot. Ganz einfach. Allerdings habe ich auch schon Hochrechnungen gesehen nach denen eine SSD 7-519 Jahre halten soll.. Also.. Nunja.</p>
<p>Whatever <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/linux_acer-aspire-one.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quotas</title>
		<link>http://jeanbruenn.info/linux_quotas.html</link>
		<comments>http://jeanbruenn.info/linux_quotas.html#comments</comments>
		<pubDate>Wed, 15 Jul 2009 11:15:06 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=409</guid>
		<description><![CDATA[A company i&#8217;m working for asked me to write a php script which is autoinstalling software like wordpress, gallery2, etc. I nearly finished that script, the only thing which is still missing is the &#8220;free-space&#8221; check. This is because it&#8217;s not simply just checking for the free space, in fact i have to check for [...]]]></description>
			<content:encoded><![CDATA[<p>A company i&#8217;m working for asked me to write a php script which is autoinstalling software like wordpress, gallery2, etc. I nearly finished that script, the only thing which is still missing is the &#8220;free-space&#8221; check. This is because it&#8217;s not simply just checking for the free space, in fact i have to check for quotas, if they exist, too. However, that was the reason why i played around with quotas.</p>
<p>First of all i enabled quota support in the Kernel. Then i added &#8220;usrquota,grpquota&#8221; to the options in /etc/fstab. After that i created the files quota.user and quota.group on / (which is the device i&#8217;m trying to work with quota on) and rebooted (-o remount was not working). Now back online i issued &#8220;quotacheck -avug&#8221; to the box and got:<br />
<span id="more-409"></span></p>
<pre>
quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
quotacheck: WARNING - Quotafile //quota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING - Quotafile //quota.group was probably truncated. Cannot save quota settings...
quotacheck: Cannot remount filesystem mounted on / read-only so counted values might not be right.
Please stop all programs writing to filesystem or use -m flag to force checking.
</pre>
<p>Let&#8217;s start using google. The first thing is easily solvable.. instead of &#8220;usrquota&#8221; and &#8220;grpquota&#8221; use: usrjquota.. and grpjquota i guess. However, issueing &#8220;mount /dev/sda2 / -t ext3 -o remount,rw,usrjquota=aquota.user,jqfmt=vfsv0&#8243; brings nothing. dmesg is showing:</p>
<pre>
EXT3-fs: old and new quota format mixing.
</pre>
<p>This isn&#8217;t as easy as i thought to be honest&#8230;Then finally i found a howto, explaining it quite right. You have to do it this way:</p>
<p><b>1. Add &#8220;usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0&#8243; to the partition you wanna use. For example:</b></p>
<pre>
wdp@yulivee ~ $ cat /etc/fstab | grep quota
/dev/sda2       /       ext3    defaults,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 1
wdp@yulivee ~ $
</pre>
<p><b>2. create some files, change permissions and remount the disc</b></p>
<pre>
touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /
</pre>
<p><b>3. Last Step, run the commands quotacheck -avugm and quotaon -avug</b></p>
<pre>
root@yulivee /home/wdp # quotacheck -avugm
quotacheck: WARNING -  Quotafile //aquota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING -  Quotafile //aquota.group was probably truncated. Cannot save quota settings...
quotacheck: Scanning /dev/sda2 [/] done
quotacheck: Checked 99960 directories and 1613505 files
root@yulivee /home/wdp # quotaon -avug
/dev/sda2 [/]: group quotas turned on
/dev/sda2 [/]: user quotas turned on
root@yulivee /home/wdp #
</pre>
<p>Nice nice nice <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Now i need to do the PHP Part, for that i&#8217;m adding now a testuser with quotas and checking the outputs of df and the quota tools. But first we&#8217;re coming to another problem. Adding quotas for the user quotatest:</p>
<pre>
root@yulivee /home/wdp # edquota quotatest
Disk quotas for user quotatest (uid 1003):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/sda2                        20          0          0          6        0        0
</pre>
<p>I want to set 200 MB Quota and have to deal with blocks and inodes &#8211; Funny, or? However &#8211; Inodes is the Amount of files. Blocks depends on the system. Means first of all we need to check the size of a block on / &#8211; This can be done this way:</p>
<pre>
root@yulivee /home/wdp # tune2fs -l /dev/sda2 | grep "Block size"
Block size:               4096
root@yulivee /home/wdp #
</pre>
<p>Normally, we would calculate the quota limit in bytes / blocksize, the blocksize on my box is 4096 <b>but this was not working</b>. I had to use /1024 instead of /4096 to have a limit of 200 MB.  So it seems you can ignore the blocksize of the filesystem completly.</p>
<p>Now we need to calculate a bit:</p>
<pre>
# ( Quota Limit in MB * 1024 * 1024 ) / 1024 = Blocks
( 200 * 1024 * 1024 ) / 1024 = 204800
# or:
200 MB * 1024 * 1024 = 209715200 (Bytes)
209715200 (Bytes) / 1024 = 204800 (Blocks)
# or:
200 MB * 1024 = 204800 Blocks
</pre>
<p>Now we know, that 204800 Blocks on my disc (filesystem) are 200 MB. For 195 MB it&#8217;s 199680. Now in edquota define it this way:</p>
<pre>
root@yulivee /home/wdp # edquota quotatest
Disk quotas for user quotatest (uid 1003):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/sda2                        20            199680   204800          6        0        0
</pre>
<p>okay, su &#8211; quotatest, type in quota, you&#8217;ll something similar to:</p>
<pre>
quotatest@yulivee ~ $ quota
Disk quotas for user quotatest (uid 1003):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda2  20 199680  204800            6       0       0
</pre>
<p>Seems to work, let&#8217;s now create a big file using dd, just to test whether quota is working or not:</p>
<pre>
quotatest@yulivee ~ $ dd if=/dev/urandom of=test.datei bs=1048576 seek=1024
sda2: warning, user block quota exceeded.
sda2: write failed, user block limit reached.
dd: writing `test.datei': Disk quota exceeded
150+0 records in
149+0 records out
157126656 bytes (157 MB) copied, 30.6894 s, 5.1 MB/s
quotatest@yulivee ~ $ du -h
200M    .
</pre>
<p>As you can see it&#8217;s working. Let&#8217;s come to the PHP Part. First of all we need to check whether there are quotas for the user or not. If there are quotas we have to check them, if not we have to check on which disc/partition the user is and how much of it free is.</p>
<p>if the system has no quotas the command quota will return nothing. If the system has quotas but no quotas are set for the user the command quota returns &#8220;Disk quotas for user wdp (uid 1000): none&#8221; for example if your username is wdp. If the system got quotas and quotas are set it will return something like what i wrote prior (just scroll up).</p>
<pre>
&lt;?php

        // This is just an example, there might be nicer solutions
        // it will "echo" the free "blocks" which is the same then
        // KB in my example here.
        $quota = `quota -w`;
        if(empty($quota))
        {
                $quotas = false;
        } else
        {
                if(substr_count($quota, " ") == 7)
                        $quotas = false;
                else
                        $quotas = true;
        }

        if($quotas == true)
        {

                $toreplace = array("\r", "\n", "\t");
                $line = str_replace($toreplace, ' ', $quota);
                $line = preg_replace('/\s+/s', " ", $line);
                $array = explode(" ", $line);
                $quotaCurrent = $array[17];
                $quotaSoft = $array[18];
                $quotaHard = $array[19];
                if(($quotaSoft > 0) &#038;&#038; ($quotaSoft > $quotaCurrent))
                        $free = $quotaSoft - $quotaCurrent;
                else
                        $free = $quotaHard - $quotaCurrent;
                echo $free;

        } else
        {

                // We reached this part because it
                // seems there are no usable quotas
                // this is a fallback!

        }

?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/linux_quotas.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Cache Class</title>
		<link>http://jeanbruenn.info/general_php-cache-class.html</link>
		<comments>http://jeanbruenn.info/general_php-cache-class.html#comments</comments>
		<pubDate>Mon, 13 Jul 2009 11:51:33 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[The daily insanity]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=398</guid>
		<description><![CDATA[I guess there are quite a few libraries/classes for caching purposes around in the world wide web. However, back in 08&#8242; i came up with a little class for caching purposes within PHP. Originally this file was part of a Content Management System i was writing at that time.
Features

Caching of Objects (Not only pages)
Setting of [...]]]></description>
			<content:encoded><![CDATA[<p>I guess there are quite a few libraries/classes for caching purposes around in the world wide web. However, back in 08&#8242; i came up with a little class for caching purposes within PHP. Originally this file was part of a Content Management System i was writing at that time.</p>
<p><b>Features</b></p>
<ul>
<li>Caching of Objects (Not only pages)</li>
<li>Setting of a timelimit for caching</li>
<li>Sha1Sum Checks (Prevents broken/modified cached objects)</li>
<li>Cached objects are stored as bz2</li>
</ul>
<p><span id="more-398"></span><br />
<b>Todo</b></p>
<ul>
<li>I never finished the database part, so currently this class is filebased only.</li>
</ul>
<p><b>Tests</b><br />
A friend asked me whether i got some tests to see how&#8217;s the improvement with this cache Class. No, but i created some. The thing is, Of Course it depends on the Object, how fast the caching class will be but i guess its an improvement for every usage. However i implemented the cache on the following page: <a href="http://urt-echain.eu/urtstats/index.php?page=rankingall">Player Ranking: Urban Terror</a>.</p>
<ul>
<li>12s (1st run, without cache)</li>
<li>13s (2nd run, without cache)</li>
<li>12s (3rd run, without cache)</li>
<li>14s (1st run, with cache)</li>
<li>1s (2nd run, with cache)</li>
<li>1s (3rd run, with cache)</li>
</ul>
<p>Now calculate yourself. By the way, the stored object has 12 KB. The Script is by the way creating a objects.list file, here&#8217;s the content:</p>
<p>objectname:bytes:sha1sum</p>
<pre>
index--:1247493845:6a42607e3d9de886d8db79db0a38ece59e6292aa
rankingall--:1247493869:c942dec6c330954563602e9a3866ad6ee2a8118e
rankingcountry--:1247493907:ef02716a075fbd37f566aa07c984eedfa6f3c9ca
rankingcountry-de-:1247493919:f467d3a78a9b63084e1c8ba8160e6c4bdc7c09dd
player--Eule:1247493932:6a2a56e245487a8b97b98903d785a5dbd8109da9
rankingclan--:1247493940:6c03d4543fe0b6e9a28a1b2bc1ef59d72109bce1
statistics--:1247493941:1c232daa34428b1a5a6d4ee31b0bb7c451dd39eb
</pre>
<p><b>Usage</b><br />
You have to create a folder called &#8220;tmp&#8221; and within that folder a folder called &#8220;cache&#8221;.</p>
<pre>
&lt;?php

    // Initialize the Class
    $cache = new Cache(
        'file',	// file|database (object data storage, not content)
        '180',	// minutes (180 = 3 hours, default cache time)
        'tmp/cache'	// cache directory
    );

    // Check whether there's a cached object, the object is not
    // corrupted and not out-of-date.
    if($cache->getCachedObjectData('index')){

        // found an valid cached object
        echo $cache->displayCachedObject('index'); // display the object

    } else {

        // no cache data, no cached object, or cached object corrupt,
        // out-of-date or invalid.
        /** AT THIS POINT YOU SHOULD DO THE EXPENSIVE STUFF
           * and write it into $content FOR EXAMPLE BY USING
           * ob_start(), ob_get_contents() and ob_end_clean()
           * THIS MEANS BUILD THIS CACHE CLASS AROUND
           * YOUR PAGE **/
        echo $cache->createCachedObject(
            'index', // object name
            $content, // object content
            '180' // optional - time in minutes
        );

        // or:
        // $cache->createCachedObject(
        //     'index', // object name
        //     $content, // object content
        //     '180' // optional - time in minutes
        // );
        // echo $cache->displayCachedObject('index');	// display the object

    }

?&gt;
</pre>
<p><b>Get it</b><br />
The Class is GPLv3 (whatelse). You can obtain v1.0 here <a href="http://www.jeanbruenn.info/download/software/cache.tar.bz2">as .tar.bz2</a> or <a href="http://www.jeanbruenn.info/download/software/cache.zip">as .zip</a>. Have fun with it</p>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/general_php-cache-class.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>getKeywords v0.1</title>
		<link>http://jeanbruenn.info/general_getkeywords-v01.html</link>
		<comments>http://jeanbruenn.info/general_getkeywords-v01.html#comments</comments>
		<pubDate>Sun, 12 Jul 2009 20:50:41 +0000</pubDate>
		<dc:creator>jean</dc:creator>
				<category><![CDATA[The daily insanity]]></category>

		<guid isPermaLink="false">http://jeanbruenn.info/?p=385</guid>
		<description><![CDATA[Ago some months a friend asked me to write a little Tool which is fetching Keywords from a Website for further processing, like analyzing the keywords and having a &#8220;guess&#8221; what searchengines &#8220;may&#8221; see. Shame on me that i&#8217;ve been that late with that script, but well, here it is and it&#8217;s of course open [...]]]></description>
			<content:encoded><![CDATA[<p>Ago some months a friend asked me to write a little Tool which is fetching Keywords from a Website for further processing, like analyzing the keywords and having a &#8220;guess&#8221; what searchengines &#8220;may&#8221; see. Shame on me that i&#8217;ve been that late with that script, but well, here it is and it&#8217;s of course open source and freely available to everyone. By the way, i&#8217;m referring to keyword as for all found words in a document (html page) &#8211; Not just for meta-keywords.</p>
<p>The Script is simple, you&#8217;re just including it and feed it with a website uri:</p>
<p><strong>array getKeywords ( string $uri , integer $min )</strong><br />
$uri is the URL<br />
$min is a Integer which sets the amount of &#8220;repeats&#8221; of a keyword to be displayed. 2 is usually a good choice &#8211; 1 will display all.</p>
<p><strong>Return an array containing all found keywords with a integer value &#8220;how often&#8221; the keyword was found</strong></p>
<pre>
&lt;?php

    include('getKeywords.php');
    var_dump(getKeywords($uri, 2));

?&gt;</pre>
<p><strong>Another example usage</strong></p>
<pre>
&lt;?php

    include('getKeywords.php');

    $array = getKeywords($uri, 2);

    foreach($array as $keyword => $amount)
        echo $amount." - ".$keyword."";

?&gt;
</pre>
<p>Of Course in both examples you have to set $uri to the page which should be checked. Sorry for the waiting time Chris. Finally&#8230; Here you go <img src='http://jeanbruenn.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><b>Download</b><br />
The Script is available for download and is licensed under the GPLv3. <a href="http://www.jeanbruenn.info/download/software/getKeywords-0.1.tar.bz2">You can download it from here (tar.bz2).</a> or from <a href="http://www.jeanbruenn.info/download/software/getKeywords-0.1.zip">here as .zip</a>.</p>
<p><b>And now?</b><br />
Well. You could use those Keywords and look in Google Trends or Keyword Suggestion Tools to optimize them a bit. You could also make sure that you don&#8217;t repeat words too much. Important words should be repeated (which does not mean writing 100 times &#8220;hello&#8221; will rank you the 1st with the search word 100). I just say: If the word &#8220;house&#8221; is repeated 3 times, it&#8217;s more important than a word which is only repeated 1 time.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeanbruenn.info/general_getkeywords-v01.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
