<?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>Linux 360° &#124; Italia &#187; temperatura</title>
	<atom:link href="http://www.linux360.it/tag/temperatura/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linux360.it</link>
	<description>Notizie, guide e tutorial per il mondo Linux a 360°</description>
	<lastBuildDate>Tue, 16 Dec 2014 14:03:33 +0000</lastBuildDate>
	<language>it-IT</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Monitorare la temperatura dei Hard Disk in Ubuntu</title>
		<link>http://www.linux360.it/2012/02/10/monitorare-la-temperatura-dei-hard-disk-in-ubuntu/</link>
		<comments>http://www.linux360.it/2012/02/10/monitorare-la-temperatura-dei-hard-disk-in-ubuntu/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 16:39:04 +0000</pubDate>
		<dc:creator><![CDATA[Francesco Gabriele]]></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[hardisk]]></category>
		<category><![CDATA[temperatura]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ubuntuserver.it/?p=264</guid>
		<description><![CDATA[<p>Ho creato uno scipt bash che trova ogni disco nel computer, e controlla la sua temperatura, ed in caso di temperatura alta manda una mail e dopo spegne il server. Prima di tutto installiamo le utility necessarie: apt-get install smartmontools Ed ora lo script: vim /script/monitor_temperatura.sh #! /bin/bash DISKS=&#8221;`blkid &#124; grep sd &#124; cut -c ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2012/02/10/monitorare-la-temperatura-dei-hard-disk-in-ubuntu/">Monitorare la temperatura dei Hard Disk in Ubuntu</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Ho creato uno scipt bash che trova ogni disco nel computer, e controlla la sua temperatura, ed in caso di temperatura alta manda una mail e dopo spegne il server.</p>
<p><strong>Prima di tutto installiamo le utility necessarie:</strong></p>
<p><strong>apt-get install smartmontools</strong></p>
<p><strong>Ed ora lo script:</strong></p>
<p><strong>vim /script/monitor_temperatura.sh</strong></p>
<p><strong>#! /bin/bash<br />
DISKS=&#8221;`blkid | grep sd | cut -c 1-8 | uniq`&#8221;<br />
SMART=/usr/sbin/smartctl<br />
ARGS=&#8221;-a -d ata&#8221;<br />
LOG=/usr/bin/logger<br />
DOWN=/sbin/shutdown<br />
ALERT_LEVEL=55<br />
for disk in $DISKS<br />
do<br />
if [ -b $disk ]; then<br />
HDTEMP=$($SMART $ARGS $disk | grep -m 1 Temperature | awk &#8216;{print $10}&#8217;)<br />
if [ $HDTEMP -ge $ALERT_LEVEL ]; then<br />
$LOG &#8220;System going down as hard disk : $disk temperature $HDTEMP°C crossed its limit&#8221;<br />
/bin/echo &#8220;System going down as hard disk : $disk temperature $HDTEMP°C crossed its limit&#8221; | mail -s &#8220;ServerKVM FrankHome&#8221; francesco.gabriele@gmail.com<br />
sync;sync<br />
$DOWN -h 0<br />
fi<br />
fi<br />
done</strong></p>
<p><strong>Ora lo scheduliamo tramite cron:</strong></p>
<p><strong>*/50 * * * * /script/monitor_temperatura.sh</strong></p>
<p>Ovviamente anche in questo caso dovrete settare i vari smtp (postfix,exim,ssmtp ecc..) per l&#8217;invio della mail.</p>
<p>Spero possa essere utile a molti</p>
<p>Frank</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2012/02/10/monitorare-la-temperatura-dei-hard-disk-in-ubuntu/">Monitorare la temperatura dei Hard Disk in Ubuntu</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2012/02/10/monitorare-la-temperatura-dei-hard-disk-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
