<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8098276</id><updated>2026-08-21T20:58:40.052+10:00</updated><category term="linux"/><category term="hack"/><category term="rant"/><category term="solaris"/><category term="Windows 2003"/><category term="hardware"/><category term="Windows"/><category term="debian"/><category term="nagios"/><category term="rsync"/><category term="CruiseControl"/><category term="NTP"/><category term="apache"/><category term="apc"/><category term="crontab"/><category term="java"/><category term="notebook"/><category term="perl"/><category term="powerchute"/><category term="red hat"/><category term="snakeoil"/><category term="ubuntu"/><category term="ups"/><category term="varnish"/><category term=".net"/><category term="301"/><category term="403"/><category term="404"/><category term="64bit"/><category term="DNS"/><category term="HTTP"/><category term="NTFS"/><category term="W32Time"/><category term="X-Forwarded-Host"/><category term="asp.net"/><category term="break"/><category term="brightness"/><category term="bug"/><category term="cisco vpn"/><category term="cpan"/><category term="database"/><category term="disk"/><category term="dvb"/><category term="excel"/><category term="filesystem"/><category term="flock"/><category term="foundry"/><category term="gnome"/><category term="gnuplot"/><category term="https"/><category term="iis"/><category term="inetd"/><category term="init"/><category term="kernel"/><category term="kvm"/><category term="lcd"/><category term="linux printer driver hack"/><category term="mediawiki"/><category term="misleading"/><category term="mongrel"/><category term="mouse"/><category term="mplayer"/><category term="msmq"/><category term="mysql"/><category term="mythtv"/><category term="mythtv mytharchive DVD"/><category term="netcat"/><category term="network"/><category term="nut"/><category term="partimage"/><category term="port"/><category term="power"/><category term="price"/><category term="raid"/><category term="recovery"/><category term="redirect"/><category term="rhn"/><category term="robocopy"/><category term="script"/><category term="serveriron"/><category term="service"/><category term="snmp"/><category term="spam"/><category term="ssh"/><category term="sun"/><category term="support"/><category term="synctoy"/><category term="tcp_wrappers"/><category term="teamsite"/><category term="tshark"/><category term="varnish ttl content freshness"/><category term="video"/><category term="vmware"/><category term="vpn"/><category term="watchguard muvpn"/><category term="xorg"/><category term="yum"/><title type='text'>Rants on technology</title><subtitle type='html'>Did it help? Got a better idea? leave a comment!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://microrants.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.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'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>70</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8098276.post-8927845559451231689</id><published>2017-03-04T18:25:00.000+11:00</published><updated>2017-03-04T18:25:32.600+11:00</updated><title type='text'>Ubuntu xenial64 on Vagrant</title><content type='html'>If you are getting errors similar to the ones below:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

hostname -f

Stdout from the command:

Stderr from the command:

sudo: unable to resolve host ubuntu-xenial
mesg: ttyname failed: Inappropriate ioctl for device
hostname: Name or service not known
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem &quot;vboxsf&quot; is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000 v-csc-78dab358b /tmp/vagrant-chef/1d140fd50fa8a0774caff0f697e00977/cookbooks

The error output from the command was:

mount: unknown filesystem type &#39;vboxsf&#39;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
And keep finding google results for these threads:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/mitchellh/vagrant/issues/6769&quot;&gt;https://github.com/mitchellh/vagrant/issues/6769&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugs.launchpad.net/cloud-images/+bug/1568447&quot;&gt;https://bugs.launchpad.net/cloud-images/+bug/1568447&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://askubuntu.com/questions/760871/network-settings-fail-for-ubuntu-xenial64-vagrant-box&quot;&gt;https://askubuntu.com/questions/760871/network-settings-fail-for-ubuntu-xenial64-vagrant-box&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/mitchellh/vagrant/issues/7155&quot;&gt;https://github.com/mitchellh/vagrant/issues/7155&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/mitchellh/vagrant/pull/7318&quot;&gt;https://github.com/mitchellh/vagrant/pull/7318&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Here&#39;s a TLDR of what you probably need to do:&lt;br /&gt;
&lt;br /&gt;
1. Upgrade Vagrant to at least 1.9.2.&lt;br /&gt;
2. Install vagrant-vbguest.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;vagrant plugin vagrant-vbguest
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://microrants.blogspot.com/feeds/8927845559451231689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8098276/8927845559451231689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/8927845559451231689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/8927845559451231689'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2017/03/ubuntu-xenial64-on-vagrant.html' title='Ubuntu xenial64 on Vagrant'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8098276.post-3848822754545263418</id><published>2013-10-17T00:57:00.003+11:00</published><updated>2013-10-17T00:58:32.130+11:00</updated><title type='text'>Can&#39;t flush bind cache due to rndc: connect failed </title><content type='html'>I couldn&#39;t find a solution for this in the googles:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ sudo rndc flushname somedomain.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rndc: connect failed: 127.0.0.1#953: connection refused&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Another symptom:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ sudo service named restart&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Stopping named: . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ &amp;nbsp;OK &amp;nbsp;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mount: block device /etc/rndc.key is write-protected, mounting read-only&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mount: cannot mount block device /etc/rndc.key read-only&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Starting named: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ &amp;nbsp;OK &amp;nbsp;]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The setup:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ cat /etc/redhat-release&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Red Hat Enterprise Linux Server release 6.4 (Santiago)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ rpm -q bind&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;bind-9.8.2-0.17.rc1.el6_4.6.x86_64&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The fix:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# cd /var/named/chroot/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# cp /etc/rndc.key .&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cp: overwrite `./rndc.key&#39;? y&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# /etc/init.d/named restart&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# logout&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ sudo rndc flushname somedomain.com&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://microrants.blogspot.com/feeds/3848822754545263418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8098276/3848822754545263418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/3848822754545263418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/3848822754545263418'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2013/10/i-couldnt-find-solution-for-this-in.html' title='Can&#39;t flush bind cache due to rndc: connect failed '/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8098276.post-1333876516208888260</id><published>2012-11-23T08:07:00.005+11:00</published><updated>2012-11-23T08:07:58.462+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux printer driver hack"/><title type='text'>Linux driver file (PPD) for Fuji Xerox printers</title><content type='html'>The cheapskates at FX don&#39;t provide PPDs for Linux, even though they are the same as the MacOS files.&lt;br /&gt;
&lt;br /&gt;
Now, opening apple&#39;s *.dmg files is&amp;nbsp;surprisingly&amp;nbsp;convoluted. &amp;nbsp;Here&#39;s a step-by-step guide to, hopefully, save you some time.&lt;br /&gt;
&lt;br /&gt;
1. Download the &lt;a href=&quot;http://onlinesupport.fujixerox.com/driver_downloads/fxmacprnps1208am105iml.dmg&quot;&gt;MacOS ApeosPort IV drivers&lt;/a&gt; from &lt;a href=&quot;http://onlinesupport.fujixerox.com/processDriverForm.do?ctry_code=NZ&amp;amp;lang_code=en&amp;amp;d_lang=en&amp;amp;corp_pid=APIVC7780&amp;amp;rts=null&amp;amp;model=ApeosPort-IV+C7780&amp;amp;type_id=2&amp;amp;oslist=Mac+OS+X+10.8&amp;amp;lang_list=en&amp;amp;search_btn.x=41&amp;amp;search_btn.y=12&quot;&gt;Fuji Xerox&#39;s site&lt;/a&gt;.&lt;br /&gt;
2. Download &lt;a href=&quot;http://vu1tur.eu.org/tools/&quot;&gt;dmg2img&lt;/a&gt; (I downloaded the&amp;nbsp;&lt;a href=&quot;http://vu1tur.eu.org/tools/dmg2img-1.6.4.tar.gz&quot;&gt;source code for dmg2img&lt;/a&gt;&amp;nbsp;and ran `make&#39; - you guys rock!).&lt;br /&gt;
3. Convert the dmg file into an image:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;./dmg2img ~/Downloads/fxmacprnps1208am105iml.dmg /tmp/out.img&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
4. Mount the obtained image:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo mount &amp;nbsp;-o loop /tmp/out.img /mnt/iso/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
5. Use xar (yum install xar) to extract the pkg file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cp /mnt/iso/Fuji\ Xerox\ PS\ Plug-in\ Installer.pkg /tmp/&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cd /tmp &amp;amp;&amp;amp; mkdir fx &amp;amp;&amp;amp; cd fx&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;xar -xf ../Fuji\ Xerox\ PS\ Plug-in\ Installer.pkg&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
6. Inside the extracted folders, locate and copy the Payload file with the PPDs:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cp ppd.pkg/Payload /tmp/Payload.cpio.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
7. Gunzip the file and extract the cpio archive:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cd /tmp&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;gunzip Payload.cpio.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mkdir ppd &amp;amp;&amp;amp; cd /tmp/ppd&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cpio -id &amp;lt; ../Payload.cpio&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
8. Voilà! your PPD files are in&amp;nbsp;Library/Printers/PPDs/Contents/Resources/:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ls&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Fuji Xerox 4112 PS.gz &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FX ApeosPort-IV C4475 PS.gz &amp;nbsp; &amp;nbsp; FX DocuCentre-IV 7080 PS.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Fuji Xerox 4127 PS.gz &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FX ApeosPort-IV C5570 PS.gz &amp;nbsp; &amp;nbsp; FX DocuCentre-IV C2260 PS.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Fuji Xerox D110 PS.gz &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FX ApeosPort-IV C5575 PS.gz &amp;nbsp; &amp;nbsp; FX DocuCentre-IV C2263 PS.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Fuji Xerox D125 PS.gz &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FX ApeosPort-IV C5580 PS.gz &amp;nbsp; &amp;nbsp; FX DocuCentre-IV C2265 PS.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Fuji Xerox D95 PS.gz &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FX ApeosPort-IV C6680 PS.gz &amp;nbsp; &amp;nbsp; FX DocuCentre-IV C2270 PS.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FX ApeosPort 350 I &amp;nbsp;PS B.gz &amp;nbsp; &amp;nbsp;FX ApeosPort-IV C7780 PS.gz &amp;nbsp; &amp;nbsp; FX DocuCentre-IV C2275 PS.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FX ApeosPort 350 I &amp;nbsp;PS.gz &amp;nbsp; &amp;nbsp; &amp;nbsp;FX DocuCentre 450 I &amp;nbsp;PS B.gz &amp;nbsp; &amp;nbsp;FX DocuCentre-IV C3370 PS.gz&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;(...)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Enjoy.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://microrants.blogspot.com/feeds/1333876516208888260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8098276/1333876516208888260' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/1333876516208888260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/1333876516208888260'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2012/11/linux-driver-file-ppd-for-fuji-xerox.html' title='Linux driver file (PPD) for Fuji Xerox printers'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8098276.post-8839908202749682270</id><published>2012-11-08T08:26:00.007+11:00</published><updated>2012-11-08T08:26:49.301+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="301"/><category scheme="http://www.blogger.com/atom/ns#" term="https"/><category scheme="http://www.blogger.com/atom/ns#" term="redirect"/><category scheme="http://www.blogger.com/atom/ns#" term="varnish"/><title type='text'>Caching 301 redirects in Varnish while keeping the protocol</title><content type='html'>I have noticed a drop in our &lt;a href=&quot;https://www.varnish-cache.org/&quot;&gt;Varnish&lt;/a&gt; cache hit ratio and, upon investigation, found that the backend was not allowing 301 redirects to be cached:&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Client request:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;42 RxRequest &amp;nbsp; &amp;nbsp;c GET&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;42 RxURL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c /img_resized/au/images/gifts/2012/hero/christmas-homepage-hero-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;42 RxProtocol &amp;nbsp; c HTTP/1.1&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Backend request:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;21 TxRequest &amp;nbsp; &amp;nbsp;b GET&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;21 TxURL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b /img_resized/au/images/gifts/2012/hero/christmas-homepage-hero-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;21 TxProtocol &amp;nbsp; b HTTP/1.1&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Backend response:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;21 RxHeader &amp;nbsp; &amp;nbsp; b Cache-Control: no-cache&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;21 RxHeader &amp;nbsp; &amp;nbsp; b Location: http://static.example.com/img/au/images/gifts/2012/hero/christmas-homepage-hero-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;21 RxHeader &amp;nbsp; &amp;nbsp; b Status: 301&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I logged a bug for the application to be fixed and, in the meantime, added a VCL snippet to override the backend headers:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # WSF-xxxx: App is not allowing redirects to be cached&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((req.http.Host == &quot;static.example.com&quot;) &amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(beresp.status == 301) &amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(beresp.http.Cache-Control ~ &quot;no-cache&quot;)) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set beresp.http.Cache-Control = &quot;public, max-age=604800&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There&#39;s a catch though. &amp;nbsp;We do SSL offloading for &lt;i&gt;static.example.com&lt;/i&gt;&amp;nbsp;in our F5 BigIP LTM load balancer. &amp;nbsp;In other words, the load balancer receives a https request and, in turn, makes a http request to Varnish.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As Varnish doesn&#39;t support SSL natively it is unaware of the protocol (http or https) being used; thus, the requests below get cached with the first answer it sees:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
HTTP request&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;curl -I http://static.example.com/img/au/images/gifts/2012/hero/christmas-homepage-hero-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;(...)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;HTTP/1.1 301 Moved Permanently&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Location: http://static.example.com/img/au/images/gifts/2012/rectangle-75-58/christmas-promo-tile-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
HTTPS request&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;curl -I https://static.example.com/img/au/images/gifts/2012/hero/christmas-homepage-hero-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;(...)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;HTTP/1.1 301 Moved Permanently&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Location: http://static.example.com/img/au/images/gifts/2012/rectangle-75-58/christmas-promo-tile-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Notice that the HTTPS request was redirected to a HTTP URL. &amp;nbsp;This will most certainly cause issues, including &lt;a href=&quot;http://arstechnica.com/business/2011/03/https-is-great-here-is-why-everyone-needs-to-use-it-so-ars-can-too/&quot;&gt;mixed-mode SSL alerts&lt;/a&gt; in some browsers.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Our backend is a Ruby on Rails application and, to my surprise, it understands the &lt;a href=&quot;http://stackoverflow.com/questions/5741210/handling-x-forwarded-proto-in-java-apache-tomcat&quot;&gt;X-Forwarded-Proto HTTP header&lt;/a&gt;. &amp;nbsp;This means that the application will use the value of X-Forwarded-Proto to build the URL in the Location header.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I improved the F5 iRule by instructing the load balancer to insert a X-Forwarded-Proto header in HTTPS requests which were being off-loaded to Varnish:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;when HTTP_REQUEST {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; HTTP::header replace X-Forwarded-Proto &quot;https&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In addition to this, I also had to instruct Varnish to use the X-Forwarded-Proto header in the &lt;a href=&quot;http://swearingatcomputers.blogspot.com.au/2011/05/complete-drupal-cache-serving-http-and.html&quot;&gt;cache hash&lt;/a&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;sub vcl_hash {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (req.http.X-Forwarded-Proto) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;set req.hash += req.http.X-Forwarded-Proto;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With these tweaks Varnish is now able to account for SSL offloading and correctly serve the appropriate cached version of a page. &amp;nbsp;An improvement on this configuration would be to only use X-Forwarded-Proto in the hash if the response is a redirect; at the moment I can&#39;t be bothered that Varnish is caching objects twice.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
HTTP request&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;$curl -I http://static.example.com/img_resized/au/images/gifts/2012/rectangle-75-58/christmas-promo-tile-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;HTTP/1.1 301 Moved Permanently&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Location: http://static.example.com/img/au/images/gifts/2012/rectangle-75-58/christmas-promo-tile-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
HTTPS request&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;$curl -I https://static.example.com/img_resized/au/images/gifts/2012/rectangle-75-58/christmas-promo-tile-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;HTTP/1.1 301 Moved Permanently&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Location: https://static.example.com/img/au/images/gifts/2012/rectangle-75-58/christmas-promo-tile-alyce.jpg&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://microrants.blogspot.com/feeds/8839908202749682270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8098276/8839908202749682270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/8839908202749682270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/8839908202749682270'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2012/11/caching-301-redirects-in-varnish-while.html' title='Caching 301 redirects in Varnish while keeping the protocol'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8098276.post-8025034642501736986</id><published>2012-03-10T09:26:00.000+11:00</published><updated>2012-03-11T07:23:11.733+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="varnish ttl content freshness"/><title type='text'>Using varnish to increase the cache time of slow pages</title><content type='html'>If you are having trouble getting your organisation to accept &lt;a href=&quot;https://duckduckgo.com/?q=performance+is+a+feature&quot;&gt;performance as a feature&lt;/a&gt;, one solution is to tie it to another feature.&lt;br /&gt;
&lt;br /&gt;
A common discussion between content owners (&quot;the business&quot;) and web operators is how long to cache pages for. &amp;nbsp;The content owners want to see their fresh content in minimal time but web operators want to cache expensive (to generate) content longer.&lt;br /&gt;
&lt;br /&gt;
Usually content owners get their way, as they should, or you wouldn&#39;t have a business. &amp;nbsp;So you set the default cache time on all pages to something low, like 10 minutes. &amp;nbsp;If you are not quite ready to take the &lt;a href=&quot;http://esi-examples.akamai.com/viewsource/expires.html&quot;&gt;ESI &lt;/a&gt;leap, an attractive compromise is to penalise only expensive pages with a higher expiry time.&lt;br /&gt;
&lt;br /&gt;
If your server backend runs on Ruby-On-Rails, the job is already half-done since requests return a X-Runtime HTTP header indicating, in&amp;nbsp;milliseconds, how long it took RoR to generate the page. &amp;nbsp;This header is either available in most web frameworks or would be quite easy to implement.&lt;br /&gt;
&lt;br /&gt;
We use the VCL code below to override the internal varnish TTL for slow-to-generate pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# VCL 2.1.5 to extend TTL on pages which take 1s or longer to generate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if (beresp.http.X-Runtime ~ &quot;[0-9]{4,}&quot;) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; if (beresp.ttl &amp;lt; 1d) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set beresp.ttl = 1d;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set beresp.http.X-Cache-Override = &quot;1d&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We choose not to modify the original headers, which are sent to the client, because this gives you the opportunity to keep or ban the content from Varnish while letting the browsers come back to ask for the &quot;new&quot; content.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
The code also sets a &quot;X-Cache-Override&quot; header so you can tell which pages are taking 1 second or more to generate.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is great because now, when someone complains that their content isn’t refreshing, we can improve performance to areas of the site that matter to the business instead of the whole “make the site faster” approach.&lt;br /&gt;
&lt;br /&gt;
The results will come quickly. &amp;nbsp;Two days after putting this in production Google has shown that the average page load time in our (very large) site dropped half a second. As you can see in the graph below, the trend is still going down (click on the image).&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZlQ48yLPKEpIOcNQOnF71f8OnUBl-dEH-JJow_ICtQ_SQxHtJtVyGLHv_5BNkfFDhXGaBtqMDVUGUZtl2491LPsLNxB5Jf9JvE566awdTHXvujS5dQm2PscGkGDKWeaBpFROrXw/s1600/gwt-speed.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;89&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZlQ48yLPKEpIOcNQOnF71f8OnUBl-dEH-JJow_ICtQ_SQxHtJtVyGLHv_5BNkfFDhXGaBtqMDVUGUZtl2491LPsLNxB5Jf9JvE566awdTHXvujS5dQm2PscGkGDKWeaBpFROrXw/s200/gwt-speed.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Site speed improvement as perceived by the Google bot&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
A further improvement to this would be to write an algorithm which sets the TTL based on the page generation time. &amp;nbsp;For example, add 1 day to the TTL for each second it takes the page to generate so if a page takes 5 seconds to generate, keep it for 5 days.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://microrants.blogspot.com/feeds/8025034642501736986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8098276/8025034642501736986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/8025034642501736986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/8025034642501736986'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2012/03/using-varnish-to-increase-cache-time-of.html' title='Using varnish to increase the cache time of slow pages'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZlQ48yLPKEpIOcNQOnF71f8OnUBl-dEH-JJow_ICtQ_SQxHtJtVyGLHv_5BNkfFDhXGaBtqMDVUGUZtl2491LPsLNxB5Jf9JvE566awdTHXvujS5dQm2PscGkGDKWeaBpFROrXw/s72-c/gwt-speed.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="kernel"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="varnish"/><title type='text'>Varnish and the Linux IO bottleneck</title><content type='html'>&lt;div&gt;There are 2 main ways &lt;a href=&quot;http://varnish-cache.org/&quot;&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=&quot;http://kristian.blog.linpro.no/&quot;&gt;Kristian&lt;/a&gt; explains in a &lt;a href=&quot;http://kristian.blog.linpro.no/2010/01/26/varnish-best-practices/&quot;&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&#39;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&#39;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&#39;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=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&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=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&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=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&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&#39;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&#39; 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=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt; /proc/sys/vm/dirty_writeback_centisecs &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt; /proc/sys/vm/dirty_ratio&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&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&#39;ed files:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&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&#39;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&#39;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;</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/fullpage/post/8098276/4130102707898382270' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/4130102707898382270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/4130102707898382270'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2010/07/varnish-and-linux-io-bottleneck.html' title='Varnish and the Linux IO bottleneck'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>1</thr:total></entry><entry><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><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="java"/><category scheme="http://www.blogger.com/atom/ns#" term="X-Forwarded-Host"/><title type='text'>CruiseControl, ProxyPass</title><content type='html'>Dear blog, today I submitted &lt;a href=&quot;http://jira.public.thoughtworks.org/browse/CC-984&quot;&gt;a patch for CruiseControl&lt;/a&gt;.  It feels great to give something back (even if it&#39;s half-baked).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I couldn&#39;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=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&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=&quot;http://jira.public.thoughtworks.org/browse/CC-984&quot;&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;</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/fullpage/post/8098276/3741244425994084566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/3741244425994084566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/3741244425994084566'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2010/04/cruisecontrol-proxypass.html' title='CruiseControl, ProxyPass'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><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><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 type='text'>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 &quot;Why bother? Disk space is cheap!&quot;&lt;br /&gt;&lt;br /&gt;This is a myth I intend to destroy in this post.  It is true that &lt;a href=&quot;http://www.alts.net/ns1625/winchest.html&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://www.mattscomputertrends.com/harddrives.html&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 400px; height: 165px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCV1qTLMW6I5vw1Famli-v0t9s8ryCpq63dsPq2iBYy9wyU-oKRcsetCHa0Z424dcOBxyrSF-X9Vr7mnpgy23Kk4QbWW__GKufzJtOBprCiP3JKYkNWBPGZhtedtzXtRKrl8AfQ/s400/hard-disk_cost_improvement.gif&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5427106402425710770&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I&#39;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=&quot;http://www.megaware.com.au/index.php?main_page=product_info&amp;amp;products_id=94929&amp;amp;zenid=c03bdeee8414c97d8b6474387d1d68da&quot;&gt;WD15EADS&lt;/a&gt;)&lt;br /&gt;Enterprise: 300GB SCSI 15krpm A$489 A$1.630/GB (&lt;a href=&quot;http://www.penta.com.au/template.php?seqid=33759&quot;&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 &quot;disk space is cheap&quot; 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=&quot;http://www.google.com.au/search?q=disk+failure+while+recovering+raid5&quot;&gt;recovery time for today&#39;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=&quot;http://www.stonebridgecomputing.com.au/catalog/sony-lto2-200gb400gb-minimum-order-quantity-p-22702.html?osCsid=4169365928888064810267e17ea2a505&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiYpppUqCYT8qZUviegSZz99MYf29fqVo9YznTLt4MUeNEKRUAB72fxst4LkE-y2ECb38_aXSH_42xGUkoYKer-YdGgSTdfHYbeHb5MY3pmKlCXSiQi0BzvLebgCqnBZJVOa_oBQ/s1600-h/backblaze-storage-pod-partially-assembled-.jpg&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 148px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiYpppUqCYT8qZUviegSZz99MYf29fqVo9YznTLt4MUeNEKRUAB72fxst4LkE-y2ECb38_aXSH_42xGUkoYKer-YdGgSTdfHYbeHb5MY3pmKlCXSiQi0BzvLebgCqnBZJVOa_oBQ/s200/backblaze-storage-pod-partially-assembled-.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5427117227408603090&quot; border=&quot;0&quot; /&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=&quot;http://blog.backblaze.com/2009/09/01/petabytes-on-a-budget-how-to-build-cheap-cloud-storage/&quot;&gt;Blackblaze&#39;s solution&lt;/a&gt; at the back.&lt;br /&gt;&lt;br /&gt;Once  we&#39;re looking for cheaper storage the &quot;disk space is cheap&quot; advocates have already lost the argument.  In case we&#39;re dealing with the stubborn kind let&#39;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&#39;ve bought 1TB of storage for $A3.26 per GB you&#39;re stuck with the entry until it&#39;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.</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/fullpage/post/8098276/5028730061082874242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/5028730061082874242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/5028730061082874242'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2010/01/fallacy-of-cheap-disk-space.html' title='The fallacy of cheap disk space'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCV1qTLMW6I5vw1Famli-v0t9s8ryCpq63dsPq2iBYy9wyU-oKRcsetCHa0Z424dcOBxyrSF-X9Vr7mnpgy23Kk4QbWW__GKufzJtOBprCiP3JKYkNWBPGZhtedtzXtRKrl8AfQ/s72-c/hard-disk_cost_improvement.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><category scheme="http://www.blogger.com/atom/ns#" term="snakeoil"/><title type='text'>Sen. Conroy and his sinister Internet filter</title><content type='html'>&lt;div&gt;&lt;object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0&quot; height=&quot;250&quot; width=&quot;300&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.getup.org.au/flash/widget.swf&quot;&gt;&lt;param name=&quot;quality&quot; value=&quot;high&quot;&gt;&lt;embed src=&quot;http://www.getup.org.au/flash/widget.swf&quot; quality=&quot;high&quot; pluginspage=&quot;http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&quot; type=&quot;application/x-shockwave-flash&quot; height=&quot;250&quot; width=&quot;300&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&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/fullpage/post/8098276/7457407905718117127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/7457407905718117127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/7457407905718117127'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2009/07/sen-conroy-and-his-sinister-internet.html' title='Sen. Conroy and his sinister Internet filter'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><category scheme="http://www.blogger.com/atom/ns#" term="filesystem"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Disk IO spikes caused by mod_proxy.c in Apache 1.3</title><content type='html'>We have been using &lt;a href=&quot;http://httpd.apache.org/docs/1.3/mod/mod_proxy.html&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTbxWkiWbClFfoRXODwGgbddQnc8AZOCb4DAzcF3GFrwrWQLIUpF50wJXRnWwC4RINn7nlZT6j8D181NiaqH9046g96YeBC4k8DMqDwGgvSxJ78E3KlIibTo27-2Z3YDbUSiFb3A/s1600-h/web-server_Load-day.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 161px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTbxWkiWbClFfoRXODwGgbddQnc8AZOCb4DAzcF3GFrwrWQLIUpF50wJXRnWwC4RINn7nlZT6j8D181NiaqH9046g96YeBC4k8DMqDwGgvSxJ78E3KlIibTo27-2Z3YDbUSiFb3A/s400/web-server_Load-day.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5350026163344607058&quot; border=&quot;0&quot; /&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 &quot;wa&quot; (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=&quot;font-style: italic;&quot;&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=&quot;font-style: italic;&quot;&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=&quot;font-style: italic;&quot;&gt;noatime&lt;/span&gt; and &lt;span style=&quot;font-style: italic;&quot;&gt;nodiratime&lt;/span&gt; every file and directory read meant a disk write to update the access time.  Since we don&#39;t have a use for access times in /var I did away with them.&lt;br /&gt;&lt;br /&gt;With &lt;span style=&quot;font-style: italic;&quot;&gt;tune2fs&lt;/span&gt; I change the &lt;span style=&quot;font-style: italic;&quot;&gt;data&lt;/span&gt; option from the default (&lt;span style=&quot;font-style: italic;&quot;&gt;ordered&lt;/span&gt;) to &lt;span style=&quot;font-style: italic;&quot;&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.</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/fullpage/post/8098276/7085189484431095604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/7085189484431095604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/7085189484431095604'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2009/06/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><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTbxWkiWbClFfoRXODwGgbddQnc8AZOCb4DAzcF3GFrwrWQLIUpF50wJXRnWwC4RINn7nlZT6j8D181NiaqH9046g96YeBC4k8DMqDwGgvSxJ78E3KlIibTo27-2Z3YDbUSiFb3A/s72-c/web-server_Load-day.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><category scheme="http://www.blogger.com/atom/ns#" term="bug"/><category scheme="http://www.blogger.com/atom/ns#" term="hack"/><title type='text'>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&#39;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=&quot;font-family:courier new;&quot;&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=&quot;font-family:courier new;&quot;&gt;HostnameLookups Off&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A colleague suggested it could be our &lt;a href=&quot;http://httpd.apache.org/docs/1.3/mod/mod_log_config.html#logformat&quot;&gt;LogFormat&lt;/a&gt; configuration:&lt;br /&gt;&lt;br /&gt;LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined&lt;br /&gt;&lt;br /&gt;The &lt;a href=&quot;http://httpd.apache.org/docs/1.3/logs.html#common&quot;&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=&quot;&quot; href=&quot;http://httpd.apache.org/docs/1.3/mod/core.html#hostnamelookups&quot;&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&#39;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=&quot;font-weight: bold;&quot;&gt;seconds&lt;/span&gt;, the default is RES_TIMEOUT (currently &lt;span style=&quot;font-weight: bold;&quot;&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=&quot;http://httpd.apache.org/docs/1.3/mod/mod_access.html#allow&quot;&gt;Allow&lt;/a&gt; statements to make sure we weren&#39;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=&quot;http://httpd.apache.org/docs/1.3/mod/core.html#hostnamelookups&quot;&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=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;//      hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr), AF_INET);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&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=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;//      hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr), AF_INET);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&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.</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/fullpage/post/8098276/6252896475089194963' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/6252896475089194963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/6252896475089194963'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2009/05/apache-1341-hostnamelookups-bug.html' title='Apache 1.3.41 HostnameLookups bug?'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>2</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="kvm"/><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="xorg"/><title type='text'>QEMU/KVM mouse not working?</title><content type='html'>&lt;a href=&quot;http://wiki.clug.org.za/wiki/QEMU_mouse_not_working&quot;&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&#39;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&#39;t test my VM before fiddling with xorg.conf).</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/fullpage/post/8098276/3642494592426371690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/3642494592426371690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/3642494592426371690'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2009/04/qemukvm-mouse-not-working.html' title='QEMU/KVM mouse not working?'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="mythtv"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>XOrg configuration for Samsung LA32A450C1</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQUfkZpMl1IkgF17yDdHvYfEg8sF4H7tNcKI1YOhmKrbYzKI0rikh-yA0KDS4gFQzIwAxqzpFSyCkuqQkQyaBs6Ap4W2A4O35y9pP9OfKBLZpz1P2EEgB9ciDA06APxnbc3HfuA/s1600-h/samsung-32-lcd-resolutions.png&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 172px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQUfkZpMl1IkgF17yDdHvYfEg8sF4H7tNcKI1YOhmKrbYzKI0rikh-yA0KDS4gFQzIwAxqzpFSyCkuqQkQyaBs6Ap4W2A4O35y9pP9OfKBLZpz1P2EEgB9ciDA06APxnbc3HfuA/s320/samsung-32-lcd-resolutions.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5320437720134640466&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://web.aanet.com.au/%7Eauric/?q=node/3&quot;&gt;Th&lt;/a&gt;&lt;a href=&quot;http://web.aanet.com.au/%7Eauric/?q=node/3&quot;&gt;is guy n&lt;/a&gt;&lt;a href=&quot;http://web.aanet.com.au/%7Eauric/?q=node/3&quot;&gt;ailed it&lt;/a&gt;.  I had only just found the manual page for my Samsung 32&quot; LCD TV and was still googling for a tool to find the modeline.&lt;br /&gt;&lt;br /&gt;I&#39;ve only added the option to turn off nvidia&#39;s logo to his X configuration.  Too good:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;Section &quot;Monitor&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    Identifier     &quot;SamsungTV&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    ModelName      &quot;Samsung LCD TV&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    ModeLine      &quot;1360x768@60&quot; 85.8 1360 1440 1552 1792 768 771 777 795 +hsync +vsync&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    Option          &quot;dpms&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;EndSection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;Section &quot;Device&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;        Identifier  &quot;NVIDIAVideocard0&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;        Driver      &quot;nvidia&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;        Option      &quot;ModeValidation&quot; &quot;DFP-0: NoDFPNativeResolutionCheck&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;        Option      &quot;ExactModeTimingsDVI&quot; &quot;TRUE&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;        #### 100 DPI&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;        Option      &quot;UseEDIDDpi&quot; &quot;FALSE&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;        Option      &quot;DPI&quot; &quot;100 x 100&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;        Option      &quot;NoLogo&quot; &quot;True&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;EndSection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;Section &quot;Screen&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    Identifier     &quot;Screen0&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    Device         &quot;NVIDIAVideocard0&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    Monitor        &quot;SamsungTV&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    DefaultDepth    24&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    SubSection     &quot;Display&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;                Depth       24&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;                ##### Native Res Samsung 1360x768@60&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;                Modes    &quot;1360x768@60&quot; &quot;1280x720&quot; &quot;1024x768&quot; &quot;800x600&quot; &quot;640x480&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    EndSubSection&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;EndSection&lt;/span&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/fullpage/post/8098276/5692941158221044451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/5692941158221044451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/5692941158221044451'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2009/04/xorg-configuration-for-samsung.html' title='XOrg configuration for Samsung LA32A450C1'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQUfkZpMl1IkgF17yDdHvYfEg8sF4H7tNcKI1YOhmKrbYzKI0rikh-yA0KDS4gFQzIwAxqzpFSyCkuqQkQyaBs6Ap4W2A4O35y9pP9OfKBLZpz1P2EEgB9ciDA06APxnbc3HfuA/s72-c/samsung-32-lcd-resolutions.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="hack"/><category scheme="http://www.blogger.com/atom/ns#" term="red hat"/><category scheme="http://www.blogger.com/atom/ns#" term="rhn"/><category scheme="http://www.blogger.com/atom/ns#" term="yum"/><title type='text'>RHN&#39;s yum update fails</title><content type='html'>I&#39;ve noticed that quite often Red Hat&#39;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=&quot;font-family: courier new;&quot;&gt;# yum update&lt;br /&gt;(...)&lt;br /&gt;&lt;br /&gt;Error Downloading Packages:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&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=&quot;font-family: courier new;&quot;&gt;error was [Errno 14] HTTP Error 404: Not Found&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When that&#39;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&#39;s support and they&#39;ve told me these are &quot;temporary errors&quot;.  Temporary or not they are pretty annoying so here&#39;s what I do.&lt;br /&gt;&lt;br /&gt;1. Retry manually until you&#39;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=&quot;font-family: courier new;&quot;&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.</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/fullpage/post/8098276/9065599744012984570' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/9065599744012984570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/9065599744012984570'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2009/01/rhns-yum-update-fails.html' title='RHN&#39;s yum update fails'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>1</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="mythtv mytharchive DVD"/><title type='text'>Mytharchive: cannot burn a dvd</title><content type='html'>I&#39;ve been playing with &lt;a href=&quot;http://www.mythtv.org/&quot;&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=&quot;http://www.mythtv.org/wiki/index.php/MythArchive&quot;&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=&quot;http://www.mythtv.org/wiki/index.php/MythArchive&quot;&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=&quot;font-family:courier new;&quot;&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&#39;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&#39;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=&quot;font-family:courier new;&quot;&gt;mysql -u root&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;use mythconverg;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;update settings set data=&#39;&#39; where value=&#39;MythArchiveLastRunStatus&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;update settings set data=&#39;&#39; where value=&#39;MythArchiveLastRunType&#39;;&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.</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/fullpage/post/8098276/6325140389644699762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/6325140389644699762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/6325140389644699762'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/12/mytharchive-cannot-burn-dvd.html' title='Mytharchive: cannot burn a dvd'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="crontab"/><category scheme="http://www.blogger.com/atom/ns#" term="flock"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="rsync"/><title type='text'>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&#39;s way there&#39;s a simple solution using flock.  Example without lock (may cause overlapping instances):&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;;font-family:Arial;font-size:100%;&quot;  &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=&quot;font-family: courier new;&quot;&gt;&lt;span style=&quot;;font-size:100%;&quot; &gt;&lt;span style=&quot;&quot;&gt;*/5 * * * * flock -xn /tmp/example.lock -c &#39;/usr/bin/rsync --delete -a source_server:/source/path/ /dst/path/&#39;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;;font-family:Arial;font-size:85%;&quot;  &gt;&lt;span style=&quot;;font-family:Arial;font-size:10;&quot;  &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=&quot;http://linux.die.net/man/1/flock&quot;&gt;flock man page&lt;/a&gt; for other examples.</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/fullpage/post/8098276/2527263096117209505' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/2527263096117209505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/2527263096117209505'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/12/how-to-avoid-overlapping-rsync.html' title='How to avoid overlapping rsync instances'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>1</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="break"/><title type='text'>No time?  No worries!</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihyphenhyphenWygWi2qwIga50iEFi983wPJDA3dQmuBydwOSpFKs2qL3UQRfALVeyWmsuL-tlOqsMVZZZi9iFrWf0WguI_UVojn0xqMUM46lvwCc2MC_o5VO7IAN841TnKEJ_x50MyY0gkyoA/s1600-h/too-busy.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihyphenhyphenWygWi2qwIga50iEFi983wPJDA3dQmuBydwOSpFKs2qL3UQRfALVeyWmsuL-tlOqsMVZZZi9iFrWf0WguI_UVojn0xqMUM46lvwCc2MC_o5VO7IAN841TnKEJ_x50MyY0gkyoA/s400/too-busy.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5215558434611805154&quot; border=&quot;0&quot; /&gt;&lt;/a&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/fullpage/post/8098276/6984020914126876835' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/6984020914126876835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/6984020914126876835'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/06/no-time-no-worries.html' title='No time?  No worries!'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihyphenhyphenWygWi2qwIga50iEFi983wPJDA3dQmuBydwOSpFKs2qL3UQRfALVeyWmsuL-tlOqsMVZZZi9iFrWf0WguI_UVojn0xqMUM46lvwCc2MC_o5VO7IAN841TnKEJ_x50MyY0gkyoA/s72-c/too-busy.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term=".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="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="iis"/><category scheme="http://www.blogger.com/atom/ns#" term="misleading"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 2003"/><title type='text'>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&#39;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 &quot;Enable default content page&quot; 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=&quot;font-weight: bold;&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4PhyphenhyphenTa5gerlTVizkztEF9qsbtdG6RFbUbiNxrAH2bdGPpLeJ0IjmGUK1jUHDMJrOs7aGbLFXtgWYO-hBYU6ykmUHosGEhTEP5I2nuAEgU7Ax34Qh-C7wZ_sSUK_2PucyAHhZqFQ/s1600-h/asp_net_v2.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4PhyphenhyphenTa5gerlTVizkztEF9qsbtdG6RFbUbiNxrAH2bdGPpLeJ0IjmGUK1jUHDMJrOs7aGbLFXtgWYO-hBYU6ykmUHosGEhTEP5I2nuAEgU7Ax34Qh-C7wZ_sSUK_2PucyAHhZqFQ/s400/asp_net_v2.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5208224938800535426&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The tricky bit is: &lt;span style=&quot;font-weight: bold;&quot;&gt;even if ASP.NET v2.x is not listed above, the v2.x ex&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;tension still shows on the application properties&lt;/span&gt;.  So if you don&#39;t have it above, you need to run aspnet_regiis.exe:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdi5KMMPf-VXfceeu1Hi0E8ghiCOLybl3CQE72sYg_UuUtE7WVql913YJUIP6Akryjpht72Wi3a3ZavstJdwensTqB07-V555plADZbz3M-uwjgrJIvGo7A3w4UQnJyY8K2_bZtQ/s1600-h/asp_net_v2-regiis.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdi5KMMPf-VXfceeu1Hi0E8ghiCOLybl3CQE72sYg_UuUtE7WVql913YJUIP6Akryjpht72Wi3a3ZavstJdwensTqB07-V555plADZbz3M-uwjgrJIvGo7A3w4UQnJyY8K2_bZtQ/s400/asp_net_v2-regiis.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5208225396366271746&quot; border=&quot;0&quot; /&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=&quot;font-family: courier new;&quot;&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ir&lt;/b&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/fullpage/post/8098276/6193807557567293824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/6193807557567293824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/6193807557567293824'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/06/iis-aspnet-v20-fake-403-and-404-errors.html' title='IIS asp.net v2.0 fake 403 and 404 errors'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4PhyphenhyphenTa5gerlTVizkztEF9qsbtdG6RFbUbiNxrAH2bdGPpLeJ0IjmGUK1jUHDMJrOs7aGbLFXtgWYO-hBYU6ykmUHosGEhTEP5I2nuAEgU7Ax34Qh-C7wZ_sSUK_2PucyAHhZqFQ/s72-c/asp_net_v2.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="hardware"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><category scheme="http://www.blogger.com/atom/ns#" term="red hat"/><category scheme="http://www.blogger.com/atom/ns#" term="solaris"/><category scheme="http://www.blogger.com/atom/ns#" term="sun"/><title type='text'>Sun x4450</title><content type='html'>With a range of options for the Intel Tigerton Quad-core Xeon processors, the &lt;a href=&quot;http://www.sun.com/servers/x64/x4450/specs.xml&quot;&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&#39;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&#39;s option &quot;ttb&quot;.  Of course the manual meant &quot;ttyb&quot;.  But it is actually a typo AND an error: you must choose ttya or all you&#39;ll see after boot is &quot;Sun Solaris 5.10&quot; and nothing else.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO3L4-lY0BUdgPwt_MiUvbNTHI-0iJLAP88v3BkwHijL-9AQ8rLGOjmrqYojg5XyqfGFKhjMnT6YePUl5sZmLXMq0y7A-IagOkUDdG9nFEv7mpuYXALvq-Ity2pkJoKgetL4vQKQ/s1600-h/x4450.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO3L4-lY0BUdgPwt_MiUvbNTHI-0iJLAP88v3BkwHijL-9AQ8rLGOjmrqYojg5XyqfGFKhjMnT6YePUl5sZmLXMq0y7A-IagOkUDdG9nFEv7mpuYXALvq-Ity2pkJoKgetL4vQKQ/s400/x4450.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5195972646883125282&quot; border=&quot;0&quot; /&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=&quot;font-family:courier new;&quot;&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;Bad PBR sig&lt;/span&gt;  &lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Reboot and Select proper Boot device&lt;/span&gt;  &lt;span style=&quot;font-family:courier new;&quot;&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&#39;s KB was useless) I found someone with the same problem reporting that a GUI installation didn&#39;t show that error.  Very well, I configured the firewall to allow Sun&#39;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&#39;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&#39; and yeah: all bloody system libraries are 32 bits.&lt;br /&gt;&lt;br /&gt;I confess I didn&#39;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&#39;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.</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/fullpage/post/8098276/1763835719350832246' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/1763835719350832246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/1763835719350832246'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/05/sun-x4450.html' title='Sun x4450'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO3L4-lY0BUdgPwt_MiUvbNTHI-0iJLAP88v3BkwHijL-9AQ8rLGOjmrqYojg5XyqfGFKhjMnT6YePUl5sZmLXMq0y7A-IagOkUDdG9nFEv7mpuYXALvq-Ity2pkJoKgetL4vQKQ/s72-c/x4450.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="raid"/><title type='text'>Nagios checks for LSI RAID with MegaCli</title><content type='html'>I am pretty sure there is a SNMP object in Dell&#39;s DRAC 5/PERC to inform about the status of your RAID volumes and physical disks.  I&#39;m not too fond of using SNMP with Nagios so I wrote a check script that uses the &lt;a href=&quot;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&quot;&gt;MegaCli&lt;/a&gt; &lt;a href=&quot;http://www.lsi.com/support/downloads/megaraid/miscellaneous/linux/1.01.40_Linux_Cli.zip&quot;&gt;linux i386 binary&lt;/a&gt; (from the &lt;a href=&quot;http://www.lsi.com/&quot;&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&#39;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&#39; 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&#39;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=&quot;color: rgb(160, 32, 240);&quot;&gt;#!/usr/bin/perl -wT&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;# CHECK DELL/MegaRAID DISK ARRAYS ON LINUX&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;# $Id: check_dellperc 142 2008-03-17 22:25:46Z thiago $&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(160, 32, 240);&quot;&gt;BEGIN&lt;/span&gt; {&lt;br /&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ENV{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;PATH&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;/usr/bin&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;;&lt;br /&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ENV{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;ENV&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&#39;&lt;/span&gt;;&lt;br /&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ENV{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;BASH_ENV&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&#39;&lt;/span&gt;;&lt;br /&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ENV{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;IFS&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; ( &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;defined&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ENV{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;IFS&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt;) ) ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(160, 32, 240);&quot;&gt;use strict&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(160, 32, 240);&quot;&gt;use lib&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;/usr/local/nagios/libexec&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(160, 32, 240);&quot;&gt;use &lt;/span&gt;utils &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;qw(&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;$TIMEOUT %ERRORS &amp;amp;print_revision &amp;amp;support &amp;amp;usage&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(160, 32, 240);&quot;&gt;use &lt;/span&gt;Getopt::Long;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(160, 32, 240);&quot;&gt;use &lt;/span&gt;Time::HiRes qw ( tv_interval gettimeofday );&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(160, 32, 240);&quot;&gt;use vars&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;qw(&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;$opt_h $help $opt_V $version&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(160, 32, 240);&quot;&gt;use vars&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;qw(&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;$PROGNAME $SUDO $MEGACLI&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$PROGNAME&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;check_dellperc&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$SUDO&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;/usr/bin/sudo&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$MEGACLI&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;/opt/MegaRAID/MegaCli/MegaCli64&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$t_start&lt;/span&gt; = [gettimeofday];&lt;br /&gt;&lt;br /&gt;Getopt::Long::Configure(&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;bundling&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;);&lt;br /&gt;GetOptions&lt;br /&gt; (&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;V&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;   =&amp;gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;\$opt_V&lt;/span&gt;,  &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;    =&amp;gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;\$opt_V&lt;/span&gt;,&lt;br /&gt;  &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;   =&amp;gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;\$opt_h&lt;/span&gt;,  &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;help&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;       =&amp;gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;\$opt_h&lt;/span&gt;,&lt;br /&gt; );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; ( &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$opt_V&lt;/span&gt; ) {    print_revision(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$PROGNAME&lt;/span&gt;, &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;$Id: check_dellperc 142 2008-03-17 22:25:46Z thiago $&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;);&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ERRORS{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;OK&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;} &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;elsif&lt;/b&gt;&lt;/span&gt; ( &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$opt_h&lt;/span&gt; ) {&lt;br /&gt; print_help();&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ERRORS{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;OK&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$TIMEOUT&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: rgb(46, 139, 87);&quot;&gt;&lt;b&gt;utils::&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;TIMEOUT&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$start_time&lt;/span&gt; = &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;time&lt;/b&gt;&lt;/span&gt;();&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;# &lt;/span&gt;&lt;span style=&quot;background-color: rgb(255, 255, 0);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;TODO&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;: add timeout option&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#if ( $opt_t &amp;amp;&amp;amp; $opt_t =~ /^([0-9]+)$/ ) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#    $TIMEOUT = $1;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;# Check state of Logical Devices&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$status&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;PERC OK&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$perfdata&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$errors&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ERRORS{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;OK&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vd&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vds&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;open&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;MROUT&lt;/span&gt;, &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$SUDO&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$MEGACLI&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt; -LDInfo -Lall -aALL -NoLog|&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (!&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;&amp;lt;MROUT&amp;gt;&lt;/span&gt;) {&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;Can&#39;t run &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$MEGACLI&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;);&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ERRORS{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;UNKNOWN&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;while&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;&amp;lt;MROUT&amp;gt;&lt;/span&gt;) {&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$line&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$_&lt;/span&gt;;&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;chomp&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$line&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$line&lt;/span&gt; =~&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;^Virtual Disk: &lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\d&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;+)&lt;/span&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;     &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vd&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$1&lt;/span&gt;;&lt;br /&gt;     &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;next&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vd&lt;/span&gt; =~&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;[0-9]+&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;     &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$line&lt;/span&gt; =~&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;^State: &lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\w&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;+)&lt;/span&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;         &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vds&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$1&lt;/span&gt;;            &lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;background-color: rgb(255, 255, 0);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;TODO&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;: verbose print(&quot;State for VD #$vd is $vds\n&quot;);&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$perfdata&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$perfdata&lt;/span&gt;.&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt; VD&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vd&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vds&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;         &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vds&lt;/span&gt; !~&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;^Optimal$&lt;/span&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;             &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$errors&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ERRORS{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;CRITICAL&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;             &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$status&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;RAID ERROR&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;             &lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;background-color: rgb(255, 255, 0);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;TODO&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;: verbose print(&quot;Error found: $status. Skipping remaining Virtual Drive tests.\n&quot;);&lt;/span&gt;&lt;br /&gt;             &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;last&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt;         } &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;else&lt;/b&gt;&lt;/span&gt; {&lt;br /&gt;             &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vd&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&quot;&lt;/span&gt;; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$vds&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;close&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;MROUT&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;# Check state of Physical Drives&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$count_type&lt;/span&gt;;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$pd&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$pds&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;open&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;MROUT&lt;/span&gt;, &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$SUDO&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$MEGACLI&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt; -PDList -aALL -NoLog|&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (!&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;&amp;lt;MROUT&amp;gt;&lt;/span&gt;) {&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;Can&#39;t run &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$MEGACLI&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;);&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ERRORS{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;UNKNOWN&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;while&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;&amp;lt;MROUT&amp;gt;&lt;/span&gt;) {&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$line&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$_&lt;/span&gt;;&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;chomp&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$line&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$line&lt;/span&gt; =~&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;^Device Id: &lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\d&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;+)&lt;/span&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;     &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$pd&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$1&lt;/span&gt;;&lt;br /&gt;     &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;next&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$pd&lt;/span&gt; =~&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;[0-9]+&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;     &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$line&lt;/span&gt; =~&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt; /&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;Media Error|Other Error|Predictive Failure&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt; Count: &lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\w&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;+)&lt;/span&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;/&lt;/b&gt;&lt;/span&gt;) {&lt;br /&gt;         &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$count_type&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$1&lt;/span&gt;;&lt;br /&gt;         &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$pds&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$2&lt;/span&gt;;            &lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;background-color: rgb(255, 255, 0);&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;TODO&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;: verbose print(&quot;$count_type count for device id #$pd is $pds\n&quot;);&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$perfdata&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$perfdata&lt;/span&gt;.&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt; PD&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$pd&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$count_type&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$pds&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;         &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$pds&lt;/span&gt; != &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;0&lt;/span&gt;) {&lt;br /&gt;             &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt; (&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$errors&lt;/span&gt; == &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ERRORS{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;OK&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;}&lt;/span&gt;) {&lt;br /&gt;                 &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$status&lt;/span&gt; = &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;DISK ERROR&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;                 &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$errors&lt;/span&gt; = &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$ERRORS{&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;WARNING&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&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=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;close&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;MROUT&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;# Got here OK&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;my&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$t_end&lt;/span&gt; = [gettimeofday];&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$status&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;| time=&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt; . (tv_interval &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$t_start&lt;/span&gt;, &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$t_end&lt;/span&gt;) . &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$perfdata&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;exit&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$errors&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;sub&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;print_usage&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;Usage: &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$PROGNAME&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;sub&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;print_help&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt; print_revision(&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$PROGNAME&lt;/span&gt;, &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;$Revision: 142 $ &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&#39;&lt;/span&gt;);&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;Copyright (C) 2007 Westfield Ltd&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\n\n&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;Check Dell/MegaRaid Disk Array plugin for Nagios&lt;/span&gt;&lt;span style=&quot;color: rgb(106, 90, 205);&quot;&gt;\n\n&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt; print_usage();&lt;br /&gt; &lt;span style=&quot;color: rgb(165, 42, 42);&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&amp;lt;&amp;lt;USAGE&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;-V, --version&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;    Print program version information&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;-h, --help&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;    This help screen&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 139, 139);&quot;&gt;$PROGNAME&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 255);&quot;&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=&quot;font-family: courier new;font-family:courier new;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&gt;# Defaults    requiretty&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&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&#39;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=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;While in the sudoers file, also add the following two lines:&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p  style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p  style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style=&quot;font-family: courier new;font-family:courier new;&quot; &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;&quot;&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 &quot;nagios&quot;, 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=&quot;font-family: courier new;&quot;&gt;$ sudo -u nagios /usr/local/nagios/libexec/check_dellperc&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&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=&quot;font-family: courier new;&quot;&gt;$ echo $?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;0&lt;/span&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/fullpage/post/8098276/656127778319494794' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/656127778319494794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/656127778319494794'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/04/nagios-checks-for-lsi-raid-with-megacli.html' title='Nagios checks for LSI RAID with MegaCli'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>1</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="mplayer"/><title type='text'>It is not a toy</title><content type='html'>From the book &quot;Things that work but you wouldn&#39;t have bet on before actually trying&quot;.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHH9548Nus1y5c5sT_xCaL6Gg_WQHPpvr_MBisJ8_x2k9WTAU1K4fUf1gz-rWlU722YR11aaeL17F1UfAlteW_KZAeP_7IxLcn5epGXvUr0IKTKoJnfgYVUxHdyVWRta3Yvq3dAg/s1600-h/RAMBO3-and-mplayer.png&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHH9548Nus1y5c5sT_xCaL6Gg_WQHPpvr_MBisJ8_x2k9WTAU1K4fUf1gz-rWlU722YR11aaeL17F1UfAlteW_KZAeP_7IxLcn5epGXvUr0IKTKoJnfgYVUxHdyVWRta3Yvq3dAg/s400/RAMBO3-and-mplayer.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5189025359292586594&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;$ mplayer your_movie.iso</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/fullpage/post/8098276/9052820627250799081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/9052820627250799081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/9052820627250799081'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/04/it-is-not-toy.html' title='It is not a toy'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHH9548Nus1y5c5sT_xCaL6Gg_WQHPpvr_MBisJ8_x2k9WTAU1K4fUf1gz-rWlU722YR11aaeL17F1UfAlteW_KZAeP_7IxLcn5epGXvUr0IKTKoJnfgYVUxHdyVWRta3Yvq3dAg/s72-c/RAMBO3-and-mplayer.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="solaris"/><category scheme="http://www.blogger.com/atom/ns#" term="teamsite"/><title type='text'>Teamsite 6.7.1 SP1 won&#39;t start</title><content type='html'>After installing &lt;a href=&quot;http://www.interwoven.com/components/page.jsp?topic=PRODUCT::TEAMSITE&quot;&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&#39;t start, dumping a core and printing this message:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;[crit] file vhost.c, line 190, assertion &quot;rv == APR_SUCCESS&quot; 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 &quot;dns&quot; to the &quot;hosts:&quot; line on /etc/nsswitch.conf solved the problem:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&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 &quot;_default_&quot; on the VirtualHost entry to &quot;*&quot;:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&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=&quot;font-family: courier new;&quot;&gt;&amp;lt;VirtualHost *:__IWWEBD_HTTPS_PORT__&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I didn&#39;t try it but that&#39;s also the recommendation from an &lt;a href=&quot;https://support.interwoven.com/kb/kb_show_article2.asp?ArticleID=60555&quot;&gt;Interwoven&#39;s KB article&lt;/a&gt; (support account needed).&lt;iw-home&gt;&lt;br /&gt;&lt;virtualhost __iwwebd_https_port__=&quot;&quot;&gt;&lt;/virtualhost&gt;&lt;/iw-home&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/fullpage/post/8098276/1734062022101269770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/1734062022101269770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/1734062022101269770'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/01/teamsite-671-sp1-wont-start.html' title='Teamsite 6.7.1 SP1 won&#39;t start'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="inetd"/><category scheme="http://www.blogger.com/atom/ns#" term="netcat"/><category scheme="http://www.blogger.com/atom/ns#" term="solaris"/><category scheme="http://www.blogger.com/atom/ns#" term="tcp_wrappers"/><title type='text'>TCP wrappers: refused connect from ...</title><content type='html'>I&#39;ve used &lt;a href=&quot;http://en.wikipedia.org/wiki/Inetd&quot;&gt;inetd&lt;/a&gt; + &lt;a href=&quot;ftp://ftp.porcupine.org/pub/security/tcp_wrappers_7.6.BLURB&quot;&gt;tcp wrappers&lt;/a&gt; + &lt;a href=&quot;http://m.nu/program/util/netcat/netcat.html&quot;&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=&quot;font-family: courier new;&quot;&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=&quot;font-family:courier new;&quot;&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&#39;t resolve to a name (using reverse DNS).&lt;br /&gt;&lt;br /&gt;I downloaded the &lt;a href=&quot;ftp://ftp.porcupine.org/pub/security/tcp_wrappers_7.6.tar.gz&quot;&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.</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/fullpage/post/8098276/213730811793215965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/213730811793215965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/213730811793215965'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/01/tcp-wrappers-refused-connect-from.html' title='TCP wrappers: refused connect from ...'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="msmq"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 2003"/><title type='text'>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=&quot;http://support.microsoft.com/kb/810507&quot;&gt;articles&lt;/a&gt; &lt;a href=&quot;http://kbalertz.com/811308/Increase-Kernel-Memory-Threshold.aspx&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms811056.aspx&quot;&gt;gave &lt;/a&gt;different &lt;a href=&quot;http://support.microsoft.com/kb/q312362/&quot;&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.</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/fullpage/post/8098276/1203485920998702587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/1203485920998702587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/1203485920998702587'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/01/msmq-error0xc00e0027.html' title='MSMQ error:0xc00e0027'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="64bit"/><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><title type='text'>VMWare Workstation on Debian AMD64</title><content type='html'>I&#39;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=&quot;font-family: courier new;&quot;&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=&quot;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&quot;&gt;post on vmware&#39;s knowledge base&lt;/a&gt; gave a solution for &lt;a href=&quot;http://www.redhat.com/&quot;&gt;Red Hat&lt;/a&gt; distros.  On &lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt; the solution is analogous: you just need to install the package &lt;a href=&quot;http://packages.debian.org/stable/libs/ia32-libs&quot;&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=&quot;http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz&quot;&gt;vmware-any-any patch&lt;/a&gt; is not needed.</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/fullpage/post/8098276/3187198817363597008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/3187198817363597008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8098276/posts/default/3187198817363597008'/><link rel='alternate' type='text/html' href='http://microrants.blogspot.com/2008/01/vmware-workstation-on-debian-amd64.html' title='VMWare Workstation on Debian AMD64'/><author><name>XCondE</name><uri>http://www.blogger.com/profile/09987426867261834869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/-Scto5bqX5pU/VexCY76p-AI/AAAAAAACaxU/lDb5QL_cW-8/s1600-r/*'/></author><thr:total>0</thr:total></entry></feed>