<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>/proc/sys/net/blog &#187; linux</title>
	<atom:link href="http://momotonic.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://momotonic.com</link>
	<description>rants, tutorials and documents about everything server related</description>
	<lastBuildDate>Tue, 14 Jul 2009 15:55:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Last.fm Records with Absynthe theme (latest version breaks it)</title>
		<link>http://momotonic.com/2009/07/14/last-fm-records-with-absynthe-theme-latest-version-breaks-it/</link>
		<comments>http://momotonic.com/2009/07/14/last-fm-records-with-absynthe-theme-latest-version-breaks-it/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 15:52:22 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[theme fix]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[absynthe theme]]></category>
		<category><![CDATA[broken last.fm plugin]]></category>

		<guid isPermaLink="false">http://momotonic.com/?p=50</guid>
		<description><![CDATA[Hey everyone.
So my Last.fm records plugin that is built-in or implemented with this amazing theme broke after I upgraded it, so I checked and it seems the whole plugin is now using jQuery.  I have had to do some modifications to make it work, I hope this helps.
FIrst, you need to add this in [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everyone.</p>
<p>So my Last.fm records plugin that is built-in or implemented with this amazing theme broke after I upgraded it, so I checked and it seems the whole plugin is now using jQuery.  I have had to do some modifications to make it work, I hope this helps.</p>
<p>FIrst, you need to add this in your <code>wp-content/themes/absynthe/header.php</code> right after <code>&lt;![endif]--></code>.</p>
<p><code>&lt;script type='text/javascript' src='/wp-includes/js/jquery/jquery.js'>&lt;/script></code></p>
<p>After that, you need to edit <code>wp-content/themes/absynthe/footer.php</code> and replace this:</p>
<p><code><?php<br />
	if (function_exists('lastfmrecords_display')) {<br />
		lastfmrecords_display();<br />
	}<br />
?></code></p>
<p>By this:</p>
<p><code>&lt;div id="lastfmrecords">&lt;/div></code></p>
<p>Once you&#8217;ve made those changes, go to Settings > Last.fm Records, make sure that the CSS is disabled else it won&#8217;t look pretty and make sure the placeholder is set to &#8220;lastfmrecords&#8221;.</p>
<p>Enjoy <img src='http://momotonic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I will let the developer of this theme know so he can fix this too.</p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2009/07/14/last-fm-records-with-absynthe-theme-latest-version-breaks-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small application for disabling mod_security for specific domains on cPanel server</title>
		<link>http://momotonic.com/2009/07/14/small-application-for-disabling-mod_security-for-specific-domains-on-cpanel-server/</link>
		<comments>http://momotonic.com/2009/07/14/small-application-for-disabling-mod_security-for-specific-domains-on-cpanel-server/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 15:30:29 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[cpanel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[disable mod_security2]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[small script]]></category>

		<guid isPermaLink="false">http://momotonic.com/?p=46</guid>
		<description><![CDATA[Alright, I&#8217;m lazy so I always make a script/utility for anything and everything. Another fine piece of lazygineering.
This little script disables mod_security on specific domains that you pick, mod_security2 does not allow disabling it from .htaccess and it&#8217;s pretty annoying to do the same work all over and over again, why not make it one [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, I&#8217;m lazy so I always make a script/utility for anything and everything. Another fine piece of lazygineering.</p>
<p>This little script disables mod_security on specific domains that you pick, mod_security2 does not allow disabling it from .htaccess and it&#8217;s pretty annoying to do the same work all over and over again, why not make it one line only. <img src='http://momotonic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Introducing, disable_modsec &#8212; Enjoy lazy cPanel server admins.</p>
<p><code>#!/usr/bin/perl</p>
<p>use strict;<br />
use lib qw(/usr/local/cpanel);<br />
use Cpanel::AcctUtils::DomainOwner;</p>
<p>if ($ARGV[0])<br />
{<br />
  # Get username<br />
  my $username = Cpanel::AcctUtils::DomainOwner::getdomainowner($ARGV[0]);<br />
  my $domain = $ARGV[0];</p>
<p>  # Create directory for config<br />
  system ('mkdir -p /usr/local/apache/conf/userdata/std/2/'.$username.'/'.$domain);</p>
<p>  # Create config file<br />
  open (CONFIG, ">>/usr/local/apache/conf/userdata/std/2/".$username.'/'.$domain.'/modsec.conf');<br />
  print CONFIG "<IfModule mod_security2.c>\nSecRuleEngine Off\n</IfModule>";<br />
  close CONFIG;</p>
<p>  # Enable vHost includes<br />
  system ('/scripts/ensure_vhost_includes --user='.$username);<br />
} else {<br />
  print("Usage: disable_modsec [domain]\n");<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2009/07/14/small-application-for-disabling-mod_security-for-specific-domains-on-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Citrix XenServer + VLAN Trunking setup (Cisco switch)</title>
		<link>http://momotonic.com/2009/06/23/citrix-xenserver-vlan-trunking-setup-cisco-switch/</link>
		<comments>http://momotonic.com/2009/06/23/citrix-xenserver-vlan-trunking-setup-cisco-switch/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 18:41:55 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[citrix]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vlan]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>
		<category><![CDATA[trunking]]></category>

		<guid isPermaLink="false">http://momotonic.com/?p=35</guid>
		<description><![CDATA[I have been involved with recent Citrix virtualization setups with our company and I have not see any clear tutorials on how to work with VLAN trunking and Citrix XenServer.  The advantage of using this is being able to use VLANs to separate your network but at the same time being able to do [...]]]></description>
			<content:encoded><![CDATA[<p>I have been involved with recent Citrix virtualization setups with our company and I have not see any clear tutorials on how to work with VLAN trunking and Citrix XenServer.  The advantage of using this is being able to use VLANs to separate your network but at the same time being able to do live migrations without losing connectivity.  These articles will be separated in a couple of parts, this part is mainly focused on setting up the trunking on the switch itself.  The trunking allows the XenServer to have, <em>technically</em>, presence on every VLAN, therefore when migrating servers, the internet connection does not stop working because the VLAN on the target server is different.  Hope it&#8217;s clear.</p>
<p>First of all, telnet to your switch, these instructions are for Cisco switches, that&#8217;s all I ever worked with anyways, heh.  All those instructions use IOS.</p>
<p>First of all you need to pick the port that you&#8217;ll be working on, make sure you have physical access to the server you&#8217;re going to be working with, I&#8217;m not responsible for some settings going poof and you having to drive down to your data center to fix the issue. <img src='http://momotonic.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>So, the interface that I will be working with is <code>FastEthernet1/8</code> &#8212; Enter configuration mode and go to the port</p>
<p><code>conf t<br />
int FastEthernet1/8</code></p>
<p>Enable trunking and 801q capsulation</p>
<p><code>switchport mode trunk<br />
switchport trunk encapsulation dot1Q<br />
switchport trunk native vlan 1000</code></p>
<p>Make sure the native VLAN is the same VLAN that the network was running on previously, read more information why here:</p>
<blockquote><p>To establish 802.1q trunking both sides must be in the same native VLAN this is because the encapsulation is not setup yet and the 2 switches must talk over an un-encapsulated link (native VLAN) to setup the encapsulation in the first place. Why this works is because neither side is encapsulating packets with its VLAN tag since they are both talking over their native VLAN, basicly neither side knows that the other side is in a different VLAN to begin with and they are just sending unencapsulated packets back and forth. So if you set a port on the core switch as native vlan 5 for example and connected a dumb switch to it vlan 5 traffic would go un encapsulated to the dumb switch and it can understand it but it will put it in its VLAN 1 ports there is no actual trunking going on. No 802.1q or ISL!<br />
<a href="http://forums.devshed.com/showpost.php?p=1613306&#038;postcount=2">juniperr @ DevShed</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2009/06/23/citrix-xenserver-vlan-trunking-setup-cisco-switch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HyperVM login error: not_in_list_of_allowed_ip</title>
		<link>http://momotonic.com/2009/02/10/hypervm-login-error-not_in_list_of_allowed_ip/</link>
		<comments>http://momotonic.com/2009/02/10/hypervm-login-error-not_in_list_of_allowed_ip/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 23:08:44 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[hypervm]]></category>
		<category><![CDATA[hypervm problem]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[not_in_list_of_allowed_Ip]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[easy fix]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://momotonic.com/?p=31</guid>
		<description><![CDATA[We had a client who was not able to login to his HyperVM control panel to make modifications to his virtual private server, the error he was getting was the following:
Alert: not_in_list_of_allowed_ip [xx.xx.xx.xx]
The IP of the client is located at the &#8220;xx.xx.xx.xx&#8221; part, this is easily fixed by clearing the block list on the server [...]]]></description>
			<content:encoded><![CDATA[<p>We had a client who was not able to login to his HyperVM control panel to make modifications to his virtual private server, the error he was getting was the following:</p>
<blockquote><p>Alert: not_in_list_of_allowed_ip [xx.xx.xx.xx]</p></blockquote>
<p>The IP of the client is located at the &#8220;xx.xx.xx.xx&#8221; part, this is easily fixed by clearing the block list on the server with this command (on the main node), you must replace the user.vm part by the username of the client at HyperVM (most of the time, something.vm).</p>
<p><code>/script/clearallowedblockedip --class=client --name=user.vm</code></p>
<p>It should return something like the following:</p>
<p><code>AllowedIp Sucessfully cleared for client:user.vm</code></p>
<p>Afterwards, the client/you should be able to login with no problem at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2009/02/10/hypervm-login-error-not_in_list_of_allowed_ip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Horde broken or not working correctly on cPanel server</title>
		<link>http://momotonic.com/2009/01/05/horde-broken-or-not-working-correctly-on-cpanel-server/</link>
		<comments>http://momotonic.com/2009/01/05/horde-broken-or-not-working-correctly-on-cpanel-server/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 18:00:44 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[cpanel]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[horde]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[quick fix]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[short fix]]></category>

		<guid isPermaLink="false">http://momotonic.com/?p=28</guid>
		<description><![CDATA[Simple, short &#038; sweet post, this should easily fix any problems you&#8217;re having
/usr/local/cpanel/bin/update-horde --force
Also, this might be useful to run hourly, I leave this on our servers &#8220;just in case&#8221;.
(mysqlcheck --auto-repair eximstats ; mysqlcheck --auto-repair horde) >/dev/null 2>/dev/null
]]></description>
			<content:encoded><![CDATA[<p>Simple, short &#038; sweet post, this should easily fix any problems you&#8217;re having</p>
<p><code>/usr/local/cpanel/bin/update-horde --force</code></p>
<p>Also, this might be useful to run hourly, I leave this on our servers &#8220;just in case&#8221;.</p>
<p><code>(mysqlcheck --auto-repair eximstats ; mysqlcheck --auto-repair horde) >/dev/null 2>/dev/null</code></p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2009/01/05/horde-broken-or-not-working-correctly-on-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>/tmp clean-up script modification, sessions dying with PHP</title>
		<link>http://momotonic.com/2008/11/28/tmp-clean-up-script-modification-sessions-dying-with-php/</link>
		<comments>http://momotonic.com/2008/11/28/tmp-clean-up-script-modification-sessions-dying-with-php/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 13:11:18 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[cpanel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql.sock]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tmp]]></category>
		<category><![CDATA[cleanup]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[timeout]]></category>
		<category><![CDATA[tmpcleanup]]></category>

		<guid isPermaLink="false">http://momotonic.com/?p=19</guid>
		<description><![CDATA[It seems there there was a little flaw in the script that I wrote a while ago, any PHP sessions on the server will timeout/die after 1 hour if you run that as an hourly cronjob, I have made a small modification to the script.
The only small modification is that now, it deletes all sess_* [...]]]></description>
			<content:encoded><![CDATA[<p>It seems there there was a little flaw in the script that I wrote a while ago, any PHP sessions on the server will timeout/die after 1 hour if you run that as an hourly cronjob, I have made a small modification to the script.</p>
<p>The only small modification is that now, it deletes all <code>sess_*</code> files that have not been accessed for 5 days therefore are probably just sitting there and never going to be used again, the rest remain deleted because it&#8217;s failed uploads/etc that will never be used again.</p>
<p><code><br />
#!/bin/bash</p>
<p># Change directory to /tmp<br />
cd /tmp</p>
<p># Clean up trash left by Gallery2<br />
ls | grep '[0-9].inc*' | xargs rm -fv</p>
<p># Clean up PHP temp. session files<br />
find /tmp -atime +5 -name 'sess_*' -print | xargs rm -fv</p>
<p># Clean up dead vBulletin uploads<br />
ls | grep 'vbupload*' | xargs rm -fv</p>
<p># Clean up failed php uploads<br />
ls | grep 'php*' | xargs rm -fv</p>
<p># Clean up failed ImageMagick conversions.<br />
ls | grep 'magick*' | xargs rm -fv<br />
</code></p>
<p>Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2008/11/28/tmp-clean-up-script-modification-sessions-dying-with-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cleaning up /tmp directory on busy cPanel web hosting servers</title>
		<link>http://momotonic.com/2008/11/27/cleaning-up-tmp-directory-on-busy-cpanel-web-hosting-servers/</link>
		<comments>http://momotonic.com/2008/11/27/cleaning-up-tmp-directory-on-busy-cpanel-web-hosting-servers/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 02:22:58 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[cpanel]]></category>
		<category><![CDATA[error 22]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql.sock]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tmp]]></category>
		<category><![CDATA[full]]></category>
		<category><![CDATA[uploads]]></category>

		<guid isPermaLink="false">http://momotonic.com/?p=17</guid>
		<description><![CDATA[Usually, the /tmp directory is one of the frequently accessed directories, temp files of MySQL, PHP and other applications are placed and often if processes die, left over.  Uploads using PHP are always uploaded to the /tmp directory till they are complete, if you have some dying processes, you will end up with a [...]]]></description>
			<content:encoded><![CDATA[<p>Usually, the <code>/tmp</code> directory is one of the frequently accessed directories, temp files of MySQL, PHP and other applications are placed and often if processes die, left over.  Uploads using PHP are always uploaded to the <code>/tmp</code> directory till they are complete, if you have some dying processes, you will end up with a filled <code>/tmp</code> directory which is hell.</p>
<p>Why? Because MySQL leaves and uses it&#8217;s temporary files in <code>/tmp</code>, and if there is no space in there, queries will start failing.  Uploads from PHP or Perl are placed in there till the upload process is over, they cannot be further placed there because there is no more space left.  So far, we have failing MySQL &#038; inability to upload complete PHP files, <i>system administrator hell</i>.</p>
<p>Easy fix, you might say?  Just a simply <code>rm -rf /</code> should take care of it?  Nope.  Try that, have fun trying to fix the sockets you deleted, specifically applications that depend on the <i>mysql.sock</i> placed in your <i>/tmp</i> directory, things just got worse.  In case you actually did delete everything, just restart the services, they should re-appear, if they don&#8217;t, they should be somewhere else and you have to create a symbolic link using <code>li</code>, MySQL&#8217;s socket is usually located at <code>/var/lib/mysql/mysql.sock</code>.</p>
<p>The best way is to either have a script that cleans it up hourly if you know what usually fills it up or manually run <code>ls -alhS /tmp | head</code> and looking what&#8217;s causing the problem and how to avoid it in the future, I have developed a script that I run on multiple servers with no problems at the moment.  It takes care of the most trash caused on a cPanel server</p>
<p><code>#!/bin/bash</p>
<p># Change directory to /tmp<br />
cd /tmp</p>
<p># Clean up trash left by Gallery2<br />
ls | grep '[0-9].inc*' | xargs rm -fv</p>
<p># Clean up PHP temp. session files<br />
ls | grep 'sess_*' | xargs rm -fv</p>
<p># Clean up dead vBulletin uploads<br />
ls | grep 'vbupload*' | xargs rm -fv</p>
<p># Clean up failed php uploads<br />
ls | grep 'php*' | xargs rm -fv</p>
<p># Clean up failed ImageMagick conversions.<br />
ls | grep 'magick*' | xargs rm -fv</code></p>
<p>That usually is enough, my suggestion is to have that run as a cronjob every hour, but I&#8217;m not going in detail on how to do that, because if you don&#8217;t know how to setup a cronjob, perhaps you shouldn&#8217;t be messing around in <code>/tmp</code> directories and deleting stuff on the first place!</p>
<p><b>Update: This script is faulty and will cause you a lot of problems with PHP sessions, please read more information and read the new one <a href="http://momotonic.com/2008/11/28/tmp-clean-up-script-modification-sessions-dying-with-php/">here</a></b></p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2008/11/27/cleaning-up-tmp-directory-on-busy-cpanel-web-hosting-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AACRAID based controllers timing out / aborting / SCSI hang</title>
		<link>http://momotonic.com/2008/11/24/aacraid-based-controllers-timing-out-aborting-scsi-hang/</link>
		<comments>http://momotonic.com/2008/11/24/aacraid-based-controllers-timing-out-aborting-scsi-hang/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 23:51:36 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[aacraid]]></category>
		<category><![CDATA[adaptec]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[grsecurity]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[scsi]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[hdd]]></category>
		<category><![CDATA[performence]]></category>
		<category><![CDATA[raid-10]]></category>
		<category><![CDATA[raid-5]]></category>
		<category><![CDATA[scsi subsystem]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[timeout]]></category>

		<guid isPermaLink="false">http://momotonic.com/?p=13</guid>
		<description><![CDATA[We&#8217;ve been lately starting to use more Adaptec RAID controllers rather than 3ware RAID controllers.  3ware has been nothing but trouble for us, dropping hard drives, even RAID5 arrays are running slower than a regular hard drive with no RAID.  Our latest issue was a server just simply having a Kernel Panic when using high [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been lately starting to use more Adaptec RAID controllers rather than 3ware RAID controllers.  3ware has been nothing but trouble for us, dropping hard drives, even RAID5 arrays are running slower than a regular hard drive with no RAID.  Our latest issue was a server just simply having a Kernel Panic when using high IO, our experience with 3ware RAID controllers &amp; Linux is terrible.</p>
<p>On this other side, Adaptec has been great.  We&#8217;ve been using them for a while now and see no problems at all, however there is just a small catch, Linux usually has a SCSI subsystem timeout of less than 30 seconds which results in a small difference between the controller timeout (at 35 seconds) versus the Linux timeout (at 30 seconds).  This usually brings a server to a halt for a couple of seconds (and minutes in cases) till the server recovers, errors like this are thrown in the console:</p>
<p><code>aacraid: Host adapter abort request (0,1,3,0)<br />
aacraid: Host adapter abort request (0,1,1,0)<br />
aacraid: Host adapter abort request (0,1,2,0)<br />
aacraid: Host adapter abort request (0,1,1,0)<br />
aacraid: Host adapter abort request (0,1,2,0)<br />
aacraid: Host adapter reset request. SCSI hang ?</code></p>
<p>The best method that usually works best is to increase the timeout higher than 45 to ensure that the Linux timeout does not occur before the RAID controller timeout, this is done per device / array.</p>
<p><code>echo '45' > /sys/block/sda/device/timeout<br />
echo '45' > /sys/block/sdb/device/timeout<br />
echo '45' > /sys/block/sdc/device/timeout</code></p>
<p>This should be done to every device, 45 is a good number however you can use what you&#8217;d like as long as it&#8217;s over 35.  If you&#8217;re experiencing issues with loads going sky-high with no apparent reason, this might very well be the reason, to check if this is a possible cause, you can run the following</p>
<p><code>dmesg | grep aacraid</code></p>
<p>If you see errors like the ones that I have up there, then I suggest using that small workaround, if even after using the workaround, you&#8217;re still facing these problems, here are the suggestions/checklist that <a href="http://ask.adaptec.com/scripts/adaptec_tic.cfg/php.exe/enduser/std_adp.php?p_faqid=15357&#038;p_created=1225366599">Adaptec</a> suggests:</p>
<blockquote>
<ul>
<li>Check for any updated firmware for the motherboard, controller, targets and enclosure on the respective manufacturer&#8217;s web sites.</li>
<li>Check per-device queue depth in SYSFS to make sure it is reasonable.</li>
<li>Engage disk drive manufacturer&#8217;s technical support department to check through compatibility or drive class issues.</li>
<li>Engage enclosure manufacturer&#8217;s technical support department to check through compatibility issues.</li>
</ul>
</blockquote>
<p>Anyhow, just like with every Linux issue, your mileage may vary, so if you know of any other fixes or figured out a way how to fix this, feel free to post it as a comment to help others.</p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2008/11/24/aacraid-based-controllers-timing-out-aborting-scsi-hang/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Almost dead blog, but that&#8217;s not good.</title>
		<link>http://momotonic.com/2008/03/23/almost-dead-blog-but-thats-not-good/</link>
		<comments>http://momotonic.com/2008/03/23/almost-dead-blog-but-thats-not-good/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 02:58:33 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[network linux route table]]></category>

		<guid isPermaLink="false">http://momotonic.com/2008/03/23/almost-dead-blog-but-thats-not-good/</guid>
		<description><![CDATA[Oh man, I wish I would get to post here more often, then I&#8217;d probably have a lot less problems.   These days, the simplest of tasks can become a big pain in the neck.  I was doing some re-racking of servers to place them in correct order and I noticed one of [...]]]></description>
			<content:encoded><![CDATA[<p>Oh man, I wish I would get to post here more often, then I&#8217;d probably have a lot less problems.   These days, the simplest of tasks can become a big pain in the neck.  I was doing some re-racking of servers to place them in correct order and I noticed one of the servers was connected on Port 2 instead of Port 1 (Ethernet) &#8212; I&#8217;m a big fan of consistency.</p>
<p>So I decided to change it, I get the monitor &amp; keyboard and start messing.  It sounded pretty simple, we have a service called <code>ifaliases</code> that activates all the other IPs by creating aliases (duh!).  I edited that file to make the main interface eth0 instead of eth1, unplug from Port 2, plug in Port 1, wait a couple of minutes, &#8230;, still unpingable, ugh.</p>
<p>I tried to ping other servers in the same subnet, I was able to ping them.  I checked the route table and it seems there was no default route for all traffic, I created a custom route and the network started to work, but the problem is that every time the interface is restarted, the route table would need to be recreated, blah blah, it&#8217;s a dumb idea.</p>
<p>I looked everywhere until I found the magical file: <code>/etc/sysconfig/network</code> &#8212; The contents of it look something like this:</p>
<p><code>NETWORKING=yes<br />
GATEWAY=the.gw.ip.here<br />
GATEWAYDEV=eth1<br />
HOSTNAME=host.domain.com<br />
DOMAINNAME=domain.com</code></p>
<p>It was pretty simple from there, change the <code>GATEWAYDEV</code> to the new port and voilà.  So the next time you are trying to change ports or the default route won&#8217;t stick, I hope I helped!</p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2008/03/23/almost-dead-blog-but-thats-not-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helpful cPanel included application</title>
		<link>http://momotonic.com/2008/02/23/helpful-cpanel-included-application/</link>
		<comments>http://momotonic.com/2008/02/23/helpful-cpanel-included-application/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 23:57:02 +0000</pubDate>
		<dc:creator>Mo</dc:creator>
				<category><![CDATA[cpanel]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://momotonic.com/2008/02/23/helpful-cpanel-included-application/</guid>
		<description><![CDATA[cPanel may have some very annoying bugs sometimes however there are very useful bits of it that can help in general system administration, dealing with a very busy server and trying to terminate an account that has high disk usage will make the load averages go sky high however thanks to this neat little application [...]]]></description>
			<content:encoded><![CDATA[<p>cPanel may have some very annoying bugs sometimes however there are very useful bits of it that can help in general system administration, dealing with a very busy server and trying to terminate an account that has high disk usage will make the load averages go sky high however thanks to this neat little application provided with cPanel, you can forget about freaking out on high server load.  I have personally tried multiple solutions (including nice) but the loads would still go high and the server would be unusable.</p>
<p>With every cPanel installation, there is a binary located at <code>/usr/local/cpanel/bin/cpuwatch</code>, what <code>cpuwatch</code> does is that it executes the command and monitors the load, if the load goes past the set limit, it will stop the application and resume it after the load averages are below the threshold for a few seconds, the usage for it is very simply</p>
<p><code>cpuwatch <maxload> (<-p PID>|<command> [arguments])<br />
  maxload : system load at which throttling should commence<br />
  command : command to run under cpuwatch<br />
  -p PID  : monitor and throttle the existing process PID</code></p>
<p>Another neat feature is that it can fork a new process or attach itself to a running process, here is an example of deleting an account using SSH and setting the load average threshold to 4.0</p>
<p><code>/usr/local/cpanel/bin/cpuwatch 4.0 /scripts/killacct username</code></p>
<p>The load average will go past 4 however the process will stop running as it goes past that limit, if you already have a process running and you do not want to restart it all, you can run the following command to attach it to the process, in this case, the process ID of my process is 18274.</p>
<p><code>/usr/local/cpanel/bin/cpuwatch 4.0 -p 18274</code></p>
<p>It&#8217;s a very simple but very neat utility that has saved me a few times where I had to do major file operations and did not want the server to have high load averages, this same binary is also used when the logs are running for cPanel and as well as when the cPanel backups are running.</p>
]]></content:encoded>
			<wfw:commentRss>http://momotonic.com/2008/02/23/helpful-cpanel-included-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
