<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>pregos blog</title>
	
	<link>http://blog.pregos.info</link>
	<description>/me... prego!</description>
	<lastBuildDate>Wed, 01 Sep 2010 20:45:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PregosBlog" /><feedburner:info uri="pregosblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>i/o – snippets</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/ZC_mLS4_kLQ/</link>
		<comments>http://blog.pregos.info/2010/09/01/io-snippets/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 20:45:00 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[zeugs]]></category>
		<category><![CDATA[hdd]]></category>
		<category><![CDATA[iotop]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sar]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=2002</guid>
		<description><![CDATA[What exactly is &#8220;iowait&#8221;? (backup) The difference between %iowait from sar and %util from iostat (backup) Messen von I/O Performance I/O Performance Benchmarking Tools im Ueberblick]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://unix.derkeiler.com/Mailing-Lists/AIX-L/2004-04/att-0096/iowait.txt" target="_blank">What exactly is &#8220;iowait&#8221;?</a> (<a href="http://blog.pregos.info/wp-content/uploads/2010/09/iowait.txt">backup</a>)</li>
<li> <a href="http://ebergen.net/wordpress/2008/02/25/the-difference-between-iowait-from-sar-and-util-from-iostat/" target="_blank">The difference between %iowait from sar and %util from iostat</a> (<a href="http://blog.pregos.info/wp-content/uploads/2010/09/eric_bergen_sar_iostat.pdf">backup</a>)</li>
<li><a href="http://www.thomas-krenn.com/de/wiki/Messen_von_I/O_Performance" target="_blank">Messen von I/O Performance</a></li>
<li><a href="http://www.thomas-krenn.com/de/wiki/I/O_Performance_Benchmarking_Tools_im_Überblick" target="_blank">I/O Performance Benchmarking Tools im Ueberblick</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/ZC_mLS4_kLQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/09/01/io-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/09/01/io-snippets/</feedburner:origLink></item>
		<item>
		<title>ext2/3: fuer root reservierte Bloecke freigeben</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/XhiwKQO1Pr4/</link>
		<comments>http://blog.pregos.info/2010/08/26/ext23-fuer-root-reservierte-bloecke-freigeben/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 08:50:13 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[arbeit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[zeugs]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[df]]></category>
		<category><![CDATA[hdd]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[tune2fs]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1993</guid>
		<description><![CDATA[Bei ueblichen Distributionen wie Debian oder Ubuntu wird bei dem formatieren einer Festplatte mit ext2 oder ext3 immer ein Bereich von ~5% fuer root reserviert. Dieses fuehrt dazu, dass die Festplatten einen kleineren Bereich zur Verfuegung haben, als sie eigentlich Besitzen. Gerade bei grossen Festplatten oder entsprechenden RAIDs koennen die 5% ganz schoen viel werden. [...]]]></description>
			<content:encoded><![CDATA[<p>Bei ueblichen Distributionen wie Debian oder Ubuntu wird bei dem formatieren einer Festplatte mit ext2 oder ext3 immer ein Bereich von ~5% fuer root reserviert. Dieses fuehrt dazu, dass die Festplatten einen kleineren Bereich zur Verfuegung haben, als sie eigentlich Besitzen. Gerade bei grossen Festplatten oder entsprechenden RAIDs koennen die 5% ganz schoen viel werden.</p>
<p>Wieviel Speicher reserviert ist kann man mit dem Tool <strong>tune2fs</strong> herausfinden. Der Befehl:</p>

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

<p>gibt mir u.a. die Werte <em>&#8220;Reserved block count&#8221;</em> und<em> &#8220;Block size&#8221;</em> aus. Multipliziert man nun diese beiden Zahlen bekommt man heraus, wieviele Bytes benutzt sind.</p>
<p>Den Speicher freigeben kann man ebenfalls mit dem Programm tune2fs:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">tune2fs <span style="color: #660033;">-m</span> <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mydevice</pre></div></div>

<p>Den Unterschied kann man z.B mit dem Tool <strong>df</strong> angucken, wenn man es vorher und nachher aufruft. Interessant ist nicht der<em> &#8220;Size&#8221;</em> sondern der <em>&#8220;Avail&#8221;</em> Wert.</p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/XhiwKQO1Pr4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/08/26/ext23-fuer-root-reservierte-bloecke-freigeben/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/08/26/ext23-fuer-root-reservierte-bloecke-freigeben/</feedburner:origLink></item>
		<item>
		<title>Die richtige Sprache finden</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/wLVcELN5hPo/</link>
		<comments>http://blog.pregos.info/2010/08/19/die-richtige-sprache-finden/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 05:48:50 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Leute]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[zeugs]]></category>
		<category><![CDATA[it-crowd]]></category>
		<category><![CDATA[sprache]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1990</guid>
		<description><![CDATA[Nein, ich meine nicht Programiersprache, sondern die richtige Sprache, wenn es darum geht Benutzern Computerprobleme zu beschreiben. In IT-Crowd gibt es in der ersten Staffel, erste Episode relativ am Anfang eine Szene wo Moss den Telefonhoerer abnimmt und anfaengt zu erzaehlen: &#8220;Hello, IT? Yah-hah? Have you tried forcing an expected reboot? You see the driver [...]]]></description>
			<content:encoded><![CDATA[<p>Nein, ich meine nicht Programiersprache, sondern die richtige Sprache, wenn es darum geht Benutzern Computerprobleme zu beschreiben. In IT-Crowd gibt es in der ersten Staffel, erste Episode relativ am Anfang eine Szene wo Moss den Telefonhoerer abnimmt und anfaengt zu erzaehlen:</p>
<p><em>&#8220;Hello, IT? Yah-hah? Have you tried forcing an  expected reboot? You see the driver hooks the function by patching  the system call table, so its not safe to unload it unless another  threads about to jump in there and do its stuff, and you dont  want to end up in the middle of invalid memory.&#8221;</em></p>
<p>Ein sehr gutes Beispiel um das Problem der falschen Sprache einem Benutzer gegenueber zu zeigen. Gestern bekam ich eine Email mit einem sehr witzigen Text, das aber genau dieses Problem aufgreift und lustig loest. Ich schreibe diesen Eintrag, weil ich es wichtig finde, immer die richtige Sprache zu finden. Nur so koennen die User, Vorgesetzten, Kunden etc. dann auch das Probleme verstehen und begreifen.</p>
<p><strong>Anfrage der Anwenderin: </strong><br />
Wenn ich ein Film auf meine Diskette speichern möchte, kommt die Meldung, dass auf der Diskette nicht genügend Speicherplatz vorhanden ist. Dann versuche ich mit &#8220;speichern Verknüpfung&#8221; und dann ist Platz genug und Film ist auf der Diskette. Problem ist aber, wenn ich diesen Film auf der Diskette auf einem anderen PC anschauen möchte. Da kommt die Meldung: &#8220;nicht gefunden&#8221;. Aber auf meinem PC funktioniert es. Was kann es sein?</p>
<p><strong>Antwort IT-Hotline: </strong><br />
Sehr geehrte Anwenderin,</p>
<p>in Ihre Handtasche passt Ihr Pelzmantel einfach nicht rein. Ein Zettel mit Vermerk, dass Ihr Pelzmantel im Schrank hängt, passt in Ihre Handtasche rein. Also solange Sie diesen Zettel daheim lesen, finden Sie Ihren Pelzmantel im Schrank. Schwieriger wird es, wenn Sie Ihre Freundin besuchen und dort Ihren Zettel lesen und erfahren, dass Ihr Pelzmantel im Schrank hängt. In dem Schrank von Ihrer Freundin können Sie suchen, so lange Sie wollen, Ihren Pelzmantel finden Sie<br />
dort bestimmt nicht&#8230;</p>
<p>Noch eine Hilfe:<br />
Handtasche = Diskette<br />
Pelzmantel = Film<br />
Zettel = Verknüpfung<br />
Schrank = PC<br />
Motten im Schrank = PC Virus<br />
Nachbar im Schrank = Hacker</p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/wLVcELN5hPo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/08/19/die-richtige-sprache-finden/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/08/19/die-richtige-sprache-finden/</feedburner:origLink></item>
		<item>
		<title>IT Crowd – Season 4</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/dYfO4GRmOY4/</link>
		<comments>http://blog.pregos.info/2010/08/15/it-crowd-season-4/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 11:19:17 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[TV]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[serien]]></category>
		<category><![CDATA[channel 4]]></category>
		<category><![CDATA[it-crowd]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1985</guid>
		<description><![CDATA[just finished. It is incredible cool as usual and season 5 is anounced already]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.pregos.info/wp-content/uploads/2010/08/The-IT-Crowd-the-it-crowd-933159_395_297.jpg"><img class="aligncenter size-full wp-image-1986" title="The IT Crowd" src="http://blog.pregos.info/wp-content/uploads/2010/08/The-IT-Crowd-the-it-crowd-933159_395_297.jpg" alt="" width="395" height="297" /></a></p>
<p>just finished. It is incredible cool as usual and season 5 is <a href="http://www.comedy.co.uk/news/story/00000310/the_it_crowd_series_5/" target="_blank">anounced</a> already <img src='http://blog.pregos.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/dYfO4GRmOY4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/08/15/it-crowd-season-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/08/15/it-crowd-season-4/</feedburner:origLink></item>
		<item>
		<title>Netgear ReadyNAS 2100 – Nagios</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/DGbe6zHXpoM/</link>
		<comments>http://blog.pregos.info/2010/07/19/netgear-readynas-2100-nagios/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 13:39:49 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1965</guid>
		<description><![CDATA[Wir haben hier auf der Arbeit ein neues 8TB ReadyNAS von Netgear in Betrieb genommen. Um das ins Nagios mit aufzunehmen hab ich ein kleines Plugin geschrieben was per SNMP die Werte abruft und fuer Nagios aufbereitet. Das Plugin check_readynas: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [...]]]></description>
			<content:encoded><![CDATA[<p>Wir haben hier auf der Arbeit ein neues 8TB ReadyNAS von Netgear in Betrieb genommen. Um das ins Nagios mit aufzunehmen hab ich ein kleines Plugin geschrieben was per SNMP die Werte abruft und fuer Nagios aufbereitet. Das Plugin check_readynas:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># receive statusinfo from Netgear ReadyNAS 2100 for Nagios</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># you can get all snmp-options with:</span>
<span style="color: #666666; font-style: italic;">#   snmpwalk -m ALL -v 2c -c MYCOMMUNITY MYIPADDRESS  .1.3.6.1.4.1.4526</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Usage: </span>
<span style="color: #666666; font-style: italic;">#  ./check_readynas IP-ADDRESS SNMP-COMMUNITY STATUSCHECK</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># 2010-07-19: initial Version     \\ Jan Toenjes &lt;jtoenje@uni-goettingen.de&gt;</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">##</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># temperature values for warning or critical / hdd (from datasheet)</span>
<span style="color: #007800;">MAXDISKTEMPCRIT</span>=<span style="color: #ff0000;">&quot;60&quot;</span>
<span style="color: #007800;">MINDISKTEMPCRIT</span>=<span style="color: #ff0000;">&quot;5&quot;</span>
<span style="color: #007800;">MAXDISKTEMPWARN</span>=<span style="color: #ff0000;">&quot;50&quot;</span>
<span style="color: #007800;">MINDISKTEMPWARN</span>=<span style="color: #ff0000;">&quot;15&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># unused systemtemperature values for warning or critical / (from webinterface)</span>
<span style="color: #007800;">MAXSYSTEMPCRIT</span>=<span style="color: #ff0000;">&quot;65&quot;</span>
<span style="color: #007800;">MINSYSTEMPCRIT</span>=<span style="color: #ff0000;">&quot;0&quot;</span>
<span style="color: #007800;">MAXSYSTEMPWARN</span>=<span style="color: #ff0000;">&quot;55&quot;</span>
<span style="color: #007800;">MINSYSTEMPWARN</span>=<span style="color: #ff0000;">&quot;10&quot;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># nagios return values</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STATE_OK</span>=<span style="color: #000000;">0</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STATE_WARNING</span>=<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STATE_CRITICAL</span>=<span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STATE_UNKNOWN</span>=<span style="color: #000000;">3</span>  
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">STATE_DEPENDENT</span>=<span style="color: #000000;">4</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># check disk temperature for warning or critical values</span>
<span style="color: #000000; font-weight: bold;">function</span> checkDiskTemperature <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp;
	<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">true</span></span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1 &gt;= <span style="color: #007800;">$MAXDISKTEMPWARN</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$true</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #007800;">returnValue</span>=<span style="color: #007800;">$STATE_WARNING</span> ;
		<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
	<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">true</span></span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1 &gt;= <span style="color: #007800;">$MAXDISKTEMPCRIT</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$true</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #007800;">returnValue</span>=<span style="color: #007800;">$STATE_CRITICAL</span> ;
		<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
	<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">true</span></span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1 &lt;= <span style="color: #007800;">$MINDISKTEMPWARN</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$true</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #007800;">returnValue</span>=<span style="color: #007800;">$STATE_WARNING</span> ;
		<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
	<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">true</span></span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1 &lt;= <span style="color: #007800;">$MINDISKTEMPCRIT</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$true</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
			<span style="color: #007800;">returnValue</span>=<span style="color: #007800;">$STATE_CRITICAL</span> ;
		<span style="color: #000000; font-weight: bold;">fi</span>
	<span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #007800;">$returnValue</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># check third parameter and return the information</span>
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
	disk1status<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">DSK1</span>=<span style="color: #000000; font-weight: bold;">`</span> snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.3.1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot; //g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">DSK1STAT</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.4.1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot;//g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$DSK1STAT</span> == <span style="color: #ff0000;">&quot;ok&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #000000; font-weight: bold;">else</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_WARNING</span>
		<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Disk1: <span style="color: #007800;">$DSK1</span> - <span style="color: #007800;">$DSK1STAT</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
&nbsp;
	disk2status<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">DSK2</span>=<span style="color: #000000; font-weight: bold;">`</span> snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.3.2 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot; //g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">DSK2STAT</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.4.2 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot;//g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$DSK2STAT</span> == <span style="color: #ff0000;">&quot;ok&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #000000; font-weight: bold;">else</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_WARNING</span>
		<span style="color: #000000; font-weight: bold;">fi</span>	
&nbsp;
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Disk2: <span style="color: #007800;">$DSK2</span> - <span style="color: #007800;">$DSK2STAT</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
&nbsp;
	disk3status<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">DSK3</span>=<span style="color: #000000; font-weight: bold;">`</span> snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.3.3 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot; //g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>	
		<span style="color: #007800;">DSK3STAT</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.4.3 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot;//g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$DSK3STAT</span> == <span style="color: #ff0000;">&quot;ok&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #000000; font-weight: bold;">else</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_WARNING</span>
		<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Disk3: <span style="color: #007800;">$DSK3</span> - <span style="color: #007800;">$DSK3STAT</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
&nbsp;
	disk4status<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">DSK4</span>=<span style="color: #000000; font-weight: bold;">`</span> snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.3.4 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot; //g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">DSK4STAT</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.4.4 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot;//g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$DSK4STAT</span> == <span style="color: #ff0000;">&quot;ok&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #000000; font-weight: bold;">else</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_WARNING</span>
		<span style="color: #000000; font-weight: bold;">fi</span>	
&nbsp;
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Disk4: <span style="color: #007800;">$DSK4</span> - <span style="color: #007800;">$DSK4STAT</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>	
&nbsp;
&nbsp;
	disk1temp<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">DSK1TEMP</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.5.1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">DSK1CEL</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;scale=2;(5/9)*(<span style="color: #007800;">$DSK1TEMP</span>-32)&quot;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
		checkDiskTemperature <span style="color: #007800;">$DSK1CEL</span>
		<span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$?</span>
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Disk1: <span style="color: #007800;">$DSK1CEL</span> Celsius&quot;</span> ;
	<span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
&nbsp;
	disk2temp<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">DSK2TEMP</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.5.2 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">DSK2CEL</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;scale=2;(5/9)*(<span style="color: #007800;">$DSK2TEMP</span>-32)&quot;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
                checkDiskTemperature <span style="color: #007800;">$DSK2CEL</span>
		<span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$?</span>
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Disk2: <span style="color: #007800;">$DSK2CEL</span> Celsius&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
&nbsp;
	disk3temp<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">DSK3TEMP</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.5.3 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">DSK3CEL</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;scale=2;(5/9)*(<span style="color: #007800;">$DSK3TEMP</span>-32)&quot;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
                checkDiskTemperature <span style="color: #007800;">$DSK3CEL</span>
		<span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$?</span>
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Disk3: <span style="color: #007800;">$DSK3CEL</span> Celsius&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
&nbsp;
	disk4temp<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">DSK4TEMP</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.3.1.5.4 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">DSK4CEL</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;scale=2;(5/9)*(<span style="color: #007800;">$DSK4TEMP</span>-32)&quot;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
                checkDiskTemperature <span style="color: #007800;">$DSK4CEL</span>
		<span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$?</span>
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Disk4: <span style="color: #007800;">$DSK4CEL</span> Celsius&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>	
&nbsp;
	fan1<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">FAN1</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.4.1.2.1 <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Fan1: <span style="color: #007800;">$FAN1</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
&nbsp;
	fan2<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">FAN2</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.4.1.2.2 <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Fan2: <span style="color: #007800;">$FAN2</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>	
&nbsp;
        systemp<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">SYSTEMP</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.5.1.2.1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">SYSCEL</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;scale=2;(5/9)*(<span style="color: #007800;">$SYSTEMP</span>-32)&quot;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">SYSTEMPOK</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.5.1.3.1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot;//g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$SYSTEMPOK</span> == <span style="color: #ff0000;">&quot;ok&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #000000; font-weight: bold;">else</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_WARNING</span>
		<span style="color: #000000; font-weight: bold;">fi</span>	
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;System Temperature: <span style="color: #007800;">$SYSCEL</span> Celsius - <span style="color: #007800;">$SYSTEMPOK</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>	
&nbsp;
&nbsp;
	raidstatus<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">RAID</span>=<span style="color: #000000; font-weight: bold;">`</span> snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.7.1.3.1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot; //g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">RAIDSTAT</span>=<span style="color: #000000; font-weight: bold;">`</span>snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.7.1.4.1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.*ING: &quot;//g'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/&quot;//g'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$RAIDSTAT</span> == <span style="color: #ff0000;">&quot;ok&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #000000; font-weight: bold;">else</span>
		  <span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_WARNING</span>
		<span style="color: #000000; font-weight: bold;">fi</span>	
&nbsp;
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;RAID: <span style="color: #007800;">$RAID</span> - <span style="color: #007800;">$RAIDSTAT</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
	freespace<span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">SPACE</span>=<span style="color: #000000; font-weight: bold;">`</span> snmpget $<span style="color: #000000;">1</span> <span style="color: #660033;">-v2c</span> <span style="color: #660033;">-c</span> $<span style="color: #000000;">2</span> .1.3.6.1.4.1.4526.18.7.1.5.1 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #007800;">MB</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;scale=2; <span style="color: #007800;">$SPACE</span>/1024&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;Free Space: <span style="color: #007800;">$MB</span> mb&quot;</span>
	<span style="color: #000000; font-weight: bold;">;;</span>		                                                                
&nbsp;
	<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #007800;">intReturn</span>=<span style="color: #007800;">$STATE_OK</span>
		<span style="color: #007800;">outMessage</span>=<span style="color: #ff0000;">&quot;  Usage: $0 IPADDRESS SNMPCOMMUNITY STATUS <span style="color: #000099; font-weight: bold;">\n</span> <span style="color: #000099; font-weight: bold;">\n</span>  Available statuses are: <span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>    disk1status|disk2status|disk3status|disk4status <span style="color: #000099; font-weight: bold;">\n</span>    disk1temp|disk2temp|disk3temp|disk4temp <span style="color: #000099; font-weight: bold;">\n</span>    fan1|fan2 <span style="color: #000099; font-weight: bold;">\n</span>    systemp <span style="color: #000099; font-weight: bold;">\n</span>    raidstatus <span style="color: #000099; font-weight: bold;">\n</span>    freespace&quot;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #007800;">$outMessage</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #007800;">$intReturn</span></pre></td></tr></table></div>

<p>(<a href="http://blog.pregos.info/wp-content/uploads/2010/07/check_readynas.txt">download</a>) in den Ordner /usr/lib/nagios/plugins/ verschieben und nachdem das folgende check_command in der /etc/nagios3/commands.cfg definiert wurde:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># Netgear ReadyNAS 2100
define command{
        command_name    check_readynas
        command_line    $USER1$/check_readynas $HOSTADDRESS$ $ARG1$ $ARG2$
}</pre></div></div>

<p>kann man ganz einfach die entsprechenden Checks definieren. Beispiel:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">define host {
        host_name   netgear-readynas
        alias       Netgear ReadyNAS 2100 Business Editon 8TB
        address     1.2.3.4
        use         device-template
        }
&nbsp;
define service{
        host                            netgear-readynas
        service_description             DISK1 TEMP
        check_command                   check_readynas!MYSNMPCOMMUNITY!disk1temp
        use                             device-service
        }</pre></div></div>

<p>Bei uns sieht das ganze dann so aus:<br />
<a href="http://blog.pregos.info/wp-content/uploads/2010/07/screenshot1.png"><img src="http://blog.pregos.info/wp-content/uploads/2010/07/screenshot1.png" alt="" title="screenshot1" width="836" height="259" class="aligncenter size-full wp-image-1979" /></a></p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/DGbe6zHXpoM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/07/19/netgear-readynas-2100-nagios/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/07/19/netgear-readynas-2100-nagios/</feedburner:origLink></item>
		<item>
		<title>XML-Validierung auf der bash</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/E69pZJluxfI/</link>
		<comments>http://blog.pregos.info/2010/06/28/xml-validierung-auf-der-bash/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 14:16:11 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[arbeit]]></category>
		<category><![CDATA[zeugs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1960</guid>
		<description><![CDATA[Problem: Ein XML-Dokument in der bash auf Validitaet ueberpruefen Loesung: aptitude install libxml2-utils  ; xmllint DATEINAME.xml]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong>: Ein XML-Dokument in der bash auf Validitaet ueberpruefen</p>
<p><strong>Loesung</strong>: aptitude install libxml2-utils  ; xmllint DATEINAME.xml</p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/E69pZJluxfI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/06/28/xml-validierung-auf-der-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/06/28/xml-validierung-auf-der-bash/</feedburner:origLink></item>
		<item>
		<title>XML -&gt; Quelltext nachtraeglich einruecken</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/hSAhWuNEeRc/</link>
		<comments>http://blog.pregos.info/2010/06/24/xml-quelltext-nachtraeglich-einruecken/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 08:10:52 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[arbeit]]></category>
		<category><![CDATA[zeugs]]></category>
		<category><![CDATA[formatieren]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1958</guid>
		<description><![CDATA[Problem: Ein riesiges XML Dokument, bei dem das gesamte Dokument in einer Zeile steht lesbar bekommen. Loesung: aptitude install xmlindent ; xmlindent SOURCEFILE.xml &#62; OUTPUT.xml]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong>: Ein riesiges XML Dokument, bei dem das gesamte Dokument in einer Zeile steht lesbar bekommen.</p>
<p><strong>Loesung</strong>: aptitude install xmlindent ; xmlindent SOURCEFILE.xml &gt; OUTPUT.xml</p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/hSAhWuNEeRc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/06/24/xml-quelltext-nachtraeglich-einruecken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/06/24/xml-quelltext-nachtraeglich-einruecken/</feedburner:origLink></item>
		<item>
		<title>HowTo: Windows Desktop read only / roaming Profiles</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/MJjthIeFyw8/</link>
		<comments>http://blog.pregos.info/2010/06/21/howto-windows-desktop-read-only-roaming-profiles/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 06:27:20 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[arbeit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[pdc]]></category>
		<category><![CDATA[read only]]></category>
		<category><![CDATA[rights]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[schreibschutz]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1955</guid>
		<description><![CDATA[Problem: Wir haben Laborrechner, an denen ein Benutzeraccount fuer viele User und verschiedene Rechner moeglich ist. Die Anmeldung mit dem Benutzeraccount ist auf die Laborrechner beschraenkt (vgl. Blogeintrag: Samba/LDAP: Benutzeraccount auf Rechner beschraenken). Dadurch das viele User den Account gemeinsam nutzen muellt der Desktop sehr schnell zu und die Anmeldung wird unsagbar langsam. Loesung: Den [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> Wir haben Laborrechner, an denen ein Benutzeraccount fuer viele User und verschiedene Rechner moeglich ist. Die Anmeldung mit dem Benutzeraccount ist auf die Laborrechner beschraenkt (vgl. Blogeintrag: <a href="http://blog.pregos.info/2009/11/26/sambaldap-benutzeraccount-auf-rechner-beschraenken/" target="_blank">Samba/LDAP: Benutzeraccount auf Rechner beschraenken</a>). Dadurch das viele User den Account gemeinsam nutzen muellt der Desktop sehr schnell zu und die Anmeldung wird unsagbar langsam.</p>
<p><strong>Loesung:</strong> Den Desktop schreibgeschuetzt machen um ein weiteres zumuellen zu verhindern. Dazu&#8230;</p>
<p>&#8230;</p>
<p>Wenn man bei einem Benutzeraccount mit roaming Profiles den Windows Desktop auf read only setzen moechte, muss die folgende Zeile in die netlogon.bat fuer den User eingefuegt werden:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">cacls &quot;%USERPROFILE%\desktop&quot; /E /P %USERNAME%:R</pre></div></div>

<p>Damit wird beim Anmelden an den Rechner in der lokalen Kopie des Profils der Ordner &#8220;Desktop&#8221; mit NTFS-ACLs auf read only gesetzt.</p>
<p>Wenn man nun aber ebenfalls die Option &#8220;Benutzer bei Fehlschlag des servergespeicherteten Profils abmelden&#8221; aktiviert hat, ist eine weitere Anmeldung nicht mehr moeglich, da der Kopiervorgang vom servergespeicherten Profil/Desktop in die lokale Kopie/Desktop nicht mehr moeglich ist, da der Ordner bereits Schreibgeschuetzt ist. Eine Abhilfe schafft dort die Option &#8220;Verzeichnisse aus servergespeichertem Profil ausschliessen&#8221; die man aktivieren und als Ordner &#8220;Desktop&#8221; angeben muss.</p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/MJjthIeFyw8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/06/21/howto-windows-desktop-read-only-roaming-profiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/06/21/howto-windows-desktop-read-only-roaming-profiles/</feedburner:origLink></item>
		<item>
		<title>WordPress 3.0</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/kLsLtPKLS_8/</link>
		<comments>http://blog.pregos.info/2010/06/17/wordpress-3-0/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 19:44:32 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Sideblog]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1953</guid>
		<description><![CDATA[ist da&#8230; gerade Blog aktualisiert. Das Theme im Adminbereich ist heller]]></description>
			<content:encoded><![CDATA[<p>ist da&#8230; gerade Blog aktualisiert. Das Theme im Adminbereich ist heller <img src='http://blog.pregos.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/kLsLtPKLS_8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/06/17/wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/06/17/wordpress-3-0/</feedburner:origLink></item>
		<item>
		<title>(bash)Notizen…</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/edD0Ar_c_7E/</link>
		<comments>http://blog.pregos.info/2010/06/02/bashnotizen/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 16:17:06 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[zeugs]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1948</guid>
		<description><![CDATA[alle Dokumente rekursiv mit der Gruppe tomcat55 anlegen / setgid: chgrp tomcat55 /home/myfolder chmod g+s /home/myfolder alle Dateien von *.TIF in *.tif umbenennen for i in `ls *.TIF`; do mv $i `echo $i&#124; sed 's/TIF/tif/g'` ; done alle *.tif Dokumente in einem Ordner fortlaufend numerieren i=0; for j in `ls *.tif` ; do i=`echo $i [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>alle Dokumente rekursiv mit der Gruppe tomcat55 anlegen / setgid:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chgrp</span> tomcat55 <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>myfolder
<span style="color: #c20cb9; font-weight: bold;">chmod</span> g+s <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>myfolder</pre></div></div>

<ul>
<li>alle Dateien von *.TIF in *.tif umbenennen</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">*</span>.TIF<span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/TIF/tif/g'</span><span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<ul>
<li>alle *.tif Dokumente in einem Ordner fortlaufend numerieren</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">i</span>=<span style="color: #000000;">0</span>; <span style="color: #000000; font-weight: bold;">for</span> j <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">*</span>.tif<span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #007800;">i</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span> + <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$j</span> <span style="color: #007800;">$i</span>.tif ; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<ul>
<li>alle Dokumente in einem Ordner fortlaufend numerieren mit 8 Stellen</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">i</span>=<span style="color: #000000;">0</span>
<span style="color: #007800;">stellen</span>=<span style="color: #000000;">8</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> j <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span> ; <span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #007800;">i</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span> + <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`</span> ;
  <span style="color: #007800;">NEU</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">&quot;%.<span style="color: #007800;">${stellen}</span>i<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">`</span>.tif ;
  <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$j</span> <span style="color: #007800;">$NEU</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/edD0Ar_c_7E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/06/02/bashnotizen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/06/02/bashnotizen/</feedburner:origLink></item>
		<item>
		<title>chmod 755 rekursiv NUR auf Verzeichnisse</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/2W0NCjE5Ris/</link>
		<comments>http://blog.pregos.info/2010/05/19/chmod-755-rekursiv-nur-auf-verzeichnisse/#comments</comments>
		<pubDate>Wed, 19 May 2010 14:28:43 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rechte]]></category>
		<category><![CDATA[rekursiv]]></category>
		<category><![CDATA[verzeichnis]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1946</guid>
		<description><![CDATA[find . -type d -exec chmod 755 &#123;&#125; \; entsprechend ein 644 auf nur die Dateien ist: find . -type f -exec chmod 644 &#123;&#125; \; (via)]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></div></div>

<p>entsprechend ein 644 auf nur die Dateien ist:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">644</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></div></div>

<p><small>(<a href="http://movabletripe.com/archive/recursively-chmod-directories-only/" target="_blank">via</a>)</small></p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/2W0NCjE5Ris" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/05/19/chmod-755-rekursiv-nur-auf-verzeichnisse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/05/19/chmod-755-rekursiv-nur-auf-verzeichnisse/</feedburner:origLink></item>
		<item>
		<title>777</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/kQ-HR9GLzlE/</link>
		<comments>http://blog.pregos.info/2010/05/19/777/#comments</comments>
		<pubDate>Wed, 19 May 2010 07:54:15 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rechte]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1941</guid>
		<description><![CDATA[Wie lange arbeite ich jetzt schon mit Linux bis mir das System dahinter bewusst wird? r=4, w=2, x=1 777 = rwx rwx rwx = 4+2+1 4+2+1 4+2+1 750 = rwx r-x &#8212; = 4+2+1 4+1 0 644 = rw- &#8211;r &#8211;r = 4+2 4 4 Man man man&#8230; [Update] &#8211; Danke Kevin fuer die Korrektur, [...]]]></description>
			<content:encoded><![CDATA[<p>Wie lange arbeite ich jetzt schon mit Linux bis mir das System dahinter bewusst wird?</p>
<p>r=4, w=2, x=1</p>
<p>777 = rwx rwx rwx = 4+2+1 4+2+1 4+2+1<br />
750 = rwx r-x &#8212; = 4+2+1 4+1 0<br />
644 = rw- &#8211;r &#8211;r = 4+2 4 4</p>
<p>Man man man&#8230; <img src='http://blog.pregos.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>[Update]</strong> &#8211; Danke Kevin fuer die Korrektur, habs im Post gerade aktualisiert</p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/kQ-HR9GLzlE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/05/19/777/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/05/19/777/</feedburner:origLink></item>
		<item>
		<title>O2-Mailbox deaktivieren</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/A3bAhz2xqDw/</link>
		<comments>http://blog.pregos.info/2010/05/14/o2-mailbox-deaktivieren/#comments</comments>
		<pubDate>Fri, 14 May 2010 11:07:05 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Sideblog]]></category>
		<category><![CDATA[homezone]]></category>
		<category><![CDATA[mailbox]]></category>
		<category><![CDATA[O2]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1938</guid>
		<description><![CDATA[normale Mailbox: ##0002# Anrufe auf Festnetz wenn nicht in Homezone: 1010 und dann die 3]]></description>
			<content:encoded><![CDATA[<ul>
<li>normale Mailbox: <strong>##0002#</strong></li>
<li>Anrufe auf Festnetz wenn nicht in Homezone: <strong>1010</strong> und dann die <strong>3</strong></li>
</ul>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/A3bAhz2xqDw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/05/14/o2-mailbox-deaktivieren/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/05/14/o2-mailbox-deaktivieren/</feedburner:origLink></item>
		<item>
		<title>Hetzner EQ-Server + KVM &amp;&amp; bridge</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/e_llHWtWfWg/</link>
		<comments>http://blog.pregos.info/2010/05/11/hetzner-eq-server-kvm-bridge/#comments</comments>
		<pubDate>Tue, 11 May 2010 14:55:54 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[arbeit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[hetzner]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1932</guid>
		<description><![CDATA[Vorneweg: Es ist ein Krampf bis ich es rausgefunden hatte&#8230; Eine Bridge einrichten, dafuer: aptitude install bridge-utils und anschliessend die /etc/network/interfaces entsprechend anpassen: ### Hetzner Online AG - installimage # Loopback device: auto lo iface lo inet loopback &#160; # device: eth0 auto eth0 iface eth0 inet manual &#160; # bridge: br0 auto br0 iface [...]]]></description>
			<content:encoded><![CDATA[<p>Vorneweg: Es ist ein Krampf bis ich es rausgefunden hatte&#8230;</p>
<p>Eine Bridge einrichten, dafuer:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">aptitude install bridge-utils</pre></div></div>

<p>und anschliessend die <em>/etc/network/interfaces</em> entsprechend anpassen:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback
&nbsp;
# device: eth0
auto  eth0
iface eth0 inet manual
&nbsp;
# bridge: br0
auto br0
iface br0 inet static
	address		188.XX.XX.142
	broadcast	188.XX.XX.191
	netmask		255.255.255.192
	gateway		188.XX.XX.129
&nbsp;
	bridge_ports	eth0
	bridge_stp	off
	bridge_maxwait	5
&nbsp;
	up		route add -host 188.XX.XX.160 gw 188.XX.XX.160
	up		route add -host 188.XX.XX.161 gw 188.XX.XX.161
	up		route add -host 188.XX.XX.162 gw 188.XX.XX.162</pre></div></div>

<p>Dabei darauf auf die klassischen Fehler achten:</p>
<ol>
<li>echo 1 &gt;&gt; /proc/sys/net/ipv4/ip_forward</li>
<li>iptables -P FORWARD ACCEPT</li>
</ol>
<p>Bei der Konfiguration der virtuellen Maschinen dann das Netzwerk ueber die bridge (br0) konfigurieren. Nachtraeglich kann man das sonst auch noch in der entsprechenden <em>/etc/libvirt/quemu/MASCHINENNAME.xml</em> anpassen:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;interface</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'bridge'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mac</span> <span style="color: #000066;">address</span>=<span style="color: #ff0000;">'54:52:00:3f:35:9d'</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source</span> <span style="color: #000066;">bridge</span>=<span style="color: #ff0000;">'br0'</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/interface<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>In der Maschine selber ist es dann nur noch wichtig, die IP des Hauptsystems als Gateway einzutragen, ein Beispiel fuer die <em>/etc/network/interfaces</em> eines Gastes waere:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">auto lo
iface lo inet loopback
&nbsp;
# The primary network interface
auto eth0
iface eth0 inet static
	address		188.XX.XX.162
	broadcast	188.XX.XX.191
	netmask		255.255.255.192
	gateway		188.XX.XX.142</pre></div></div>

<p>Die Informationen hier habe ich aus dem Blogeintrag: &#8220;<a href="http://blog.damn1337.de/2009/07/hetzner-eq-serie-mit-zusatzlichen-ip-adressen-howto/" target="_blank">Hetzner: EQ-Serie mit zusaetzlichen IP-Adressen (HowTo)</a>&#8221; und den bridge-krams aus meinem Kopf&#8230;</p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/e_llHWtWfWg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/05/11/hetzner-eq-server-kvm-bridge/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/05/11/hetzner-eq-server-kvm-bridge/</feedburner:origLink></item>
		<item>
		<title>I/O monitoren</title>
		<link>http://feedproxy.google.com/~r/PregosBlog/~3/ejOHTRDtynI/</link>
		<comments>http://blog.pregos.info/2010/04/21/io-monitoren/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 14:11:27 +0000</pubDate>
		<dc:creator>prego</dc:creator>
				<category><![CDATA[Sideblog]]></category>

		<guid isPermaLink="false">http://blog.pregos.info/?p=1928</guid>
		<description><![CDATA[mit iotop ; die option -o zeigt nur die Prozesse an die auch aktiv i/o erzeugen]]></description>
			<content:encoded><![CDATA[<p>mit <strong>iotop</strong> ; die option <strong>-o</strong> zeigt nur die Prozesse an die auch aktiv i/o erzeugen</p>
<img src="http://feeds.feedburner.com/~r/PregosBlog/~4/ejOHTRDtynI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.pregos.info/2010/04/21/io-monitoren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.pregos.info/2010/04/21/io-monitoren/</feedburner:origLink></item>
	</channel>
</rss>
