<?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>Marcus Nyberg &#187; marcus</title>
	<atom:link href="http://www.marcusnyberg.com/author/marcus/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcusnyberg.com</link>
	<description>Digital and dangerous</description>
	<lastBuildDate>Mon, 26 Jul 2010 11:00:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MRTG and Cisco-problem for unrouted VLAN&#8217;s</title>
		<link>http://www.marcusnyberg.com/2010/07/26/mrtg-and-cisco-problem-for-unrouted-vlans/</link>
		<comments>http://www.marcusnyberg.com/2010/07/26/mrtg-and-cisco-problem-for-unrouted-vlans/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 10:55:56 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[mrtg]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=670</guid>
		<description><![CDATA[We had a problem with mrtg (version 2.14.5) and Cisco-routers (Cisco IOS Software, c7600s72033). The problem was that cfgmaker did not find the 64-bit traffic counters for &#8221;unrouted vlan&#8217;s&#8221;, instead it used the 32-bit counter. When the utilization of such a port reached above 100 Mbit the counter &#8221;rolled over&#8221; to zero and the graph [...]]]></description>
			<content:encoded><![CDATA[<p>We had a problem with mrtg (version 2.14.5) and Cisco-routers (Cisco IOS Software, c7600s72033). The problem was that cfgmaker did not find the 64-bit traffic counters for &#8221;unrouted vlan&#8217;s&#8221;, instead it used the 32-bit counter. When the utilization of such a port reached above 100 Mbit the counter &#8221;rolled over&#8221; to zero and the graph looked like it was cut.</p>
<p>If you need to <strong>troubleshoot cfgmaker</strong> you should use snmpwalk to manually look at the counters from the device that you are monitoring. By doing so you can watch the traffic-numbers from the source. These are some of the ones that cfgmaker uses.</p>
<p><strong>Get basic system information</strong><br />
snmpwalk -c community -v 2c  ip-address system</p>
<p><strong>Listing 32-bit traffic counters</strong><br />
snmpwalk -c community -v 2c ip-address ifinOctets</p>
<p><strong>Listing 64-bit traffic counters</strong><br />
snmpwalk -c community -v 2c ip-adress ifHCInOctets</p>
<p><strong>Check the interfaces speed</strong><br />
snmpwalk -c community -v 2c ip-adress ifSpeed<br />
snmpwalk -c community -v 2c ip-adress ifHighSpeed</p>
<p><strong>Check status of the interfaces</strong><br />
snmpwalk -c community -v 2c ip-adress ifOperStatus<br />
snmpwalk -c community -v 2c ip-adress ifAdminStatus</p>
<p><strong>List everything about the interfaces</strong><br />
snmpwalk -c community -v 2c ip-adress if</p>
<p>When I tested my router I could clearly see that it had 64-bit counters. However, cfgmaker couldn&#8217;t find them. Why?</p>
<p>IF-MIB::ifHCInOctets.1 = Counter64: 0<br />
IF-MIB::ifHCInOctets.11 = Counter64: 1436496000<br />
IF-MIB::ifHCInOctets.21 = Counter64: 1657770660<br />
IF-MIB::ifHCInOctets.31 = Counter64: 8220<br />
IF-MIB::ifHCInOctets.41 = Counter64: 219538030</p>
<p>There is a <a href="http://oss.oetiker.ch/mrtg-trac/ticket/33">bug</a> that is responsible for this behavior. Maybe the bug belongs to Cisco because they mark these interfaces as having zero speed. Very strange! </p>
<p>The workaround is (as stated in the bug report) to modify row 907 in cfgmaker to:<br />
if((!defined $speed) or $counter eq &#8221;&#8221; or $counter !~ /\d/ or $SNMP_Session::errmsg or $Net_SNMP_util::ErrorMessage?){</p>
<p>If you want to <strong>debug cfgmaker</strong> change to the rows below in the beginning of the cfgmaker program-file:</p>
<p>@main::DEBUG=qw(base snpo coca);<br />
#@main::DEBUG=qw();</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/07/26/mrtg-and-cisco-problem-for-unrouted-vlans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do something every X iteration in a bash loop</title>
		<link>http://www.marcusnyberg.com/2010/07/23/do-something-every-x-iteration-in-a-bash-loop/</link>
		<comments>http://www.marcusnyberg.com/2010/07/23/do-something-every-x-iteration-in-a-bash-loop/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 08:30:42 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=663</guid>
		<description><![CDATA[If you have a bash loop and want to &#8221;do something&#8221; at every X iteration you are in trouble because bash isn&#8217;t that good with numbers. Anyway, today I created this small example that you can use. In my case I needed to read a pretty large txt-file and create a simple html output table [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a bash loop and want to &#8221;do something&#8221; at every X iteration you are in trouble because bash isn&#8217;t that good with numbers. Anyway, today I created this small example that you can use. In my case I needed to read a pretty large txt-file and create a simple html output table of the rows. The problem was to insert TR-tags between the TD-tags like below:</p>
<p>td row 1<br />
td row 2<br />
td row 3<br />
tr<br />
td row 4<br />
td row 5<br />
td row 6<br />
tr</p>
<p>My solution solved the problem!  It is pretty helpful that we have the modulo (%) operator in bash.</p>
<pre name="code" class="xml">
#!/bin/bash

# Change this to how many rows row you want to skip before doing something
doevery=3

for (( c=1; c<=100; c++ ))
do
	remainder=`expr $c % $doevery`
	echo "Remainder: $remainder"

	if [ $remainder = "0" ];	then
		echo "Every $doevery iteration"
		# Do something
	fi

done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/07/23/do-something-every-x-iteration-in-a-bash-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mina försök att använda HTPC&#8217;n som trådlös router i Windows 7</title>
		<link>http://www.marcusnyberg.com/2010/07/16/mina-forsok-att-anvanda-htpcn-som-tradlos-router-i-windows-7/</link>
		<comments>http://www.marcusnyberg.com/2010/07/16/mina-forsok-att-anvanda-htpcn-som-tradlos-router-i-windows-7/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 09:44:09 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=657</guid>
		<description><![CDATA[Jag har under sommaren laborerat med min HTPC så att den ska kunna dela ut mobilt bredband i sommarstugan med Windows 7 utan att behöva koppla in någon router. Man kan ju förvandla sin Windows 7 dator till att fungera som en trådlös router genom att använda ConnectifyMe, Virtual Router eller att använda sig av [...]]]></description>
			<content:encoded><![CDATA[<p>Jag har under sommaren laborerat med min <a href="http://www.marcusnyberg.com/2010/06/20/min-htpc-nas-och-nedladdningsmaskin/">HTPC</a> så att den ska kunna dela ut mobilt bredband i sommarstugan med Windows 7 utan att behöva koppla in någon router. Man kan ju förvandla sin Windows 7 dator till att fungera som en trådlös router genom att använda <a href="http://www.connectify.me/">ConnectifyMe</a>, <a href="http://virtualrouter.codeplex.com/">Virtual Router</a> eller att använda sig av <a href="http://www.neowin.net/news/main/09/11/16/windows-7-as-a-wifi-hotspot">kommandoraden</a>.</p>
<p>Jag har nu efter 1 månads testning gett upp försöket efter att ha testat alla dessa lösningar. Det som jag fick att fungera bäst var kommandorads-versionen men även den fungerade dåligt i längden. Det första jag märkte var att det sög rätt mycket kräm ur HTPC&#8217;n som skulle fungera som WIFI-hotspot (även om inga klienter var inkopplade). Det andra var att internet-uppkopplingen till de trådlösa klienterna försvann med jämna mellanrum. Jag testade med två olika 3G-modem i HTPC&#8217;n och uppkopplingen dog ändå. Vet inte vad det berodde på och orkar inte undersöka det mer, men antagligen är det något internt i Windows som spökar. Det lustiga var att uppkopplingen i vissa fall fungerade i själva HTPC&#8217;n men inte i trådlösa nätet. Det tredje &#8221;dåliga&#8221; var att man inte har sån stor koll på vad som händer i nätet och man har inga möjligheter att ställa in de parametrar som vanligtvis finns i en router. Och till sist så tyckte jag att throughput&#8217;en (hastigheten) på trådlösa nätet försämrades drastiskt.</p>
<p>Nu har jag alltså gett upp och delar ut mobilt bredband trådlöst med en vanlig hårdvaru-router inkopplad till HTPC&#8217;n istället. Hur man gör detta kan man läsa <a href="http://www.windowsreference.com/windows-vista/step-by-step-internet-connection-sharing-ics-setup-in-vista/">här</a>. Detta fungerar nu mycket bättre. Om M$ hade lagt lite mer tanke bakom den här funktionaliteten så hade det varit en riktig &#8221;killer-feature&#8221;, men nu känns det lite väl omoget.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/07/16/mina-forsok-att-anvanda-htpcn-som-tradlos-router-i-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My list of useful firefox plugins</title>
		<link>http://www.marcusnyberg.com/2010/07/14/my-list-of-firefox-plugins/</link>
		<comments>http://www.marcusnyberg.com/2010/07/14/my-list-of-firefox-plugins/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 07:37:26 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=654</guid>
		<description><![CDATA[As a web-developer your most valuable tool is Firefox. Here is a list of the plugins I couldn&#8217;t live without: Firebug &#8211; Web developer tool IE Tab 2 &#8211; For browsing crappy webpages (and Logica internal web) Xmarks BYOS edition &#8211; Syncing bookmarks between computers using my own server Svensk ordlista &#8211; Swedish spelling dictionary [...]]]></description>
			<content:encoded><![CDATA[<p>As a web-developer your most valuable tool is <a href="http://www.firefox.com">Firefox</a>. Here is a list of the plugins I couldn&#8217;t live without:</p>
<p><a href="http://getfirebug.com/">Firebug</a> &#8211; Web developer tool<br />
<a href="https://addons.mozilla.org/sv-SE/firefox/addon/92382/">IE Tab 2</a> &#8211; For browsing crappy webpages (and Logica internal web)<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/13255/">Xmarks BYOS edition</a> &#8211; Syncing bookmarks between computers using my own server<br />
<a href="https://addons.mozilla.org/sv-SE/firefox/addon/3064/">Svensk ordlista</a> &#8211; Swedish spelling dictionary<br />
<a href="https://addons.mozilla.org/sv-SE/firefox/addon/5369/">YSlow</a> &#8211; Firebug web performance tool<br />
<a href="https://addons.mozilla.org/sv-SE/firefox/addon/636/">PDF Download</a> &#8211; Regain control of pdf files opening in your browser window<br />
<a href="https://addons.mozilla.org/sv-SE/firefox/addon/26/">Download statusbar</a> &#8211; Manage downloads from the statusbar<br />
<a href="https://addons.mozilla.org/sv-SE/firefox/addon/2464/">Foxyproxy standard</a> &#8211; Good tool when working at different companies with different proxies</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/07/14/my-list-of-firefox-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rengöra förgasare med ultraljudstvätt</title>
		<link>http://www.marcusnyberg.com/2010/07/12/rengora-forgasare-med-ultraljudstvatt/</link>
		<comments>http://www.marcusnyberg.com/2010/07/12/rengora-forgasare-med-ultraljudstvatt/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 20:40:54 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Allmänt]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=640</guid>
		<description><![CDATA[Nu är det båtsäsong och självklart ska båtmotorn jävlas. Motorn är en Yamaha 20-hästars utombordare från 80-talet. Den har aldrig gått riktigt bra varken för oss eller den tidigare ägare. Motorn har tidigare gått någorlunda bra men till denna säsong så totalvägrar den. Vad gör man? Efter att ha testat &#8221;allt&#8221; så kom jag till [...]]]></description>
			<content:encoded><![CDATA[<p>Nu är det båtsäsong och självklart ska båtmotorn jävlas. Motorn är en Yamaha 20-hästars utombordare från 80-talet. Den har aldrig gått riktigt bra varken för oss eller den tidigare ägare. Motorn har tidigare gått någorlunda bra men till denna säsong så totalvägrar den. Vad gör man? Efter att ha testat &#8221;allt&#8221; så kom jag till slut på lösningen&#8230;</p>
<p><strong>Symptom</strong><br />
Motorn går bra på tomgång men så fort man gasar så går den bra i en sekund och sedan dör den. Om man manuellt ändrar tomgången kontinuerligt medan man kör så går det att komma upp i planing. Justering av luft/bränsle-skruven ger ingen skillnad överhuvudtaget i &#8221;gången&#8221;. </p>
<p><strong>Lösning</strong><br />
Efter att ha öppnat förgasaren så såg jag att det såg väldigt skitigt ut trots att jag försökte mig på en rengöring senast ifjol. Jag kom då på att jag kunde rengöra den med ultraljudstvätten som jag köpte för att rengöra flipperspelsdelar. Denna köpte jag ifjol på Kjell&#038;Co, artnr 40490.</p>

<a href='http://www.marcusnyberg.com/2010/07/12/rengora-forgasare-med-ultraljudstvatt/attachment/01/' title='01'><img width="150" height="150" src="http://www.marcusnyberg.com/wp-content/uploads/2010/07/01-150x150.jpg" class="attachment-thumbnail" alt="01" title="01" /></a>
<a href='http://www.marcusnyberg.com/2010/07/12/rengora-forgasare-med-ultraljudstvatt/attachment/02/' title='02'><img width="150" height="150" src="http://www.marcusnyberg.com/wp-content/uploads/2010/07/02-150x150.jpg" class="attachment-thumbnail" alt="02" title="02" /></a>
<a href='http://www.marcusnyberg.com/2010/07/12/rengora-forgasare-med-ultraljudstvatt/attachment/03/' title='03'><img width="150" height="150" src="http://www.marcusnyberg.com/wp-content/uploads/2010/07/03-150x150.jpg" class="attachment-thumbnail" alt="03" title="03" /></a>
<a href='http://www.marcusnyberg.com/2010/07/12/rengora-forgasare-med-ultraljudstvatt/attachment/04/' title='04'><img width="150" height="150" src="http://www.marcusnyberg.com/wp-content/uploads/2010/07/04-150x150.jpg" class="attachment-thumbnail" alt="04" title="04" /></a>
<a href='http://www.marcusnyberg.com/2010/07/12/rengora-forgasare-med-ultraljudstvatt/attachment/05/' title='05'><img width="150" height="150" src="http://www.marcusnyberg.com/wp-content/uploads/2010/07/05-150x150.jpg" class="attachment-thumbnail" alt="05" title="05" /></a>

<p>Förgasaren är lite större än min ultraljudstvätt så jag fick köra förgasaren i omgångar. I vattenbadet så hade jag varmt vatten och vanligt diskmedel. Efter att ha plockat isär förgasaren och sedan kört den i tvätten i några minuter så tog jag ut den och såg att den verkligen hade blivit totalren, som ny! Jag blir lika förvånad över vilket bra resultat jag får av denna maskin varje gång jag använder den.</p>
<p>Efter att ha satt tillbaka förgasaren på motorn och ställt in luft/bränsle blandningen så gjorde jag en provkörning tills havs. Det visade sig att motorn nu gick helt perfekt. Bättre än den någonsin gått tidigare. Så att rengöra förgasare med ultraljudstvätt är något som jag verkligen rekommendera. Det tar bara några minuter och du slipper hålla på med olika vätskor och blåsa rent och jävlas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/07/12/rengora-forgasare-med-ultraljudstvatt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Windows 7 experiences and setup</title>
		<link>http://www.marcusnyberg.com/2010/07/12/my-windows-7-experiences-and-setup/</link>
		<comments>http://www.marcusnyberg.com/2010/07/12/my-windows-7-experiences-and-setup/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 19:52:22 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=339</guid>
		<description><![CDATA[One year has passed since my first tryout of Windows 7. The transition from Windows XP was easy and I won&#8217;t go back. Well thats not entirely correct, because my arcade machine (coming up blogpost) run a very fast and good version of XP called Tiny XP. I have had the same &#8221;install&#8221; the entire [...]]]></description>
			<content:encoded><![CDATA[<p>One year has passed since my first tryout of Windows 7. The transition from Windows XP was easy and I won&#8217;t go back. Well thats not entirely correct, because my arcade machine (coming up blogpost) run a very fast and good version of XP called Tiny XP.</p>
<p>I have had the same &#8221;install&#8221; the entire year and tried a lot of things with it. The usual problem with having the same install too long has now began to show itself. More problem than I can handle! The only solution is as usual to reinstall everything. This time I am going with a dual-boot setup with Win7 and Ubuntu.</p>
<p>The most annoying thing with &#8221;Windows 7&#8243; has so far been the new &#8221;Windows explorer&#8221; (explorer.exe) which I think is bloated. There is no way that I can be productive as earlier with that crap. And I can&#8217;t even make it work in &#8221;classical mode&#8221;. I have stopped using it! The most perfect file browser in my mind is the classical windows explorer which Microsoft stopped using with Windows XP. I have tried a lot of file browsers and <a href="http://www.zabkat.com/">xplorer²</a> is a good replacement. That program is actually the first program I install on a new computer.</p>
<p><strong>Some of my setup tweaks</strong></p>
<p>Lets share some of the tweaks I use to make my Win7 feel good. It is also good for me to have a checklist when I install Win7 the next time.</p>
<p>1) Live Messenger</p>
<p><a href="http://www.mydigitallife.info/2009/01/15/workaround-to-hide-and-minimize-windows-live-messenger-iconbutton-to-notification-area-system-tray-in-windows-7/">Minimize Windows Live Messenger to systray</a></p>
<p><a href="http://apatch.org/">Make Live Messenger cleaner by patching it</a></p>
<p>2) Taskbar and systray</p>
<p><a href="http://www.sevenforums.com/tutorials/888-quick-launch-enable-disable.html">Bring back good old &#8221;Quick launch&#8221;</a></p>
<p>Unpin all programs from taskbar</p>
<p>Taskbar properties: Check &#8221;Use small icons&#8221; and &#8221;combine when taskbar is full&#8221;</p>
<p>3) Personalize</p>
<p>In the beginning I switched of all aero stuff and used &#8221;Windows Classic&#8221; theme. But by now I am actually used to all fancy aero stuff and it doesn&#8217;t feel that my machines performance is that much affected by this.</p>
<p>4) Services and startup</p>
<p>I try to <a href="http://www.askvg.com/windows-7-services-that-can-be-safely-set-to-manual/">disable as many services that is possible</a> or set them to start manual. Services eat memory and CPU-time.</p>
<p>I continually check msconfig.exe (or registry) to sanitize startup programs. More startup-programs makes your computer boot slower.</p>
<p>5) Programs</p>
<p>I try to keep my program list clean. If I do not use a program I remove it. You never know what services and resources a program uses.</p>
<p>If I want to check stuff out I do that in a virtual machine instead of my &#8221;production machine&#8221;. It is very handy to have some lab virtual machines if you are a software developer.</p>
<p>6) Useful free programs</p>
<p><a href="http://imageresizer.codeplex.com/">Image Resizer Powertoy Clone for Windows</a><br />
<a href="http://www.zabkat.com/">xplorer²</a> (file manager)<br />
<a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">Putty</a> (ssh)<br />
<a href="http://winscp.net/">WinSCP</a> (moving files)<br />
<a href="http://cdburnerxp.se/">CDBurnerXP</a><br />
<a href="http://www.free-codecs.com/download/k_lite_codec_pack.htm">K-lite codec pack</a> (media playing)<br />
<a href="http://www.avast.com/">Avast antivirus</a><br />
<a href="http://filezilla-project.org/">Filezilla</a> (ftp)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/07/12/my-windows-7-experiences-and-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Felaktigt certifikat för mail på yahoo.se vid pop/smtp hämtning</title>
		<link>http://www.marcusnyberg.com/2010/07/02/felaktigt-certifikat-for-mail-pa-yahoo-se-vid-popsmtp-hamtning/</link>
		<comments>http://www.marcusnyberg.com/2010/07/02/felaktigt-certifikat-for-mail-pa-yahoo-se-vid-popsmtp-hamtning/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 18:36:08 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Allmänt]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=607</guid>
		<description><![CDATA[Om du har ett mailkonto på username@yahoo.se och vill kolla din mail med pop/stmp så kan du stöta på problem. Jag har den senaste timmen försökt felsöka varför mailklienten &#8221;Windows Live Mail&#8221; spottar ut sig ett felmeddelande om att certifikatet är felaktigt. I bilden nedan så ser du felmeddelandet man får då man synkroniserar mailen [...]]]></description>
			<content:encoded><![CDATA[<p>Om du har ett mailkonto på username@yahoo.se och vill kolla din mail med pop/stmp så kan du stöta på problem. Jag har den senaste timmen försökt felsöka varför mailklienten &#8221;Windows Live Mail&#8221; spottar ut sig ett felmeddelande om att certifikatet är felaktigt. I bilden nedan så ser du felmeddelandet man får då man synkroniserar mailen (windows 7 x86). Felet beror på att servernamnet som man angett inte stämmer överens med det servernamn som finns i SSL-certifikatet på mailservern.</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2010/07/mail-yahoo-se-error.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2010/07/mail-yahoo-se-error.jpg" alt="" title="mail-yahoo-se-error" width="321" height="220" class="alignnone size-full wp-image-609" /></a></p>
<p>På <a href="http://help.yahoo.com/l/se/yahoo/mail/classic/mailplus/pop/pop-14.html">Yahoo help</a> så kan man läsa att man ska använda pop.mail.yahoo.se samt smtp.mail.yahoo.se. Dessa är däremot bara redirects till engelska mailservrar. </p>
<pre name="code" class="xml">
C:\Users\Övriga>ping pop.mail.yahoo.se

Pinging pop1.mail.vip.ukl.yahoo.com [217.146.176.233] with 32 bytes of data:
Reply from 217.146.176.233: bytes=32 time=199ms TTL=52
Reply from 217.146.176.233: bytes=32 time=230ms TTL=52
Reply from 217.146.176.233: bytes=32 time=230ms TTL=52
Reply from 217.146.176.233: bytes=32 time=130ms TTL=52

Ping statistics for 217.146.176.233:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 130ms, Maximum = 230ms, Average = 197ms

C:\Users\Övriga>ping smtp.mail.yahoo.se

Pinging smtp2.mail.vip.ukl.yahoo.com [77.238.184.81] with 32 bytes of data:
Reply from 77.238.184.81: bytes=32 time=166ms TTL=52
Reply from 77.238.184.81: bytes=32 time=180ms TTL=52
Reply from 77.238.184.81: bytes=32 time=202ms TTL=52

Ping statistics for 77.238.184.81:
    Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 166ms, Maximum = 202ms, Average = 182ms
</pre>
<p>Om man <a href="https://pop1.mail.vip.ukl.yahoo.com:995/">kollar certifikatet</a> för dessa servrar så ser det ut enligt följande:</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2010/07/certficate-mail-yahoo.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2010/07/certficate-mail-yahoo.jpg" alt="" title="certficate-mail-yahoo" width="409" height="511" class="alignnone size-full wp-image-613" /></a></p>
<p>Certifikatet är alltså utfärdat till pop.mail.yahoo.co.uk medans vi använder pop.mail.yahoo.se och då blir det mismatch mellan dessa. Det är alltså de engelska servernamnen som svenska @yahoo.se kunder ska använda för att slippa få felmeddelande angående certifikat. Efter att jag bytt mailservrar till dessa så har det fungerat felfritt. I övrigt så är det samma inställningar med ssl etc. som anges på yahoos hemsida.</p>
<p><strong>Pop och stmp servrar för svenska @yahoo.se mailkunder</strong><br />
Pop: pop.mail.yahoo.co.uk<br />
Smtp: pop.mail.yahoo.co.uk</p>
<p>Hoppas att detta hjälper fler med samma problem och att yahoo.se uppdaterar sina hjälpsidor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/07/02/felaktigt-certifikat-for-mail-pa-yahoo-se-vid-popsmtp-hamtning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to monitor hard drive temperature with MRTG and FreeBSD</title>
		<link>http://www.marcusnyberg.com/2010/07/02/how-to-monitor-hard-drive-temperature-with-mrtg-and-freebsd/</link>
		<comments>http://www.marcusnyberg.com/2010/07/02/how-to-monitor-hard-drive-temperature-with-mrtg-and-freebsd/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 08:44:07 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[mrtg]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=595</guid>
		<description><![CDATA[I really love to monitor my servers, so why shouldn&#8217;t I also monitor the temperatures of my hard drives? In my mind a cooler hard drive lives longer than a hot one. However, the google paper on failure trends of hard drives says that the hard drive temperatures doesn&#8217;t have an impact on a hard [...]]]></description>
			<content:encoded><![CDATA[<p>I really love to monitor my servers, so why shouldn&#8217;t I also monitor the temperatures of my hard drives? In my mind a cooler hard drive lives longer than a hot one. However, the <a href="http://labs.google.com/papers/disk_failures.pdf">google paper on failure trends of hard drives</a> says that the hard drive temperatures doesn&#8217;t have an impact on a hard drives life length. But I want things to run cool in my server so here is how I monitor the hard drives with <a href="http://oss.oetiker.ch/mrtg/">mrtg</a> and FreeBSD.</p>
<p>To be able to get the hard drives temperatures we have to install <a href="http://sourceforge.net/apps/trac/smartmontools/wiki">SmartMonTools</a>. </p>
<blockquote><p>The smartmontools package contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (SMART) built into most modern ATA and SCSI harddisks. In many cases, these utilities will provide advanced warning of disk degradation and failure. </p></blockquote>
<p><strong>Install SmartMonTools</strong><br />
# cd /usr/ports/sysutils/smartmontools<br />
# make install clean </p>
<p><strong>Check the temperature of the drives that you want to monitor</strong><br />
# smartctl -a /dev/ad4 | grep Temperature_Celsius<br />
194 Temperature_Celsius     0&#215;0022   113   103   000    Old_age   Always       &#8211;       34<br />
# smartctl -a /dev/ad6 | grep Temperature_Celsius<br />
194 Temperature_Celsius     0&#215;0022   148   091   000    Old_age   Always       &#8211;       30</p>
<p>Create a script called <strong>disktemp.sh</strong> that outputs the temperatures in a Mrtg friendly way.</p>
<pre name="code" class="xml">
#!/bin/sh
/usr/local/sbin/smartctl -a /dev/ad6 | grep Temperature | awk '{print $10}' | tail -n 1
/usr/local/sbin/smartctl -a /dev/ad4 | grep Temperature | awk '{print $10}' | tail -n 1
echo "A long time"
echo ""
</pre>
<p>Then create a mrtg cfg file called <strong>disktemp.cfg</strong>:</p>
<pre name="code" class="xml">
### Global Config Options
WorkDir: /home/www/mrtg
Options[_]: growright, bits
EnableIPv6: no
Language: swedish

# Sysload
Target[disktemp]: `/usr/local/etc/mrtg/disktemp.sh`
MaxBytes[disktemp]: 100
Options[disktemp]: integer,gauge,nopercent
YLegend[disktemp]: Temp (C)
ShortLegend[disktemp]: (C)
Legend1[disktemp]: /dev/ad4
Legend2[disktemp]: /dev/ad6
LegendI[disktemp]: /dev/ad4
LegendO[disktemp]: /dev/ad6
Title[disktemp]: Hard drive Temperature
PageTop[disktemp]: <H1>Hard drive temperature</H1>
</pre>
<p><strong>Run mrtg (a couple of times)</strong><br />
/usr/local/bin/mrtg /usr/local/etc/mrtg/disktemp.cfg</p>
<p>Check If everything seems to be working. If OK then add this to crontab&#8230;</p>
<p>The result should be looking like this (in your language):<br />
<a href="http://www.marcusnyberg.com/wp-content/uploads/2010/07/harddrive-temperature-mrtg.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2010/07/harddrive-temperature-mrtg.jpg" alt="" title="harddrive-temperature-mrtg" width="100%" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/07/02/how-to-monitor-hard-drive-temperature-with-mrtg-and-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios plugin for checking ping in bash</title>
		<link>http://www.marcusnyberg.com/2010/06/24/nagios-plugin-for-checking-ping-in-bash/</link>
		<comments>http://www.marcusnyberg.com/2010/06/24/nagios-plugin-for-checking-ping-in-bash/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 08:16:19 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=589</guid>
		<description><![CDATA[Everyone that uses Nagios knows about the basic check_ping plugin. However, today I needed a light version in bash with the same functionality that its easy to modify&#8230; The result is seen below. My Nagios ping-plugin checks the rtt avg time against the treshold values for critical and warning. I never bothered to check for [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone that uses <a href="http://www.nagios.org/">Nagios</a> knows about the basic <strong>check_ping</strong> plugin. However, today I needed a light version in bash with the same functionality that its easy to modify&#8230;</p>
<p>The result is seen below. My Nagios ping-plugin checks the rtt avg time against the treshold values for critical and warning. I never bothered to check for packet losses because that wasn&#8217;t the purpose for this script. It only checks ping avg time but could easily be customized to check other things as well.</p>
<p><strong>nagios-check-ping.sh</strong></p>
<pre name="code" class="xml">
#!/bin/bash

# This script pings a host and compares critical and warning tresholds against avg rtt (ms)
# Syntax: nagios-check-ping.sh HOST CRITICAL WARNING
# Example: nagios-check-ping.sh www.sunet.se 10 20

if [ ! -n "$1" ]
then
	echo "UNKNOWN: Missing argument HOSTNAME..."
	exit 3
fi   

if [ ! -n "$2" ]
then
	echo "UNKNOWN: Missing argument WARNING..."
	exit 3
fi   

if [ ! -n "$3" ]
then
	echo "UNKNOWN: Missing argument CRITICAL..."
	exit 3
fi   

AVG=`ping -n -c 5 $1 | awk -F/ '/^rtt/ { print $5 }' | awk -F '.' '{ print $1; }'`

if [ ! -n "$AVG" ]
then
	echo "CRITICAL: Error pinging"
	exit 2
elif [ $AVG -le "$2" ]
then
	SC="OK"
	EX=0
elif [ $AVG -le "$3" ]
then
	SC="WARNING"
	EX=1
else
	SC="CRITICAL"
	EX=2
fi

echo "$SC: Average response time is $AVG ms"
exit $EX
</pre>
<p><strong>Run it like this:</strong><br />
> nagios-check-ping.sh www.sunet.se 10 20</p>
<p><strong>Example output:</strong><br />
WARNING Average response time is 20 ms</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/06/24/nagios-plugin-for-checking-ping-in-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to monitor cpu temperature with MRTG on FreeBSD</title>
		<link>http://www.marcusnyberg.com/2010/06/23/how-to-monitor-cpu-temperature-with-mrtg-on-freebsd/</link>
		<comments>http://www.marcusnyberg.com/2010/06/23/how-to-monitor-cpu-temperature-with-mrtg-on-freebsd/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 11:12:49 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[mrtg]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=573</guid>
		<description><![CDATA[Have you ever wanted to monitor the cpu temperature on your server with MRTG and FreeBSD? Of course you wanted that if you have a server running in a closet or some other special place. By following my steps you can have a nice graph like below. It is really relaxing to have all vital [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to monitor the cpu temperature on your server with <a href="http://oss.oetiker.ch/mrtg/">MRTG</a> and FreeBSD? Of course you wanted that if you have a server running in a closet or some other special place. By following my steps you can have a nice graph like below. It is really relaxing to have all vital stats from your server available online.</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2010/06/cputemp-day-mrtg.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2010/06/cputemp-day-mrtg.jpg" alt="" title="cputemp-day-mrtg" width="100%" class="alignnone size-full wp-image-578" /></a></p>
<p>This small tutorial works if you have the same processor as I have (Athlon 64). The only thing besides MRTG that you need is the <a href="http://www.freshports.org/sysutils/k8temp/">k8temp</a> program which is described as &#8221;k8temp is a utility to read the  temperature sensors provided by AMD K8 and K10 processors, including most Athlon 64&#8242;s and Opterons.&#8221; If you don&#8217;t have a Athlon 64 cpu there are other programs that should be ok to get the temperature as well.</p>
<p>You should have <a href="http://kerneltrap.org/node/3276">MRTG installed</a> and be somewhat familiar the concept to get this working&#8230;</p>
<p><strong>Check your cpu (if you dont have a clue)</strong><br />
> dmesg | grep Processor<br />
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ (2599.72-MHz K8-class CPU)</p>
<p><strong>Install k8temp</strong><br />
> cd /usr/ports/sysutils/k8temp/<br />
> make install clean</p>
<p>Then setup mrtg to use k8temp. This is my mrtg-config file: cputemp.cfg</p>
<pre name="code" class="xml">
### Global Config Options
WorkDir: /home/www/mrtg
Options[_]: growright, bits
EnableIPv6: no
Language: swedish

# Sysload
Target[cputemp]: `/usr/local/etc/mrtg/cputemp.sh`
MaxBytes[cputemp]: 100
Options[cputemp]: integer,gauge,nopercent
YLegend[cputemp]: Temp (C)
ShortLegend[cputemp]: (C)
Legend1[cputemp]: CPU 0:1
Legend2[cputemp]: CPU 0:2
LegendI[cputemp]: CPU 0:1
LegendO[cputemp]: CPU 0:2
Title[cputemp]: CPU Temperature
PageTop[cputemp]: <H1>CPU temperature</H1>
</pre>
<p>By running the &#8221;k8temp&#8221; program you get a list of available sensors. Find the temperatures that you are interested in and edit the script below. This is the script &#8221;cputemp.sh&#8221; that the mrtg-config-file uses to get the cpu-temperature:</p>
<pre name="code" class="xml">
#!/bin/sh
/usr/local/sbin/k8temp -n 0:0:1
/usr/local/sbin/k8temp -n 0:1:1
echo ""
echo ""
</pre>
<p><strong>Run mrtg (a couple of times)</strong><br />
/usr/local/bin/mrtg /usr/local/etc/mrtg/cputemp.cfg</p>
<p>Check If everything seems to be working. If OK then add this to crontab&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2010/06/23/how-to-monitor-cpu-temperature-with-mrtg-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
