<?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>KM2 &#62;&#62; Neuerfindung &#187; Uptime</title>
	<atom:link href="http://www.km2.de/blog/tags/uptime/feed" rel="self" type="application/rss+xml" />
	<link>http://www.km2.de/blog</link>
	<description>Arbeitstitel</description>
	<lastBuildDate>Thu, 29 Jul 2010 21:32:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Twitter Servermonitoring</title>
		<link>http://www.km2.de/blog/2009/04/20/twitter-servermonitoring.html</link>
		<comments>http://www.km2.de/blog/2009/04/20/twitter-servermonitoring.html#comments</comments>
		<pubDate>Mon, 20 Apr 2009 10:07:42 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Cron]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Tech-Zeugs]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Twitterheartbeat]]></category>
		<category><![CDATA[Uptime]]></category>

		<guid isPermaLink="false">http://www.km2.de/blog/?p=1613</guid>
		<description><![CDATA[
Seitdem ich einen Twitteraccount habe, denke ich angestrengt darüber nach, welche Haushaltsgegenstände ich irgendwie dazu bringen könnte mit Twitter zu kommunizieren. Die KM2-Kaffeemaschine fällt leider flach (Frenchpress). Aber dann lassen wir eben die Server twittern. Für alle Kontrollfreaks Für alle die ihre Server ungern unbeobachtet lassen, habe ich mal ein kleines Script geschrieben, mit dem [...]]]></description>
			<content:encoded><![CDATA[<p class="full"><a href="http://www.km2.de/blog/2009/04/20/twitter-servermonitoring.html"><img class="size-full wp-image-1651 alignnone" title="twitterheartbeat_header1" src="http://www.km2.de/blog/wp-content/uploads/2009/04/twitterheartbeat_header1.gif" alt="twitterheartbeat_header1" width="600" height="152" /></a></p>
<p>Seitdem ich einen Twitteraccount habe, denke ich angestrengt darüber nach, welche Haushaltsgegenstände ich irgendwie dazu bringen könnte mit Twitter zu kommunizieren. Die KM2-Kaffeemaschine fällt leider flach (Frenchpress). Aber dann lassen wir eben die Server twittern. <del datetime="2009-04-19T15:31:28+00:00">Für alle Kontrollfreaks</del> Für alle die ihre Server ungern unbeobachtet lassen, habe ich mal ein kleines Script geschrieben, mit dem man seine Server twittern lassen: Ob es ihnen gut geht, ob sie genug Speicher haben, ihnen etwa schlecht ist, sie Langeweile haben etc.</p>
<p>Ideal für alle die auch abends per iPhone oder PDA noch schauen wollen, ob denn wirklich <strong>alles</strong> okay ist.</p>
<p><span id="more-1613"></span></p>
<p>Das Script ist ziemlich minimalistisch, hat keinerlei Abhängigkeiten (es wird kein cURL oder so benötigt) und müsste so ziemlich überall laufen was so gerade Linux durchgeht. Lizenz ist BSD, also mitnehmen, einbauen, Spaß haben.</p>
<p>Installation:</p>
<ol>
<li><a href="http://www.km2.de/blog/wp-content/uploads/2009/08/twitterheartbeat.1.3.php.gz">Twitterheartbeat runterladen</a>, entpacken, ausführbar machen</li>
<li>In der Datei twitterheartbeat.php $TWITTERUSERNAME und $TWITTERPASSWORD setzen</li>
<li>Cron mit dem gewünschtem Formatstring einrichten.</li>
</ol>
<p><strong>Die Formatstring-Platzhalter:</strong></p>
<pre>$ ./twitterheartbeat.php --help
twitterheartbeat 1.3
Publishes server information (heartbeats) to twitter
Usage: twitterheartbeat FORMATSTRING
or:    twitterheartbeat --debug
Formatstring placeholders:
        %h                 Hostname
        %la                Load average
        %th                System uptime human readable
        %tt                System uptime in seconds
        %ab                Days till alex birthday
        %ri                Memory information
        %pc                Count of all processes
        %uc                Count of users logged in
        %lt                Local time of the machine
        %f(PARTIONNAME)    Free disk space of PARTITIONNAME in bytes
        %fh(PARTIONNAME)   Free disk space of PARTITIONNAME human readable
        %u(PARTIONNAME)    Used disk space in bytes
        %uh(PARTIONNAME)   Used disk space human readable
        %p(PROCESSNAME)    'yes' if PROCESSNAME is running, otherwise 'no'
        %pc(PROCESSNAME)   Count of running processes  matching PROCESSNAME
        %vnh(DEVICE)       vnstat statistics for the current hour
        %vnd(DEVICE)       vnstat statistics for the current day
        %vnm(DEVICE)       vnstat statistics for the current month
Examples:
        twitterheartbeat "%h: %th - %uc logged in, %la"
        twitterheartbeat "%h: srv: free %fh(/srv/) - used %uh(/srv/)"
        twitterheartbeat "Bake a big, fat cake, %ab till alex great day!"
</pre>
<p><strong>Cron-Beispiel: veröffentlicht alle fünfzehn Minuten Serverinformationen (alles in einer Zeile):</strong></p>
<pre>0,15,30,45 * * * * /path/to/twitterheartbeat.php \
   "%h: Load: %la, srv: free %fh(/srv/), used: %uh(/srv/) - up for %th"</pre>
<p><em>chirp, chirp</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.km2.de/blog/2009/04/20/twitter-servermonitoring.html/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
