<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkEDQHY5fSp7ImA9WhRQFkU.&quot;"><id>tag:blogger.com,1999:blog-8098276</id><updated>2011-12-12T20:04:31.825+11:00</updated><category term="gnuplot" /><category term="cisco vpn" /><category term="NTFS" /><category term="mediawiki" /><category term="Windows 2003" /><category term="support" /><category term="DNS" /><category term="watchguard muvpn" /><category term="rsync" /><category term="NTP" /><category term="inetd" /><category term="partimage" /><category term="bug" /><category term="perl" /><category term="snakeoil" /><category term="red hat" /><category term="64bit" /><category term="teamsite" /><category term="disk" /><category term="flock" /><category term="Windows" /><category term="brightness" /><category term="powerchute" /><category term="service" /><category term="misleading" /><category term="mplayer" /><category term="msmq" /><category term="HTTP" /><category term="gnome" /><category term="mouse" /><category term="yum" /><category term="excel" /><category term="spam" /><category term="foundry" /><category term="synctoy" /><category term="sun" /><category term="script" /><category term="debian" /><category term="video" /><category term=".net" /><category term="X-Forwarded-Host" /><category term="404" /><category term="port" /><category term="varnish" /><category term="kvm" /><category term="raid" /><category term="solaris" /><category term="crontab" /><category term="W32Time" /><category term="notebook" /><category term="rant" /><category term="hardware" /><category term="database" /><category term="linux" /><category term="apache" /><category term="recovery" /><category term="hack" /><category term="price" /><category term="init" /><category term="iis" /><category term="nut" /><category term="mysql" /><category term="java" /><category term="tshark" /><category term="robocopy" /><category term="vmware" /><category term="cpan" /><category term="rhn" /><category term="nagios" /><category term="ssh" /><category term="dvb" /><category term="403" /><category term="break" /><category term="mythtv" /><category term="serveriron" /><category term="mythtv mytharchive DVD" /><category term="xorg" /><category term="filesystem" /><category term="tcp_wrappers" /><category term="ups" /><category term="mongrel" /><category term="kernel" /><category term="power" /><category term="snmp" /><category term="CruiseControl" /><category term="asp.net" /><category term="vpn" /><category term="network" /><category term="ubuntu" /><category term="lcd" /><category term="apc" /><category term="netcat" /><title>Rants on technology</title><subtitle type="html">If I managed to help you please leave a comment; it gives me incentive to share some more.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://microrants.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>65</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/RantsOnTechnology" /><feedburner:info uri="rantsontechnology" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C04AQXg5eSp7ImA9Wx5TEk0.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-4130102707898382270</id><published>2010-07-27T09:20:00.005+10:00</published><updated>2010-07-27T13:39:00.621+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-27T13:39:00.621+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="kernel" /><category scheme="http://www.blogger.com/atom/ns#" term="varnish" /><title>Varnish and the Linux IO bottleneck</title><content type="html">&lt;div&gt;There are 2 main ways &lt;a href="http://varnish-cache.org/"&gt;Varnish&lt;/a&gt; caches your data:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;to memory (with the malloc storage config)&lt;/li&gt;
&lt;li&gt;to disk (with the file storage config)&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;As &lt;a href="http://kristian.blog.linpro.no/"&gt;Kristian&lt;/a&gt; explains in a &lt;a href="http://kristian.blog.linpro.no/2010/01/26/varnish-best-practices/"&gt;best practices post&lt;/a&gt;, you get better performance with #1 if your cache size fits in RAM.  With either method the most accessed objects end-up in RAM.  While the malloc method puts everything in RAM and the kernel swaps it out to disk, the file storage method puts everything in disk and the kernel caches it in memory.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;We have been using the file storage for a little more than 3 months on servers with 16GB of RAM and a file storage of 30GB.  Recently, because of an application configuration error, the size of the cache grew from its usual maximum of 6GB to 20GB+.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Since the system only has 16GB, the kernel now needs to choose which pages to keep in RAM.  When a dirty mmap'ed page needs to be released the kernel will write the changes to disk before doing so.  More than that, the linux kernel will proactively write dirty mmap'ed pages to disk.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;On a Varnish server with this setup or any other application that uses mmap() for large files, the situation translates to constant disk activity.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;At some point the varnish worker process will be blocked by a kernel IO call.  The Varnish manager process, with no way to tell what's happening to the child, believes it has stopped responding and kills it.  The log entries below are typical:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;00:30:10.395590 varnishd[22919]: Child (22920) not responding to ping, killing it.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;00:30:10.395622 varnishd[22919]: Child (22920) not responding to ping, killing it.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;00:30:10.417309 varnishd[22919]: Child (22920) died signal=3&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;At this point you lose your cached data and the system goes back to normal.  After some time, the size of the cache will grow to be larger than your server's RAM again, repeating the kill-restart cycle.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;You could choose to give the client more time to respond to the manager process' ping requests.  This is done by increasing the default value of cli_timeout from 10 seconds (e.g. varnish -p cli_timeout=20) but this is merely masking the issue.  The real issue is that the Linux kernel is busy writing dirty pages to disk.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;There are parameters you can use to control how much time the kernel spends writing dirty mmap pages to disk.  I have spent some time fine-tuning the parameters below with little results:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; /proc/sys/vm/dirty_writeback_centisecs &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; /proc/sys/vm/dirty_ratio&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; /proc/sys/vm/dirty_background_ratio&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;In RHEL 5.x kernels you can completely disable committing changes to mmap'ed files:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; echo 0 &amp;gt; /proc/sys/vm/flush_mmap_pages&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Short of reducing the file storage size to fit in RAM, this is the best solution I found so far.  Be aware that using this with the upcoming persistent storage in Varnish is a really bad idea as you risk serving corrupt and/or stale data.  This is only acceptable because the mmap'ed data, in this setup, is superfluous: varnish throws away the cache on restart and it can always fetch the object from the backend.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I have asked Red Hat if they plan to keep the flush_mmap_pages setting in RHEL 6 but haven't received a response yet. &amp;nbsp;They did, however, confirm that msync() calls are honoured and dirty pages being evicted from RAM are committed to disk.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-4130102707898382270?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zlnjm32Np6iYW2ZKyPSRIGwVm5c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zlnjm32Np6iYW2ZKyPSRIGwVm5c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zlnjm32Np6iYW2ZKyPSRIGwVm5c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zlnjm32Np6iYW2ZKyPSRIGwVm5c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/9BngrlCzTeI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/4130102707898382270/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=4130102707898382270" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/4130102707898382270?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/4130102707898382270?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/9BngrlCzTeI/varnish-and-linux-io-bottleneck.html" title="Varnish and the Linux IO bottleneck" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://microrants.blogspot.com/2010/07/varnish-and-linux-io-bottleneck.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08NQn4-fip7ImA9WxFRFUQ.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-3741244425994084566</id><published>2010-04-30T11:38:00.004+10:00</published><updated>2010-04-30T11:44:53.056+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-30T11:44:53.056+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="CruiseControl" /><category scheme="http://www.blogger.com/atom/ns#" term="HTTP" /><category scheme="http://www.blogger.com/atom/ns#" term="X-Forwarded-Host" /><title>CruiseControl, ProxyPass</title><content type="html">Dear blog, today I submitted &lt;a href="http://jira.public.thoughtworks.org/browse/CC-984"&gt;a patch for CruiseControl&lt;/a&gt;.  It feels great to give something back (even if it's half-baked).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I couldn't find a way to make CC give the correct URL to users when running in a configuration like below:&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;ProxyVia On&lt;br /&gt;ProxyPass / http://localhost:8080/&lt;br /&gt;ProxyPassReverse / http://localhost:8080/&lt;br /&gt;(...)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;CC would insist on building URLs using localhost:8080 even though the user can only access via http://your.host.com/.  With &lt;a href="http://jira.public.thoughtworks.org/browse/CC-984"&gt;the patch&lt;/a&gt; CruiseControl will use the X-Forwarded-Host HTTP header to build the correct address.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-3741244425994084566?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/C-LEHx0Xxfldb94tCltAjM-ilHo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C-LEHx0Xxfldb94tCltAjM-ilHo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/C-LEHx0Xxfldb94tCltAjM-ilHo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C-LEHx0Xxfldb94tCltAjM-ilHo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/mv5ll38f5UA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/3741244425994084566/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=3741244425994084566" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/3741244425994084566?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/3741244425994084566?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/mv5ll38f5UA/cruisecontrol-proxypass.html" title="CruiseControl, ProxyPass" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2010/04/cruisecontrol-proxypass.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AGQ3gzeSp7ImA9WxBQFk0.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-5028730061082874242</id><published>2010-01-16T09:52:00.007+11:00</published><updated>2010-01-16T11:28:42.681+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-16T11:28:42.681+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="disk" /><category scheme="http://www.blogger.com/atom/ns#" term="hardware" /><category scheme="http://www.blogger.com/atom/ns#" term="price" /><title>The fallacy of cheap disk space</title><content type="html">At work my concerns for application disk usage/waste are usually met with a scoff of "Why bother? Disk space is cheap!"&lt;br /&gt;&lt;br /&gt;This is a myth I intend to destroy in this post.  It is true that &lt;a href="http://www.alts.net/ns1625/winchest.html"&gt;disk space gets cheaper&lt;/a&gt; all the time but it is not cheap.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.mattscomputertrends.com/harddrives.html"&gt;&lt;img style="cursor: pointer; width: 400px; height: 165px;" src="http://4.bp.blogspot.com/_0gue5YpVahg/S1D0hNrVKLI/AAAAAAAAO_s/LA94KWmailE/s400/hard-disk_cost_improvement.gif" alt="" id="BLOGGER_PHOTO_ID_5427106402425710770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm not even going to step into the NAS/SAN area - this myth can be debunked looking at local storage alone.&lt;br /&gt;&lt;br /&gt;When people say disk space is cheap these days they are probably thinking of their videos, mp3 and pr0n collection at home; enterprise-grade disks are another story.  I chose the cheapest drives I could find to illustrate my point:&lt;br /&gt;&lt;br /&gt;Desktop: 1.5TB SATA 7.2krpm A$133 A$0.089/GB (&lt;a href="http://www.megaware.com.au/index.php?main_page=product_info&amp;amp;products_id=94929&amp;amp;zenid=c03bdeee8414c97d8b6474387d1d68da"&gt;WD15EADS&lt;/a&gt;)&lt;br /&gt;Enterprise: 300GB SCSI 15krpm A$489 A$1.630/GB (&lt;a href="http://www.penta.com.au/template.php?seqid=33759"&gt;SFU300G10K80P&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The comparison already looks grim for the myth: the cost of a data centre-worthy disk is more than 18 times that of a "disk space is cheap" drive.&lt;br /&gt;&lt;br /&gt;In the real world redundancy is required so, for your typical RAID1/10 scenario, the cost is 36 times more or A$3.26/GB.  You could get a better cost, A$2.45/GB, with a 3-disk RAID5 volume but the &lt;a href="http://www.google.com.au/search?q=disk+failure+while+recovering+raid5"&gt;recovery time for today's disks makes the alternative risky&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Then you need to backup your data.  Regardless of your backup frequency and retention period you will need to buy more tapes if you have more data. &lt;br /&gt;&lt;br /&gt;Assuming that 1 LTO drive is able to backup all your data in the alloted time frame, a minimal retention period and 3x &lt;a href="http://www.stonebridgecomputing.com.au/catalog/sony-lto2-200gb400gb-minimum-order-quantity-p-22702.html?osCsid=4169365928888064810267e17ea2a505"&gt;200GB LTO-2 tape&lt;/a&gt; (in use, on-site, off-site), you are looking at an additional A$0.57 per GB backed-up and a total cost of A$3.83/GB - MORE THAN 40 TIMES the cost of cheap disk space.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_0gue5YpVahg/S1D-XT4Xt9I/AAAAAAAAO_0/JQ2nuv9d1Js/s1600-h/backblaze-storage-pod-partially-assembled-.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 148px;" src="http://3.bp.blogspot.com/_0gue5YpVahg/S1D-XT4Xt9I/AAAAAAAAO_0/JQ2nuv9d1Js/s200/backblaze-storage-pod-partially-assembled-.jpg" alt="" id="BLOGGER_PHOTO_ID_5427117227408603090" border="0" /&gt;&lt;/a&gt;One could argue that this level of performance AND redundancy is not always needed - and one would be right.  For instance, if your application data is cacheable you can split the data in layers of increasing cost/performance with something like &lt;a href="http://blog.backblaze.com/2009/09/01/petabytes-on-a-budget-how-to-build-cheap-cloud-storage/"&gt;Blackblaze's solution&lt;/a&gt; at the back.&lt;br /&gt;&lt;br /&gt;Once  we're looking for cheaper storage the "disk space is cheap" advocates have already lost the argument.  In case we're dealing with the stubborn kind let's move from the capital to the operational expense of storage.&lt;br /&gt;&lt;br /&gt;The following statement is fairly obvious but probably needs to be reminded when storage cost is dismissed as irrelevant: disk space is an asset that depreciates at the purchase price, not market price.  Once you've bought 1TB of storage for $A3.26 per GB you're stuck with the entry until it's out of the books, no matter how much cheaper disks get in the future.&lt;br /&gt;&lt;br /&gt;Your backup opex also increases.  You area going to rotate and store more tapes.  You will need off-line storage and transportation for more tapes.  You get the picture.&lt;br /&gt;&lt;br /&gt;If your data is mirrored/replicated to other sites your network costs also increase.&lt;br /&gt;&lt;br /&gt;More: because every procedure takes more time your labour costs also go up.&lt;br /&gt;&lt;br /&gt;And more: enjoy while local storage meets your demand - the picture gets much uglier with external storage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-5028730061082874242?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YWuFIUiZGPUxgryj1L7KppZ1t8k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YWuFIUiZGPUxgryj1L7KppZ1t8k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YWuFIUiZGPUxgryj1L7KppZ1t8k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YWuFIUiZGPUxgryj1L7KppZ1t8k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/-q1qhJcrM1E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/5028730061082874242/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=5028730061082874242" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/5028730061082874242?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/5028730061082874242?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/-q1qhJcrM1E/fallacy-of-cheap-disk-space.html" title="The fallacy of cheap disk space" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_0gue5YpVahg/S1D0hNrVKLI/AAAAAAAAO_s/LA94KWmailE/s72-c/hard-disk_cost_improvement.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2010/01/fallacy-of-cheap-disk-space.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYMR3kyeyp7ImA9WxJbF04.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-7457407905718117127</id><published>2009-07-28T08:18:00.001+10:00</published><updated>2009-07-28T08:19:46.793+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-28T08:19:46.793+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rant" /><category scheme="http://www.blogger.com/atom/ns#" term="snakeoil" /><title>Sen. Conroy and his sinister Internet filter</title><content type="html">&lt;div&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" height="250" width="300"&gt;&lt;param name="movie" value="http://www.getup.org.au/flash/widget.swf"&gt;&lt;param name="quality" value="high"&gt;&lt;embed src="http://www.getup.org.au/flash/widget.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" height="250" width="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-7457407905718117127?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Es37prjsn306Gg2U8Aux6NuWiI0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Es37prjsn306Gg2U8Aux6NuWiI0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Es37prjsn306Gg2U8Aux6NuWiI0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Es37prjsn306Gg2U8Aux6NuWiI0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/HYAUqWz59bk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/7457407905718117127/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=7457407905718117127" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/7457407905718117127?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/7457407905718117127?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/HYAUqWz59bk/sen-conroy-and-his-sinister-internet.html" title="Sen. Conroy and his sinister Internet filter" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2009/07/sen-conroy-and-his-sinister-internet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUAQHw_eip7ImA9WxJWFks.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-7085189484431095604</id><published>2009-06-22T18:44:00.001+10:00</published><updated>2009-06-22T18:44:01.242+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-22T18:44:01.242+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="filesystem" /><category scheme="http://www.blogger.com/atom/ns#" term="apache" /><title>Disk IO spikes caused by mod_proxy.c in Apache 1.3</title><content type="html">We have been using &lt;a href="http://httpd.apache.org/docs/1.3/mod/mod_proxy.html"&gt;Apache 1.3 with mod_proxy&lt;/a&gt; as a reverse proxy for some of our applications.  The configuration is pretty simple:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;CacheRoot /var/adm/apache/cache&lt;br /&gt;CacheSize 4096000&lt;br /&gt;CacheGcInterval 4&lt;br /&gt;CacheMaxExpire 48&lt;br /&gt;CacheDefaultExpire 2&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;The above tells Apache to inspect the cache directory every 4 hours, keep up to 4GB worth of data, validate objects every 48 hours (no matter what the origin server set the expiry to) and expire them, by default, in 2 hours.&lt;br /&gt;&lt;br /&gt;The typical content of the cache directory for our sites is 4.5GB in about 180,000 directories and 310,000 files.&lt;br /&gt;&lt;br /&gt;Shortly after deploying this to production we started seeing the pattern below for the load on all web servers:&lt;br /&gt;&lt;pre&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_0gue5YpVahg/Sj8ccy0zh1I/AAAAAAAANtA/x4HYtGFWwmo/s1600-h/web-server_Load-day.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 161px;" src="http://4.bp.blogspot.com/_0gue5YpVahg/Sj8ccy0zh1I/AAAAAAAANtA/x4HYtGFWwmo/s400/web-server_Load-day.png" alt="" id="BLOGGER_PHOTO_ID_5350026163344607058" border="0" /&gt;&lt;/a&gt;&lt;/pre&gt;Because this was happening in regular intervals it was easy to inspect one of the servers during the load spike.  The sar data had already told us the load was caused by disk IO:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$sar -b&lt;br /&gt;(...)&lt;br /&gt;                tps      rtps      wtps   bread/s   bwrtn/s&lt;br /&gt;11:30:01 AM     94.53      1.89     92.63     27.68   1275.66&lt;br /&gt;11:40:01 AM   1289.34     57.63   1231.71    555.35  20566.36&lt;br /&gt;11:50:01 AM     79.16      1.23     77.93     21.88   1084.00&lt;br /&gt;12:00:02 PM     94.21      1.77     92.44     39.52   1274.74&lt;br /&gt;12:10:01 PM     84.18      1.64     82.54     35.54   1116.60&lt;br /&gt;12:20:01 PM    117.43      2.62    114.81     44.68   1550.87&lt;br /&gt;12:30:01 PM    150.65      3.30    147.35     82.21   1986.41&lt;br /&gt;12:40:01 PM   1228.90      1.53   1227.37     33.04  20592.15&lt;br /&gt;12:50:01 PM     70.46      2.65     67.80    100.57    917.25&lt;br /&gt;&lt;/pre&gt;When the load spiked I checked which processes were high on "wa" (waiting for IO) time and listed their open files with lsof.&lt;br /&gt;&lt;br /&gt;Sure enough I could see httpd processes with changing files open in &lt;span style="font-style: italic;"&gt;/var/adm/apache/cache&lt;/span&gt;.  This is expected since the cache garbage collector needs to inspect cached objects and decide what to delete in order to stay under the &lt;span style="font-style: italic;"&gt;CacheSize&lt;/span&gt; limit.&lt;br /&gt;&lt;br /&gt;What surprised me is how amazingly expensive this operation is on ext3 filesystems.&lt;br /&gt;&lt;br /&gt;To alleviate the problem I have changed some of the filesystem parameters.  In /etc/fstab I told the OS to not update access times on files and directories under /var:&lt;br /&gt;&lt;pre&gt;/dev/VolGroup00/LogVol04    /var   ext3    defaults,noatime,nodiratime        1 2&lt;/pre&gt;Without &lt;span style="font-style: italic;"&gt;noatime&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;nodiratime&lt;/span&gt; every file and directory read meant a disk write to update the access time.  Since we don't have a use for access times in /var I did away with them.&lt;br /&gt;&lt;br /&gt;With &lt;span style="font-style: italic;"&gt;tune2fs&lt;/span&gt; I change the &lt;span style="font-style: italic;"&gt;data&lt;/span&gt; option from the default (&lt;span style="font-style: italic;"&gt;ordered&lt;/span&gt;) to &lt;span style="font-style: italic;"&gt;writeback&lt;/span&gt;:&lt;br /&gt;&lt;pre&gt;# tune2fs -o journal_data_writeback /dev/mapper/VolGroup00-LogVol04&lt;/pre&gt;The writeback mode can cause file corruption on unclean shutdowns but the benefits outweights the risk for us.  Our web content in /var is replicated from a master server so we would only be looking into losing non-critical data such as some state files and access log entries.&lt;br /&gt;&lt;br /&gt;After these changes the GC is barely noticed.  If you pay attention to the graph above you will see that there is no load spike for 13:00 onwards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-7085189484431095604?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-PFU3pAlo2e7jGP7nLOyaMPrhig/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-PFU3pAlo2e7jGP7nLOyaMPrhig/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-PFU3pAlo2e7jGP7nLOyaMPrhig/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-PFU3pAlo2e7jGP7nLOyaMPrhig/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/Zijn7Pimo7s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/7085189484431095604/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=7085189484431095604" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/7085189484431095604?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/7085189484431095604?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/Zijn7Pimo7s/disk-io-spikes-caused-by-modproxyc-in.html" title="Disk IO spikes caused by mod_proxy.c in Apache 1.3" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_0gue5YpVahg/Sj8ccy0zh1I/AAAAAAAANtA/x4HYtGFWwmo/s72-c/web-server_Load-day.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2009/06/disk-io-spikes-caused-by-modproxyc-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEBQno-cSp7ImA9WxJQEk0.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-6252896475089194963</id><published>2009-05-25T09:03:00.004+10:00</published><updated>2009-05-25T09:44:13.459+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-25T09:44:13.459+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bug" /><category scheme="http://www.blogger.com/atom/ns#" term="apache" /><category scheme="http://www.blogger.com/atom/ns#" term="hack" /><title>Apache 1.3.41 HostnameLookups bug?</title><content type="html">This weekend a scheduled maintenance in the data centre took out the name servers.  I wasn't worried because all the names we needed to resolve in order to keep serving pages were in /etc/hosts.&lt;br /&gt;&lt;br /&gt;Sure enough, during the maintenance alarms started going off.  Web pages, static or dynamic, were taking in excess of 5 seconds to be served.  We checked /etc/nsswitch.conf to make sure forward lookups were being resolved by /etc/hosts instead of DNS:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hosts:      files dns&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We then inspected the access log and we could see that some entries had host names instead of IP addresses.  This was odd since reverse DNS lookups were turned off in Apache:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;HostnameLookups Off&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A colleague suggested it could be our &lt;a href="http://httpd.apache.org/docs/1.3/mod/mod_log_config.html#logformat"&gt;LogFormat&lt;/a&gt; configuration:&lt;br /&gt;&lt;br /&gt;LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://httpd.apache.org/docs/1.3/logs.html#common"&gt;documentation is pretty clear that %h will only do a reverse lookup if HostnameLookups is turned on&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;If &lt;a style="" href="http://httpd.apache.org/docs/1.3/mod/core.html#hostnamelookups"&gt;HostnameLookups&lt;/a&gt; is       set to &lt;code&gt;On&lt;/code&gt;, then the server will try to determine       the hostname and log it in place of the IP address.&lt;/blockquote&gt;Nevertheless, we replaced %h with %a.  That didn't solve the issue - requests still took little more than 5 seconds to be fulfilled.  The millisecond part of the response time looked right to me, so I went on to read the resolv.conf man page and found this bit very interesting:&lt;br /&gt;&lt;blockquote&gt;timeout:n&lt;br /&gt;sets  the amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server.  Measured in &lt;span style="font-weight: bold;"&gt;seconds&lt;/span&gt;, the default is RES_TIMEOUT (currently &lt;span style="font-weight: bold;"&gt;5&lt;/span&gt;, see &amp;lt;resolv.h&amp;gt;).&lt;/blockquote&gt;Now I was pretty much convinced that Apache was playing tricks on us.  I double-checked all our &lt;a href="http://httpd.apache.org/docs/1.3/mod/mod_access.html#allow"&gt;Allow&lt;/a&gt; statements to make sure we weren't using hostnames, since the manual says it will do a reverse lookup in this case:&lt;br /&gt;&lt;blockquote&gt;This configuration will       cause the server to perform a double reverse DNS lookup on the       client IP address, regardless of the setting of the &lt;a href="http://httpd.apache.org/docs/1.3/mod/core.html#hostnamelookups"&gt;HostnameLookups&lt;/a&gt;       directive.&lt;br /&gt;&lt;/blockquote&gt;We only had Allow statements for the usual restricted URLs (server-status etc) and even then, were only using IP addresses.&lt;br /&gt;&lt;br /&gt;I decided to disable the lookups in source code, since this was starting to look like a bug.  In src/main/http_core.c, line 728, I commented the reverse lookup call and replaced it with a fake response:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;//      hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr), AF_INET);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        hptr = NULL;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I did the same on line 825:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;//      hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr), AF_INET);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        hptr = NULL;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The web server went back to serving static and dynamic objects in the normal time, tens of milliseconds.  I deployed the newly compiled Apache to all servers and went back to my weekend.&lt;br /&gt;&lt;br /&gt;This hack obviously breaks all functionality that depends on reverse IP address lookups so, if I have some time, I will analyse this condition and, if it is a bug, submit a patch to the chaps at the Apache Foundation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-6252896475089194963?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JTU6Z3JO1f4s41F1L5_Hne9EA2M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JTU6Z3JO1f4s41F1L5_Hne9EA2M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JTU6Z3JO1f4s41F1L5_Hne9EA2M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JTU6Z3JO1f4s41F1L5_Hne9EA2M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/d1y4rdItmso" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/6252896475089194963/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=6252896475089194963" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6252896475089194963?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6252896475089194963?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/d1y4rdItmso/apache-1341-hostnamelookups-bug.html" title="Apache 1.3.41 HostnameLookups bug?" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://microrants.blogspot.com/2009/05/apache-1341-hostnamelookups-bug.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4DRn07fyp7ImA9WxJTFEs.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-3642494592426371690</id><published>2009-04-23T16:05:00.002+10:00</published><updated>2009-04-23T16:09:37.307+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-23T16:09:37.307+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="mouse" /><category scheme="http://www.blogger.com/atom/ns#" term="kvm" /><category scheme="http://www.blogger.com/atom/ns#" term="xorg" /><title>QEMU/KVM mouse not working?</title><content type="html">&lt;a href="http://wiki.clug.org.za/wiki/QEMU_mouse_not_working"&gt;This guy&lt;/a&gt; knows the answer:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ export SDL_VIDEO_X11_DGAMOUSE=0&lt;br /&gt;&lt;/pre&gt;For me, because I use a physical device for a disk and didn't want to give myself permission on the device:&lt;br /&gt;&lt;pre&gt;$ sudo SDL_VIDEO_X11_DGAMOUSE=0 qemu-launcher&lt;br /&gt;&lt;/pre&gt;My mouse stopped working after I configured Xinerama and display rotation on X (I had alsoi upgraded to Ubuntu 9.04 but I didn't test my VM before fiddling with xorg.conf).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-3642494592426371690?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Bb-B4G7yKkEJ2E3YVnOEoKUanSA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bb-B4G7yKkEJ2E3YVnOEoKUanSA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Bb-B4G7yKkEJ2E3YVnOEoKUanSA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bb-B4G7yKkEJ2E3YVnOEoKUanSA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/ynMV_U_YzeQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/3642494592426371690/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=3642494592426371690" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/3642494592426371690?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/3642494592426371690?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/ynMV_U_YzeQ/qemukvm-mouse-not-working.html" title="QEMU/KVM mouse not working?" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2009/04/qemukvm-mouse-not-working.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YERn46eyp7ImA9WxVbF0s.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-5692941158221044451</id><published>2009-04-03T23:11:00.003+11:00</published><updated>2009-04-03T23:18:27.013+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-03T23:18:27.013+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mythtv" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>XOrg configuration for Samsung LA32A450C1</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_0gue5YpVahg/SdX96uY241I/AAAAAAAANOU/74LAHHaKs80/s1600-h/samsung-32-lcd-resolutions.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 172px;" src="http://4.bp.blogspot.com/_0gue5YpVahg/SdX96uY241I/AAAAAAAANOU/74LAHHaKs80/s320/samsung-32-lcd-resolutions.png" alt="" id="BLOGGER_PHOTO_ID_5320437720134640466" border="0" /&gt;&lt;/a&gt;&lt;a href="http://web.aanet.com.au/%7Eauric/?q=node/3"&gt;Th&lt;/a&gt;&lt;a href="http://web.aanet.com.au/%7Eauric/?q=node/3"&gt;is guy n&lt;/a&gt;&lt;a href="http://web.aanet.com.au/%7Eauric/?q=node/3"&gt;ailed it&lt;/a&gt;.  I had only just found the manual page for my Samsung 32" LCD TV and was still googling for a tool to find the modeline.&lt;br /&gt;&lt;br /&gt;I've only added the option to turn off nvidia's logo to his X configuration.  Too good:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Section "Monitor"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Identifier     "SamsungTV"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    ModelName      "Samsung LCD TV"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    ModeLine      "1360x768@60" 85.8 1360 1440 1552 1792 768 771 777 795 +hsync +vsync&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Option          "dpms"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;EndSection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Section "Device"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Identifier  "NVIDIAVideocard0"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Driver      "nvidia"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Option      "ModeValidation" "DFP-0: NoDFPNativeResolutionCheck"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Option      "ExactModeTimingsDVI" "TRUE"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        #### 100 DPI&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Option      "UseEDIDDpi" "FALSE"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Option      "DPI" "100 x 100"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Option      "NoLogo" "True"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;EndSection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Section "Screen"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Identifier     "Screen0"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Device         "NVIDIAVideocard0"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Monitor        "SamsungTV"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    DefaultDepth    24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    SubSection     "Display"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Depth       24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                ##### Native Res Samsung 1360x768@60&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Modes    "1360x768@60" "1280x720" "1024x768" "800x600" "640x480"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    EndSubSection&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;EndSection&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-5692941158221044451?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0JrB1K26dd7suqsVYZHEK5epGKI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0JrB1K26dd7suqsVYZHEK5epGKI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0JrB1K26dd7suqsVYZHEK5epGKI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0JrB1K26dd7suqsVYZHEK5epGKI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/fcMaqJzTsg4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/5692941158221044451/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=5692941158221044451" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/5692941158221044451?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/5692941158221044451?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/fcMaqJzTsg4/xorg-configuration-for-samsung.html" title="XOrg configuration for Samsung LA32A450C1" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_0gue5YpVahg/SdX96uY241I/AAAAAAAANOU/74LAHHaKs80/s72-c/samsung-32-lcd-resolutions.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2009/04/xorg-configuration-for-samsung.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYBSXw_eCp7ImA9WxVREEU.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-9065599744012984570</id><published>2009-01-16T15:56:00.002+11:00</published><updated>2009-01-16T16:02:38.240+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-16T16:02:38.240+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="red hat" /><category scheme="http://www.blogger.com/atom/ns#" term="yum" /><category scheme="http://www.blogger.com/atom/ns#" term="rhn" /><category scheme="http://www.blogger.com/atom/ns#" term="hack" /><title>RHN's yum update fails</title><content type="html">I've noticed that quite often Red Hat's yum will fail for no good reason.  For example it will just show an error like:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# yum update&lt;br /&gt;(...)&lt;br /&gt;&lt;br /&gt;Error Downloading Packages:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  samba-common - 3.0.28-1.el5_2.1.x86_64: failed to retrieve getPackage/samba-common-3.0.28-1.el5_2.1.x86_64.rpm from rhel-x86_64-server-5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;error was [Errno 14] HTTP Error 404: Not Found&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When that's the case, retrying a few times usually does the trick.&lt;br /&gt;&lt;br /&gt;I have actually opened a ticket with RHN's support and they've told me these are "temporary errors".  Temporary or not they are pretty annoying so here's what I do.&lt;br /&gt;&lt;br /&gt;1. Retry manually until you're happy with the list of packages that will be updated&lt;br /&gt;2. Run yum in a while loop so that it retries until it succeeds:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# while ! (yum update -y) ; do echo TRY AGAIN; done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Be aware that if that too many retries can cause your RHN subscription to be temporarily locked-out.  I find the benefit too great to care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-9065599744012984570?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_XzMbj89ldaDdVcFch6dLqAiJHI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_XzMbj89ldaDdVcFch6dLqAiJHI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_XzMbj89ldaDdVcFch6dLqAiJHI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_XzMbj89ldaDdVcFch6dLqAiJHI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/tnoAp9-h0ss" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/9065599744012984570/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=9065599744012984570" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/9065599744012984570?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/9065599744012984570?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/tnoAp9-h0ss/rhns-yum-update-fails.html" title="RHN's yum update fails" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://microrants.blogspot.com/2009/01/rhns-yum-update-fails.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEAQ3Y7cSp7ImA9WxRaGEw.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-6325140389644699762</id><published>2008-12-21T09:54:00.003+11:00</published><updated>2008-12-21T10:10:42.809+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-21T10:10:42.809+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mythtv mytharchive DVD" /><title>Mytharchive: cannot burn a dvd</title><content type="html">I've been playing with &lt;a href="http://www.mythtv.org/"&gt;MythTV&lt;/a&gt; again.  Configuring it still is a major pain in the arse - there seems to be something wrong with the channel scanner that throws you off the track.  I think.&lt;br /&gt;&lt;br /&gt;Anyway, after recording a few programs I wanted to burn a DVD.  My first attempt failed because &lt;a href="http://www.mythtv.org/wiki/index.php/MythArchive"&gt;Mytharchive&lt;/a&gt; tries writing to /dev/dvd by default.  I solved this problem by linking /dev/dvd to my DVD device.&lt;br /&gt;&lt;br /&gt;Tried again and &lt;a href="http://www.mythtv.org/wiki/index.php/MythArchive"&gt;Mytharchive&lt;/a&gt; refused to enter the burn DVD menu, showing the error below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Mytharchive: cannot burn a dvd, the last run failed to create a dvd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;WTF?  A bit harsh on the error flagging, I'd say.  So after searching around I found some people with the same problem but none of the helpful people would tell how to clear the error.  Here's what you do.&lt;br /&gt;&lt;br /&gt;1. Quit mythfrontend&lt;br /&gt;2. Open a command prompt and:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mysql -u root&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;use mythconverg;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;update settings set data='' where value='MythArchiveLastRunStatus';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;update settings set data='' where value='MythArchiveLastRunType';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. Go back to mytharchive and try again.  This time it will let you proceed to the DVD burn menus.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-6325140389644699762?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JSWSvHXff5mUDhE5ORIjpF9JlPI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JSWSvHXff5mUDhE5ORIjpF9JlPI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JSWSvHXff5mUDhE5ORIjpF9JlPI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JSWSvHXff5mUDhE5ORIjpF9JlPI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/JGa6FtFuNac" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/6325140389644699762/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=6325140389644699762" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6325140389644699762?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6325140389644699762?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/JGa6FtFuNac/mytharchive-cannot-burn-dvd.html" title="Mytharchive: cannot burn a dvd" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/12/mytharchive-cannot-burn-dvd.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cGSXo4eip7ImA9WxRbGUQ.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-2527263096117209505</id><published>2008-12-11T21:07:00.005+11:00</published><updated>2008-12-11T21:23:48.432+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-11T21:23:48.432+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="flock" /><category scheme="http://www.blogger.com/atom/ns#" term="rsync" /><category scheme="http://www.blogger.com/atom/ns#" term="crontab" /><title>How to avoid overlapping rsync instances</title><content type="html">Running rsync as a cron job is probably as popular as sliced bread.  For small intervals, however, you risk having a second instance start before the first one has finished, beginning a downward spiral of bandwidth and processes.&lt;br /&gt;&lt;br /&gt;To avoid multiple instances getting in each other's way there's a simple solution using flock.  Example without lock (may cause overlapping instances):&lt;br /&gt;&lt;blockquote&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;*/5 * * * * /usr/bin/rsync --delete -a source_server:/source/path/ /dst/path/&lt;/span&gt;&lt;/blockquote&gt;Example using flock:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;&lt;span style=";font-size:100%;" &gt;&lt;span style=""&gt;*/5 * * * * flock -xn /tmp/example.lock -c '/usr/bin/rsync --delete -a source_server:/source/path/ /dst/path/'&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;/span&gt;&lt;/span&gt;In the second example, if a rsync instance runs for more than 5 minutes, flock will fail and thus not execute a second rsync process.&lt;br /&gt;&lt;br /&gt;This can be used for pretty much any shell problem where locking helps.  Have a read on the &lt;a href="http://linux.die.net/man/1/flock"&gt;flock man page&lt;/a&gt; for other examples.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-2527263096117209505?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JqZHjN96w-QZZ-N3gexn4YqJJnw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JqZHjN96w-QZZ-N3gexn4YqJJnw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JqZHjN96w-QZZ-N3gexn4YqJJnw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JqZHjN96w-QZZ-N3gexn4YqJJnw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/bk1RovnHpI0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/2527263096117209505/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=2527263096117209505" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/2527263096117209505?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/2527263096117209505?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/bk1RovnHpI0/how-to-avoid-overlapping-rsync.html" title="How to avoid overlapping rsync instances" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/12/how-to-avoid-overlapping-rsync.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08NRXc7fSp7ImA9WxdXE0k.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-6984020914126876835</id><published>2008-06-25T07:09:00.003+10:00</published><updated>2008-06-25T07:11:34.905+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-25T07:11:34.905+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="break" /><title>No time?  No worries!</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_0gue5YpVahg/SGFiw1hUO-I/AAAAAAAAHMk/0uHCC7TFKPM/s1600-h/too-busy.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_0gue5YpVahg/SGFiw1hUO-I/AAAAAAAAHMk/0uHCC7TFKPM/s400/too-busy.jpg" alt="" id="BLOGGER_PHOTO_ID_5215558434611805154" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-6984020914126876835?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yvIVnroqXeNLBD5WJN-Mv2RCBaw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yvIVnroqXeNLBD5WJN-Mv2RCBaw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yvIVnroqXeNLBD5WJN-Mv2RCBaw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yvIVnroqXeNLBD5WJN-Mv2RCBaw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/_cMJIk7D7z0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/6984020914126876835/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=6984020914126876835" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6984020914126876835?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6984020914126876835?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/_cMJIk7D7z0/no-time-no-worries.html" title="No time?  No worries!" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_0gue5YpVahg/SGFiw1hUO-I/AAAAAAAAHMk/0uHCC7TFKPM/s72-c/too-busy.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/06/no-time-no-worries.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAASXc-cSp7ImA9WxdRFk4.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-6193807557567293824</id><published>2008-06-05T12:44:00.006+10:00</published><updated>2008-06-05T12:59:08.959+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-05T12:59:08.959+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="misleading" /><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="asp.net" /><category scheme="http://www.blogger.com/atom/ns#" term="403" /><category scheme="http://www.blogger.com/atom/ns#" term="404" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows 2003" /><category scheme="http://www.blogger.com/atom/ns#" term="iis" /><title>IIS asp.net v2.0 fake 403 and 404 errors</title><content type="html">After installing an ASP.NET v2.0 application I tried to browse to it but IIS wouldn't show the page and spit this 403 error instead:&lt;br /&gt;&lt;blockquote&gt;The website declined to show this webpage&lt;/blockquote&gt;Now, there are a few causes to this problem.  The most common is when the user forgets to add an index page to the site or, to add the index page to the list of "Enable default content page" under IIS.&lt;br /&gt;&lt;br /&gt;Mr. Ian Tinsley found a more sinister cause that has the following symptom: if you browse to an existing .aspx file, ISS will return a 404 error code, even &lt;span style="font-weight: bold;"&gt;though the file exists&lt;/span&gt;.  A good way to check if this is your case is to place a static file (htm or gif etc) in your site and try browsing it; if it shows you the static file then you probably have a fake 403/404 scenario.&lt;br /&gt;&lt;br /&gt;To make sure, go to Web Service Extensions under IIS and check if ASP.NET v2.x is listed:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_0gue5YpVahg/SEdU_MuJV4I/AAAAAAAAHMU/NX7ljcVaMEw/s1600-h/asp_net_v2.JPG"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_0gue5YpVahg/SEdU_MuJV4I/AAAAAAAAHMU/NX7ljcVaMEw/s400/asp_net_v2.JPG" alt="" id="BLOGGER_PHOTO_ID_5208224938800535426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The tricky bit is: &lt;span style="font-weight: bold;"&gt;even if ASP.NET v2.x is not listed above, the v2.x ex&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;tension still shows on the application properties&lt;/span&gt;.  So if you don't have it above, you need to run aspnet_regiis.exe:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_0gue5YpVahg/SEdVZ1SUZQI/AAAAAAAAHMc/5b1I1rnusSc/s1600-h/asp_net_v2-regiis.JPG"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_0gue5YpVahg/SEdVZ1SUZQI/AAAAAAAAHMc/5b1I1rnusSc/s400/asp_net_v2-regiis.JPG" alt="" id="BLOGGER_PHOTO_ID_5208225396366271746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Running with -ir will help keep your asp.net v1.1 stuff running and still install v2:&lt;br /&gt;&lt;br /&gt;&lt;b style="font-family: courier new;"&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ir&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-6193807557567293824?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Wo2YtbT8CALSSTDRSlKXOdm3PT8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Wo2YtbT8CALSSTDRSlKXOdm3PT8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Wo2YtbT8CALSSTDRSlKXOdm3PT8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Wo2YtbT8CALSSTDRSlKXOdm3PT8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/DEj4pdMSv4k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/6193807557567293824/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=6193807557567293824" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6193807557567293824?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6193807557567293824?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/DEj4pdMSv4k/iis-aspnet-v20-fake-403-and-404-errors.html" title="IIS asp.net v2.0 fake 403 and 404 errors" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_0gue5YpVahg/SEdU_MuJV4I/AAAAAAAAHMU/NX7ljcVaMEw/s72-c/asp_net_v2.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/06/iis-aspnet-v20-fake-403-and-404-errors.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYEQnYyfyp7ImA9WxZaF0U.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-1763835719350832246</id><published>2008-05-03T11:56:00.004+10:00</published><updated>2008-05-03T12:35:03.897+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-03T12:35:03.897+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rant" /><category scheme="http://www.blogger.com/atom/ns#" term="sun" /><category scheme="http://www.blogger.com/atom/ns#" term="red hat" /><category scheme="http://www.blogger.com/atom/ns#" term="hardware" /><category scheme="http://www.blogger.com/atom/ns#" term="solaris" /><title>Sun x4450</title><content type="html">With a range of options for the Intel Tigerton Quad-core Xeon processors, the &lt;a href="http://www.sun.com/servers/x64/x4450/specs.xml"&gt;Sun x4450&lt;/a&gt; fitted the recommendations for our new postgres database servers.  Solaris 10 was chosen by default as the operating system - why complicate the setup by mixing vendors, right?&lt;br /&gt;&lt;br /&gt;Well, long story made short: I've ditched Solaris 10 x86_64 in favour of Red Hat Enterprise 5.1.  Why?  For one thing the Solaris 10 installation was frustratingly complicated.&lt;br /&gt;&lt;br /&gt;Performing an installation via serial console requires you to redirect output from the BNC to the System in the BIOS settings.  Then the manual states you should choose grub menu's option "ttb".  Of course the manual meant "ttyb".  But it is actually a typo AND an error: you must choose ttya or all you'll see after boot is "Sun Solaris 5.10" and nothing else.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_0gue5YpVahg/SBvNl8gdaCI/AAAAAAAAHJc/0i1LuCRv9ew/s1600-h/x4450.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_0gue5YpVahg/SBvNl8gdaCI/AAAAAAAAHJc/0i1LuCRv9ew/s400/x4450.jpg" alt="" id="BLOGGER_PHOTO_ID_5195972646883125282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once the serial console installation is finished and the system reboots you have another obstacle.  The boot process stops at this error message:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;Bad PBR sig&lt;/span&gt;  &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;br /&gt;Reboot and Select proper Boot device&lt;/span&gt;  &lt;span style="font-family:courier new;"&gt;or&lt;br /&gt;Insert Boot Media in selected Boot device and press a key&lt;/span&gt;&lt;/blockquote&gt;Googling around (Sun's KB was useless) I found someone with the same problem reporting that a GUI installation didn't show that error.  Very well, I configured the firewall to allow Sun's network KVM:&lt;br /&gt;&lt;br /&gt;8890 TCP Remote Console&lt;br /&gt;9000 TCP Remote Console&lt;br /&gt;9001 TCP Remote Console&lt;br /&gt;9002 TCP Remote Console&lt;br /&gt;9003 TCP Remote Console&lt;br /&gt;69 UDP TFTP (for firmware upgrades)&lt;br /&gt;161 UDP SNMP (for monitoring)&lt;br /&gt;&lt;br /&gt;As the anonymous poster reported, this did solve the problem.  Now to install postgres for x86_64.  Hmm.  Doesn't run - complains about missing libraries.  Probably just need to run crle to set-up the location of the 64bit libraries.  Where are they, where are they... WTF?  There are no x86_64 libraries installed in my Solaris 10 for x86_64.  I check around with `file' and yeah: all bloody system libraries are 32 bits.&lt;br /&gt;&lt;br /&gt;I confess I didn't try too hard after this.  A day later and we had postgres  running on RHEL 5.1.  And yes, with a 64bit binary and libraries.&lt;br /&gt;&lt;br /&gt;To Sun's credit, the hardware looks a beauty, even though you have to assemble the whole thing by yourself: memory cards, SAS card, Fibre Channel card, hard disks and whatever extras you bought.  What a pain in the arse.  Compared to the other Dell servers with pre-installed RHEL 5.1 we recently bought the Sun experience is pathetic: the Dells where up on the same day versus 1 week for Sun.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-1763835719350832246?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KoagIyA3_QgqG8u7MQe5jjyXI1s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KoagIyA3_QgqG8u7MQe5jjyXI1s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KoagIyA3_QgqG8u7MQe5jjyXI1s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KoagIyA3_QgqG8u7MQe5jjyXI1s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/kVCbgtMRuSg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/1763835719350832246/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=1763835719350832246" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/1763835719350832246?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/1763835719350832246?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/kVCbgtMRuSg/sun-x4450.html" title="Sun x4450" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp1.blogger.com/_0gue5YpVahg/SBvNl8gdaCI/AAAAAAAAHJc/0i1LuCRv9ew/s72-c/x4450.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/05/sun-x4450.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEANR3gyeCp7ImA9WxZbFUg.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-656127778319494794</id><published>2008-04-18T13:41:00.005+10:00</published><updated>2008-04-19T08:13:16.690+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-19T08:13:16.690+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="raid" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="nagios" /><title>Nagios checks for LSI RAID with MegaCli</title><content type="html">I am pretty sure there is a SNMP object in Dell's DRAC 5/PERC to inform about the status of your RAID volumes and physical disks.  I'm not too fond of using SNMP with Nagios so I wrote a check script that uses the &lt;a href="http://www.lsi.com/cm/License.do?url=/support/downloads/megaraid/miscellaneous/linux/1.01.40_Linux_Cli.zip&amp;amp;prodName=MegaRAID%20SAS%208204ELP&amp;amp;subType=Miscellaneous&amp;amp;locale=EN"&gt;MegaCli&lt;/a&gt; &lt;a href="http://www.lsi.com/support/downloads/megaraid/miscellaneous/linux/1.01.40_Linux_Cli.zip"&gt;linux i386 binary&lt;/a&gt; (from the &lt;a href="http://www.lsi.com/"&gt;LSI web site&lt;/a&gt;) to report the status of the RAID on our Dell/Red Hat Linux servers.&lt;br /&gt;&lt;br /&gt;Here's what you need:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;perl interpreter in /usr/bin/perl&lt;/li&gt;&lt;li&gt;nagios' utils.pm in /usr/local/nagios/libexec/&lt;/li&gt;&lt;li&gt;perl module Time::HiRes (cpan; install Time::HiRes)&lt;/li&gt;&lt;li&gt;sudo in /usr/bin/&lt;/li&gt;&lt;li&gt;MegaCli in /opt/MegaRAID/MegaCli/MegaCli64&lt;/li&gt;&lt;/ul&gt;You'll also need the check_dellperc in /usr/local/nagios/libexec.  Change the paths as you see fit.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;#!/usr/bin/perl -wT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;# CHECK DELL/MegaRAID DISK ARRAYS ON LINUX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;# $Id: check_dellperc 142 2008-03-17 22:25:46Z thiago $&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;BEGIN&lt;/span&gt; {&lt;br /&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$ENV{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;PATH&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;/usr/bin&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$ENV{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;ENV&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;''&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$ENV{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;BASH_ENV&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;''&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$ENV{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;IFS&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; ( &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;defined&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(0, 139, 139);"&gt;$ENV{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;IFS&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;) ) ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;use strict&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;use lib&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;/usr/local/nagios/libexec&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;use &lt;/span&gt;utils &lt;span style="color: rgb(255, 0, 255);"&gt;qw(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;$TIMEOUT %ERRORS &amp;amp;print_revision &amp;amp;support &amp;amp;usage&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;use &lt;/span&gt;Getopt::Long;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;use &lt;/span&gt;Time::HiRes qw ( tv_interval gettimeofday );&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;use vars&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);"&gt;qw(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;$opt_h $help $opt_V $version&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;use vars&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);"&gt;qw(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;$PROGNAME $SUDO $MEGACLI&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$PROGNAME&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;check_dellperc&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$SUDO&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;/usr/bin/sudo&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$MEGACLI&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;/opt/MegaRAID/MegaCli/MegaCli64&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$t_start&lt;/span&gt; = [gettimeofday];&lt;br /&gt;&lt;br /&gt;Getopt::Long::Configure(&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;bundling&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;);&lt;br /&gt;GetOptions&lt;br /&gt; (&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;V&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;   =&amp;gt; &lt;span style="color: rgb(0, 139, 139);"&gt;\$opt_V&lt;/span&gt;,  &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;    =&amp;gt; &lt;span style="color: rgb(0, 139, 139);"&gt;\$opt_V&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;h&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;   =&amp;gt; &lt;span style="color: rgb(0, 139, 139);"&gt;\$opt_h&lt;/span&gt;,  &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;help&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;       =&amp;gt; &lt;span style="color: rgb(0, 139, 139);"&gt;\$opt_h&lt;/span&gt;,&lt;br /&gt; );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; ( &lt;span style="color: rgb(0, 139, 139);"&gt;$opt_V&lt;/span&gt; ) {    print_revision(&lt;span style="color: rgb(0, 139, 139);"&gt;$PROGNAME&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;$Id: check_dellperc 142 2008-03-17 22:25:46Z thiago $&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;);&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$ERRORS{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;OK&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;} &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;elsif&lt;/b&gt;&lt;/span&gt; ( &lt;span style="color: rgb(0, 139, 139);"&gt;$opt_h&lt;/span&gt; ) {&lt;br /&gt; print_help();&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$ERRORS{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;OK&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$TIMEOUT&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(46, 139, 87);"&gt;&lt;b&gt;utils::&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;TIMEOUT&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$start_time&lt;/span&gt; = &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;time&lt;/b&gt;&lt;/span&gt;();&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;# &lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 0);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;TODO&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;: add timeout option&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#if ( $opt_t &amp;amp;&amp;amp; $opt_t =~ /^([0-9]+)$/ ) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#    $TIMEOUT = $1;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;# Check state of Logical Devices&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$status&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;PERC OK&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$perfdata&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;""&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$errors&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$ERRORS{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;OK&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$vd&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;""&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$vds&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;""&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;open&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(0, 139, 139);"&gt;MROUT&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$SUDO&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$MEGACLI&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt; -LDInfo -Lall -aALL -NoLog|&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (!&lt;span style="color: rgb(0, 139, 139);"&gt;&amp;lt;MROUT&amp;gt;&lt;/span&gt;) {&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;Can't run &lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$MEGACLI&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;);&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$ERRORS{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;UNKNOWN&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;while&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;&amp;lt;MROUT&amp;gt;&lt;/span&gt;) {&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$line&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$_&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;chomp&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(0, 139, 139);"&gt;$line&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$line&lt;/span&gt; =~&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;^Virtual Disk: &lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\d&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;+)&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;     &lt;span style="color: rgb(0, 139, 139);"&gt;$vd&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$1&lt;/span&gt;;&lt;br /&gt;     &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;next&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$vd&lt;/span&gt; =~&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;^&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;[0-9]+&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;     &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$line&lt;/span&gt; =~&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;^State: &lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\w&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;+)&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;         &lt;span style="color: rgb(0, 139, 139);"&gt;$vds&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$1&lt;/span&gt;;            &lt;span style="color: rgb(0, 0, 255);"&gt;#&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 0);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;TODO&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;: verbose print("State for VD #$vd is $vds\n");&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(0, 139, 139);"&gt;$perfdata&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$perfdata&lt;/span&gt;.&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt; VD&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$vd&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$vds&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;         &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$vds&lt;/span&gt; !~&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;^Optimal$&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;             &lt;span style="color: rgb(0, 139, 139);"&gt;$errors&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$ERRORS{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;CRITICAL&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;;&lt;br /&gt;             &lt;span style="color: rgb(0, 139, 139);"&gt;$status&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;RAID ERROR&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;#&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 0);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;TODO&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;: verbose print("Error found: $status. Skipping remaining Virtual Drive tests.\n");&lt;/span&gt;&lt;br /&gt;             &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;last&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt;         } &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/span&gt; {&lt;br /&gt;             &lt;span style="color: rgb(0, 139, 139);"&gt;$vd&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;""&lt;/span&gt;; &lt;span style="color: rgb(0, 139, 139);"&gt;$vds&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;""&lt;/span&gt;;&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;close&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(0, 139, 139);"&gt;MROUT&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;# Check state of Physical Drives&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$count_type&lt;/span&gt;;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$pd&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;""&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$pds&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;""&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;open&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(0, 139, 139);"&gt;MROUT&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$SUDO&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$MEGACLI&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt; -PDList -aALL -NoLog|&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (!&lt;span style="color: rgb(0, 139, 139);"&gt;&amp;lt;MROUT&amp;gt;&lt;/span&gt;) {&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;Can't run &lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$MEGACLI&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;);&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$ERRORS{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;UNKNOWN&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;while&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;&amp;lt;MROUT&amp;gt;&lt;/span&gt;) {&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$line&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$_&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;chomp&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(0, 139, 139);"&gt;$line&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$line&lt;/span&gt; =~&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;^Device Id: &lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\d&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;+)&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;     &lt;span style="color: rgb(0, 139, 139);"&gt;$pd&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$1&lt;/span&gt;;&lt;br /&gt;     &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;next&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$pd&lt;/span&gt; =~&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;^&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;[0-9]+&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;     &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$line&lt;/span&gt; =~&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;^&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;Media Error|Other Error|Predictive Failure&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt; Count: &lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\w&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;+)&lt;/span&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;         &lt;span style="color: rgb(0, 139, 139);"&gt;$count_type&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$1&lt;/span&gt;;&lt;br /&gt;         &lt;span style="color: rgb(0, 139, 139);"&gt;$pds&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$2&lt;/span&gt;;            &lt;span style="color: rgb(0, 0, 255);"&gt;#&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 0);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;TODO&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;: verbose print("$count_type count for device id #$pd is $pds\n");&lt;/span&gt;&lt;br /&gt;         &lt;span style="color: rgb(0, 139, 139);"&gt;$perfdata&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$perfdata&lt;/span&gt;.&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt; PD&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$pd&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$count_type&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$pds&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;         &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$pds&lt;/span&gt; != &lt;span style="color: rgb(255, 0, 255);"&gt;0&lt;/span&gt;) {&lt;br /&gt;             &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style="color: rgb(0, 139, 139);"&gt;$errors&lt;/span&gt; == &lt;span style="color: rgb(0, 139, 139);"&gt;$ERRORS{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;OK&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;) {&lt;br /&gt;                 &lt;span style="color: rgb(0, 139, 139);"&gt;$status&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;DISK ERROR&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;                 &lt;span style="color: rgb(0, 139, 139);"&gt;$errors&lt;/span&gt; = &lt;span style="color: rgb(0, 139, 139);"&gt;$ERRORS{&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;WARNING&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;}&lt;/span&gt;;&lt;br /&gt;             }&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;close&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: rgb(0, 139, 139);"&gt;MROUT&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;# Got here OK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$t_end&lt;/span&gt; = [gettimeofday];&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$status&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;| time=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt; . (tv_interval &lt;span style="color: rgb(0, 139, 139);"&gt;$t_start&lt;/span&gt;, &lt;span style="color: rgb(0, 139, 139);"&gt;$t_end&lt;/span&gt;) . &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$perfdata&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 139, 139);"&gt;$errors&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;sub&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;print_usage&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;Usage: &lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$PROGNAME&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\n&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;sub&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;print_help&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt; print_revision(&lt;span style="color: rgb(0, 139, 139);"&gt;$PROGNAME&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;$Revision: 142 $ &lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;'&lt;/span&gt;);&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;Copyright (C) 2007 Westfield Ltd&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\n\n&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;Check Dell/MegaRaid Disk Array plugin for Nagios&lt;/span&gt;&lt;span style="color: rgb(106, 90, 205);"&gt;\n\n&lt;/span&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt; print_usage();&lt;br /&gt; &lt;span style="color: rgb(165, 42, 42);"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);"&gt;&amp;lt;&amp;lt;USAGE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;-V, --version&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;    Print program version information&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;-h, --help&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;    This help screen&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 139, 139);"&gt;$PROGNAME&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 255);"&gt;USAGE&lt;/span&gt;&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After installing the script above and changing the paths to match your system, edit your sudoers file (sudo /usr/sbin/visudo) and comment the following line:&lt;br /&gt;&lt;p style="font-family: courier new;font-family:courier new;" &gt;&lt;span style="font-size:100%;"&gt;&lt;span style=""&gt;# Defaults    requiretty&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style=""&gt;If you are doing NRPE checks, the line above will prevent the script from running sudo because there is no TTY associated with it.  There is probably a way around it that doesn't involve disabling this security feature - if you find out please tell me.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:courier new;"&gt;&lt;span style="font-family:georgia;"&gt;While in the sudoers file, also add the following two lines:&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="font-family: courier new;font-family:courier new;" &gt;&lt;span style="font-size:100%;"&gt;&lt;span style=""&gt;nagios  ALL=(ALL) NOPASSWD: /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL -NoLog&lt;br /&gt;nagios  ALL=(ALL) NOPASSWD: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL –NoLog&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;If you run NRPE with a user different than "nagios", change the lines above to match it.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;That is it, basically.  Before adding it to your NRPE checks, give it a try:&lt;br /&gt;&lt;/p&gt;&lt;span style="font-family: courier new;"&gt;$ sudo -u nagios /usr/local/nagios/libexec/check_dellperc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;PERC OK| time=0.189185 VD0=Optimal VD1=Optimal PD0=Media Error;0 PD0=Other Error;0 PD0=Predictive Failure;0 PD1=Media Error;0 PD1=Other Error;0 PD1=Predictive Failure;0 PD2=Media Error;0 PD2=Other Error;0 PD2=Predictive Failure;0 PD3=Media Error;0 PD3=Other Error;0 PD3=Predictive Failure;0 PD4=Media Error;0 PD4=Other Error;0 PD4=Predictive Failure;0 PD5=Media Error;0 PD5=Other Error;0 PD5=Predictive Failure;0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It should return a status of zero (unless, of course, your RAID is b0rken):&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ echo $?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;0&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-656127778319494794?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Oc-IgjEwWd5OYlf3DoxqNZG6D4M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Oc-IgjEwWd5OYlf3DoxqNZG6D4M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Oc-IgjEwWd5OYlf3DoxqNZG6D4M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Oc-IgjEwWd5OYlf3DoxqNZG6D4M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/Li7bruYzDyw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/656127778319494794/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=656127778319494794" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/656127778319494794?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/656127778319494794?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/Li7bruYzDyw/nagios-checks-for-lsi-raid-with-megacli.html" title="Nagios checks for LSI RAID with MegaCli" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/04/nagios-checks-for-lsi-raid-with-megacli.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYCSXY5eSp7ImA9WxZbEUs.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-9052820627250799081</id><published>2008-04-14T19:06:00.002+10:00</published><updated>2008-04-14T19:09:28.821+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-14T19:09:28.821+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mplayer" /><title>It is not a toy</title><content type="html">From the book "Things that work but you wouldn't have bet on before actually trying".&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_0gue5YpVahg/SAMfElcg2mI/AAAAAAAAHI4/i10kBC9SILQ/s1600-h/RAMBO3-and-mplayer.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_0gue5YpVahg/SAMfElcg2mI/AAAAAAAAHI4/i10kBC9SILQ/s400/RAMBO3-and-mplayer.png" alt="" id="BLOGGER_PHOTO_ID_5189025359292586594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;$ mplayer your_movie.iso&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-9052820627250799081?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SH3ymqUqBNuZCN4EFV4WaHXnnjY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SH3ymqUqBNuZCN4EFV4WaHXnnjY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SH3ymqUqBNuZCN4EFV4WaHXnnjY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SH3ymqUqBNuZCN4EFV4WaHXnnjY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/lZl1F1fmbl0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/9052820627250799081/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=9052820627250799081" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/9052820627250799081?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/9052820627250799081?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/lZl1F1fmbl0/it-is-not-toy.html" title="It is not a toy" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_0gue5YpVahg/SAMfElcg2mI/AAAAAAAAHI4/i10kBC9SILQ/s72-c/RAMBO3-and-mplayer.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/04/it-is-not-toy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYAQnY_eip7ImA9WxZSGU8.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-1734062022101269770</id><published>2008-01-31T10:32:00.000+11:00</published><updated>2008-02-02T13:42:23.842+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-02T13:42:23.842+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="teamsite" /><category scheme="http://www.blogger.com/atom/ns#" term="solaris" /><title>Teamsite 6.7.1 SP1 won't start</title><content type="html">After installing &lt;a href="http://www.interwoven.com/components/page.jsp?topic=PRODUCT::TEAMSITE"&gt;Teamsite&lt;/a&gt; 6.7.1 SP1 on a Solaris 10 machine I tried starting the service to check out the new version.  Sadly, the service wouldn't start, dumping a core and printing this message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[crit] file vhost.c, line 190, assertion "rv == APR_SUCCESS" failed Abort - core dumped /app/teamsite/iw-home/iw-webd/bin/iw.webd start: iwwebd could not be started&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In my case, adding "dns" to the "hosts:" line on /etc/nsswitch.conf solved the problem:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hosts:      files dns&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A little bee tells me that you can also edit /iw-webd/conf/iwwebd.conf.template and change "_default_" on the VirtualHost entry to "*":&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;VirtualHost _default_:__IWWEBD_HTTPS_PORT__&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;VirtualHost *:__IWWEBD_HTTPS_PORT__&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I didn't try it but that's also the recommendation from an &lt;a href="https://support.interwoven.com/kb/kb_show_article2.asp?ArticleID=60555"&gt;Interwoven's KB article&lt;/a&gt; (support account needed).&lt;iw-home&gt;&lt;br /&gt;&lt;virtualhost __iwwebd_https_port__=""&gt;&lt;/virtualhost&gt;&lt;/iw-home&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-1734062022101269770?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YhZFxdifcReDB4DQhjfZUs9cVaY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YhZFxdifcReDB4DQhjfZUs9cVaY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YhZFxdifcReDB4DQhjfZUs9cVaY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YhZFxdifcReDB4DQhjfZUs9cVaY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/vxxIEvUktF0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/1734062022101269770/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=1734062022101269770" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/1734062022101269770?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/1734062022101269770?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/vxxIEvUktF0/teamsite-671-sp1-wont-start.html" title="Teamsite 6.7.1 SP1 won't start" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/01/teamsite-671-sp1-wont-start.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UBSXc8eCp7ImA9WxZSGUw.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-213730811793215965</id><published>2008-01-31T10:30:00.000+11:00</published><updated>2008-02-02T13:27:38.970+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-02T13:27:38.970+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tcp_wrappers" /><category scheme="http://www.blogger.com/atom/ns#" term="netcat" /><category scheme="http://www.blogger.com/atom/ns#" term="inetd" /><category scheme="http://www.blogger.com/atom/ns#" term="solaris" /><title>TCP wrappers: refused connect from ...</title><content type="html">I've used &lt;a href="http://en.wikipedia.org/wiki/Inetd"&gt;inetd&lt;/a&gt; + &lt;a href="ftp://ftp.porcupine.org/pub/security/tcp_wrappers_7.6.BLURB"&gt;tcp wrappers&lt;/a&gt; + &lt;a href="http://m.nu/program/util/netcat/netcat.html"&gt;netcat&lt;/a&gt; a number of times for migration of TCP-based services to a new server.  It goes something like this:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Get the service running on the new box&lt;/li&gt;&lt;li&gt;Point the DNS entry (or IP address of the server on clients) to the new server&lt;/li&gt;&lt;li&gt;Stop the service on the old box&lt;/li&gt;&lt;li&gt;Enable the redirection using inetd&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;For number 4 and HTTP redirection, an entry like the one below in your /etc/inetd.conf is usually enough:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;http    stream  tcp     nowait nobody    /usr/bin/tcpd /usr/bin/netcat new-server 80&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You then leave the old server running until no more clients connect to it.  I do that by inspecting the syslog entries and looking for the netcat redirections.  Last time, however, I was seeing these:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Jan 30 14:20:04 old-box netcat[16769]: [ID 947420 mail.warning] refused connect from 189.201.77.65&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And sure enough, I started to get complaints that some clients were no longer able to connect to the service.  I had left /etc/hosts.allow empty on purpose since there was no need to restrict the service to specific hosts.&lt;br /&gt;&lt;br /&gt;After some digging through the tcp wrappers readme, I suspected that the version of tcpd on this SunOS 5.8 (Solaris 8) had been compiled with -DPARANOID.  If defined, PARANOID will cause tcpd to reject hosts whose IP address don't resolve to a name (using reverse DNS).&lt;br /&gt;&lt;br /&gt;I downloaded the &lt;a href="ftp://ftp.porcupine.org/pub/security/tcp_wrappers_7.6.tar.gz"&gt;tcp_wrappers source&lt;/a&gt;, recompiled without -DPARANOID and installed the newly compiled binary.  The refused connection entries were gone from the log and the clients confirmed they were able to reach the server once again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-213730811793215965?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tQTlvom0yOk-qwxy_FXw221j7Ew/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tQTlvom0yOk-qwxy_FXw221j7Ew/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tQTlvom0yOk-qwxy_FXw221j7Ew/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tQTlvom0yOk-qwxy_FXw221j7Ew/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/G4TYsogfr40" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/213730811793215965/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=213730811793215965" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/213730811793215965?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/213730811793215965?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/G4TYsogfr40/tcp-wrappers-refused-connect-from.html" title="TCP wrappers: refused connect from ..." /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/01/tcp-wrappers-refused-connect-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcNSHYzeip7ImA9WB9aGE4.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-1203485920998702587</id><published>2008-01-09T10:58:00.000+11:00</published><updated>2008-01-09T11:04:59.882+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-09T11:04:59.882+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows 2003" /><category scheme="http://www.blogger.com/atom/ns#" term="msmq" /><title>MSMQ error:0xc00e0027</title><content type="html">After installing windows 2003 Service Pack 2 on a production box I started getting errors 0xc00e0027 when the application tried to access the queues.  A number of related &lt;a href="http://support.microsoft.com/kb/810507"&gt;articles&lt;/a&gt; &lt;a href="http://kbalertz.com/811308/Increase-Kernel-Memory-Threshold.aspx"&gt;&lt;/a&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms811056.aspx"&gt;gave &lt;/a&gt;different &lt;a href="http://support.microsoft.com/kb/q312362/"&gt;solutions&lt;/a&gt; but what worked for me was reinstalling Message Queuing from the Control Panel.&lt;br /&gt;&lt;br /&gt;I had to re-create my queues too, since they were wiped-out when I removed the component.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-1203485920998702587?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CrHATE0Q2bmVo3dhVGOQj4c5IpY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CrHATE0Q2bmVo3dhVGOQj4c5IpY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CrHATE0Q2bmVo3dhVGOQj4c5IpY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CrHATE0Q2bmVo3dhVGOQj4c5IpY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/8PMkU5HdHFg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/1203485920998702587/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=1203485920998702587" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/1203485920998702587?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/1203485920998702587?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/8PMkU5HdHFg/msmq-error0xc00e0027.html" title="MSMQ error:0xc00e0027" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/01/msmq-error0xc00e0027.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UBQH09fyp7ImA9WB9aF0U.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-3187198817363597008</id><published>2008-01-08T20:24:00.000+11:00</published><updated>2008-01-08T20:40:51.367+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-08T20:40:51.367+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="debian" /><category scheme="http://www.blogger.com/atom/ns#" term="64bit" /><category scheme="http://www.blogger.com/atom/ns#" term="vmware" /><title>VMWare Workstation on Debian AMD64</title><content type="html">I've just upgraded to the x86_64 Debian architecture (AMD64).  When installing vmware workstation for x86_64 it complained about some missing libraries but the installation finished nevertheless.&lt;br /&gt;&lt;br /&gt;However the application would not open any VMs, spitting this error:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;/usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory&lt;/blockquote&gt;Turns out some of the VMWare binaries need 32bit libraries, even on the 64bit version.  This &lt;a href="http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&amp;amp;docType=kc&amp;amp;externalId=1793&amp;amp;sliceId=2&amp;amp;docTypeID=DT_KB_1_1&amp;amp;dialogID=39709139&amp;amp;stateId=0%200%2039705819"&gt;post on vmware's knowledge base&lt;/a&gt; gave a solution for &lt;a href="http://www.redhat.com/"&gt;Red Hat&lt;/a&gt; distros.  On &lt;a href="http://www.debian.org/"&gt;Debian&lt;/a&gt; the solution is analogous: you just need to install the package &lt;a href="http://packages.debian.org/stable/libs/ia32-libs"&gt;ia32-libs&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You will need to re-install VMWare so that it regenerates the vmmon kernel module.  The &lt;a href="http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz"&gt;vmware-any-any patch&lt;/a&gt; is not needed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-3187198817363597008?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wNfMlYxZ4q2QSg0NJHr91FL7irw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wNfMlYxZ4q2QSg0NJHr91FL7irw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wNfMlYxZ4q2QSg0NJHr91FL7irw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wNfMlYxZ4q2QSg0NJHr91FL7irw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/WaccZxNZSnU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/3187198817363597008/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=3187198817363597008" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/3187198817363597008?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/3187198817363597008?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/WaccZxNZSnU/vmware-workstation-on-debian-amd64.html" title="VMWare Workstation on Debian AMD64" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/01/vmware-workstation-on-debian-amd64.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8AQH8yfCp7ImA9WB9aFkg.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-3136165247308011421</id><published>2008-01-07T08:15:00.000+11:00</published><updated>2008-01-07T08:27:21.194+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-07T08:27:21.194+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="hardware" /><title>Broadcom 4311 on Linux</title><content type="html">The &lt;a href="http://www.dell.com/content/products/category.aspx/inspnnb?c=us&amp;amp;cs=19&amp;amp;l=en&amp;amp;s=dhs&amp;amp;redirect=1"&gt;Dell Inspiron 1501&lt;/a&gt; I bought after seeing the ad on TV nearly a year ago is a good bang for your buck, except when it comes to the wireless card shipped with this notebook.&lt;br /&gt;&lt;br /&gt;Because of the efforts of the &lt;a href="http://ndiswrapper.sourceforge.net/joomla/"&gt;ndiswrapper&lt;/a&gt; and &lt;a href="http://bcm43xx.berlios.de/"&gt;bcm43xx&lt;/a&gt; developers I managed to use the wi-fi card until I started using the &lt;a href="http://www.debian.org/ports/amd64/"&gt;AMD64 binaries&lt;/a&gt; for &lt;a href="http://www.debian.org/"&gt;Debian&lt;/a&gt; Etch.&lt;br /&gt;&lt;br /&gt;If you are buying a notebook and plan to use Linux in it, &lt;a href="http://ubuntuforums.org/showthread.php?t=25683"&gt;stay away from the Broadcom wireless cards&lt;/a&gt; or any other cards that require loading a firmware at run-time.&lt;br /&gt;&lt;br /&gt;I got tired of struggling and I'm now waiting for my Intel 2915ABG mini-pci card to arrive in the mail.  Hardware is too cheap nowadays to justify wasting my time getting a vendor to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-3136165247308011421?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-XcqF4q0bNsapVDdDMjWnXYAmXM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-XcqF4q0bNsapVDdDMjWnXYAmXM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-XcqF4q0bNsapVDdDMjWnXYAmXM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-XcqF4q0bNsapVDdDMjWnXYAmXM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/qRd2t5hziXM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/3136165247308011421/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=3136165247308011421" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/3136165247308011421?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/3136165247308011421?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/qRd2t5hziXM/broadcom-4311-on-linux.html" title="Broadcom 4311 on Linux" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2008/01/broadcom-4311-on-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UDQ306eip7ImA9WB9VEEo.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-5419331211381226784</id><published>2007-11-26T21:33:00.000+11:00</published><updated>2007-11-26T22:07:52.312+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-26T22:07:52.312+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DNS" /><category scheme="http://www.blogger.com/atom/ns#" term="nagios" /><category scheme="http://www.blogger.com/atom/ns#" term="hack" /><title>Checking your round-robin DNS with nagios</title><content type="html">&lt;a href="http://www.nagios.org/"&gt;Nagios&lt;/a&gt; comes with a &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=29880&amp;amp;package_id=21883"&gt;plugin&lt;/a&gt;, &lt;a href="http://nagiosplugins.org/man/check_dns"&gt;check_dns&lt;/a&gt;, that allows you to perform DNS-based checks.  It is really useful to check that your DNS server is responding and, with option switch "-a", that it is providing the expected IP address to specified queries.&lt;br /&gt;&lt;pre&gt;$ ./check_dns -H example.com.au -a 1.2.3.4&lt;br /&gt;DNS OK: 0.157 seconds response time. example.com.au returns 1.2.3.4|time=0.157327s;;;0.000000&lt;/pre&gt;If your host name has more than one IP address associated with it - no problem -, just add it to the command line.  For example:&lt;br /&gt;&lt;pre&gt;./check_dns -H example.com.au -a 1.2.3.4,9.8.7.6&lt;br /&gt;DNS OK: 0.157 seconds response time. example.com.au returns 1.2.3.4,9.8.7.6|time=0.157327s;;;0.000000&lt;/pre&gt;However, if your host name is using a round-robin DNS configuration you can't predict the response reliably.  Try google.com.au, for instance.&lt;br /&gt;&lt;pre&gt;$ dig google.com.au&lt;br /&gt;;; ANSWER SECTION:&lt;br /&gt;google.com.au.          230     IN      A       72.14.235.104&lt;br /&gt;google.com.au.          230     IN      A       72.14.207.104&lt;br /&gt;google.com.au.          230     IN      A       72.14.203.104&lt;/pre&gt;&lt;br /&gt;Then check_dns will only work 1/3 of the time:&lt;br /&gt;&lt;pre&gt;./check_dns -H google.com.au -a 72.14.235.104,72.14.207.104,72.14.203.104&lt;br /&gt;DNS OK: 0.035 seconds response time. google.com.au returns 72.14.235.104,72.14.207.104,72.14.203.104|time=0.035388s;;;0.000000&lt;/pre&gt;The other 2/3 you will see:&lt;br /&gt;&lt;pre&gt;$ ./check_dns -H google.com.au -a 72.14.235.104,72.14.207.104,72.14.203.104&lt;br /&gt;DNS CRITICAL - expected '72.14.235.104,72.14.207.104,72.14.203.104' but got '72.14.203.104,72.14.235.104,72.14.207.104'&lt;/pre&gt;I thought that really sucked because it stopped me from using this very nice feature of check_dns.  So I patched check_dns.c in Nagios Plugins 1.4.10 to include the command line option "-o".  When you specify this option, check_dns will sort the DNS response so you can still use -a.&lt;br /&gt;&lt;pre&gt;$ ./check_dns -H google.com.au -o -a 72.14.203.104,72.14.207.104,72.14.235.104&lt;br /&gt;DNS OK: 0.112 seconds response time. google.com.au returns 72.14.203.104,72.14.207.104,72.14.235.104|time=0.111538s;;;0.000000&lt;/pre&gt;I've sent the patch to the Nagios developers list - hopefully it will get incorporated into future releases.  If not, you can download the &lt;a href="http://tcs.eng.br/rants/check_dns.c.patch"&gt;patch here&lt;/a&gt; and the &lt;a href="http://tcs.eng.br/rants/check_dns.c"&gt;patched source here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-5419331211381226784?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OABocrNhQVTrRoRt996WisNxZ04/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OABocrNhQVTrRoRt996WisNxZ04/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OABocrNhQVTrRoRt996WisNxZ04/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OABocrNhQVTrRoRt996WisNxZ04/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/QWHDYcAdO8o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/5419331211381226784/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=5419331211381226784" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/5419331211381226784?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/5419331211381226784?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/QWHDYcAdO8o/checking-your-round-robin-dns-with.html" title="Checking your round-robin DNS with nagios" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://microrants.blogspot.com/2007/11/checking-your-round-robin-dns-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkANQ3szfip7ImA9WB9WGUs.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-6816039986572903408</id><published>2007-11-25T16:31:00.000+11:00</published><updated>2007-11-25T16:33:12.586+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-25T16:33:12.586+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rant" /><category scheme="http://www.blogger.com/atom/ns#" term="snakeoil" /><title>Think your secure email provider keeps your secrets?</title><content type="html">&lt;a href="http://blog.wired.com/27bstroke6/2007/11/encrypted-e-mai.html"&gt;Think again&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-6816039986572903408?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oDuv7n1pYNJOgfcP6d3MBsr_ISc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oDuv7n1pYNJOgfcP6d3MBsr_ISc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oDuv7n1pYNJOgfcP6d3MBsr_ISc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oDuv7n1pYNJOgfcP6d3MBsr_ISc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/4Im-kOQ2YCE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/6816039986572903408/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=6816039986572903408" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6816039986572903408?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/6816039986572903408?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/4Im-kOQ2YCE/think-your-secure-email-provider-keeps.html" title="Think your secure email provider keeps your secrets?" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2007/11/think-your-secure-email-provider-keeps.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UHSH8-fip7ImA9WB9WFk8.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-458581948286879234</id><published>2007-11-21T18:03:00.000+11:00</published><updated>2007-11-21T18:13:59.156+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-21T18:13:59.156+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="solaris" /><category scheme="http://www.blogger.com/atom/ns#" term="crontab" /><title>"Bad user" on Solaris 10 crontab</title><content type="html">An account used for an application could not run its cron jobs.  In /var/cron/log all I could see was:&lt;br /&gt;&lt;p style="font-family: courier new;"&gt;! bad user (wondapp) Tue Nov 13 03:23:00 2007&lt;/p&gt;I checked /etc/cron.allow (which didn't exist) and the user's shell in /etc/passwd but the problem turned out to be in /etc/shadow.  The user was listed as:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;wondapp:*LK*:::::::&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This was because a password was never set for it.  I just edited it to read:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;wondapp:NP:::::::&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Which still doesn't make a valid password but doesn't lock-out the account either.  Cron jobs for wondapp work now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-458581948286879234?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/R8iGwkHlrTjFQXksdeDkBtlI5r0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R8iGwkHlrTjFQXksdeDkBtlI5r0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/R8iGwkHlrTjFQXksdeDkBtlI5r0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R8iGwkHlrTjFQXksdeDkBtlI5r0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/saL4o6a64s4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/458581948286879234/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=458581948286879234" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/458581948286879234?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/458581948286879234?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/saL4o6a64s4/bad-user-on-solaris-10-crontab.html" title="&quot;Bad user&quot; on Solaris 10 crontab" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://microrants.blogspot.com/2007/11/bad-user-on-solaris-10-crontab.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUBRHwzfCp7ImA9WB9XGEg.&quot;"><id>tag:blogger.com,1999:blog-8098276.post-5418762605347796639</id><published>2007-11-12T18:40:00.000+11:00</published><updated>2007-11-12T18:57:35.284+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-12T18:57:35.284+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="nagios" /><title>Nagios check_http SSL check</title><content type="html">Nagios plugin check_http has a &lt;span style="font-style: italic;"&gt;-C&lt;/span&gt; option that allows you to be warned when the SSL certificate is about to expire.  It always annoyed me, however, that the expiry date was printed in crazy-ass US date format (which doesn't make any sense).&lt;br /&gt;&lt;br /&gt;I've altered the source code so that it prints the expiry date in human readable format.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_0gue5YpVahg/RzgFqDj0_7I/AAAAAAAAGv8/droLwN0b4j4/s1600-h/nagios-certificate-human-time.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_0gue5YpVahg/RzgFqDj0_7I/AAAAAAAAGv8/droLwN0b4j4/s400/nagios-certificate-human-time.png" alt="" id="BLOGGER_PHOTO_ID_5131857995456905138" border="0" /&gt;&lt;/a&gt;The changes were made to file plugins_sslutils.c.  You can download a &lt;a href="http://www.tcs.eng.br/rants/human_time-sslutils.patch"&gt;patch for version 1.4.10 here&lt;/a&gt;.  Or just &lt;a href="http://www.tcs.eng.br/rants/sslutils.c"&gt;download the changed file&lt;/a&gt;; it might work for other versions too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8098276-5418762605347796639?l=microrants.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VouyLO0cGtAgA_fT0W7GSet3cBs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VouyLO0cGtAgA_fT0W7GSet3cBs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VouyLO0cGtAgA_fT0W7GSet3cBs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VouyLO0cGtAgA_fT0W7GSet3cBs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RantsOnTechnology/~4/_9A3sGV_xlA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://microrants.blogspot.com/feeds/5418762605347796639/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8098276&amp;postID=5418762605347796639" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/5418762605347796639?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8098276/posts/default/5418762605347796639?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RantsOnTechnology/~3/_9A3sGV_xlA/nagios-checkhttp-ssl-check.html" title="Nagios check_http SSL check" /><author><name>XCondE</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="26" height="32" src="http://www.rossanthony.com/C/images/crocdd.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_0gue5YpVahg/RzgFqDj0_7I/AAAAAAAAGv8/droLwN0b4j4/s72-c/nagios-certificate-human-time.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://microrants.blogspot.com/2007/11/nagios-checkhttp-ssl-check.html</feedburner:origLink></entry></feed>

