<?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>systemBash &#187; Configurations</title>
	<atom:link href="http://systembash.com/tags/code-samples/configurations/feed/" rel="self" type="application/rss+xml" />
	<link>http://systembash.com</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Sat, 27 Feb 2010 02:12:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel='hub' href='http://systembash.com/?pushpress=hub'/>
		<item>
		<title>How to Install SNMP on Tomato Router Firmware and Graph Traffic with Cacti</title>
		<link>http://systembash.com/content/how-to-install-snmp-on-tomato-router-firmware-and-graph-traffic-with-cacti/</link>
		<comments>http://systembash.com/content/how-to-install-snmp-on-tomato-router-firmware-and-graph-traffic-with-cacti/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 01:16:39 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Other Code]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=406</guid>
		<description><![CDATA[You&#8217;ve flashed your old WRT54G or other vanilla router with the Tomato firmware. This itself turns your router into a lean, mean routing machine with QOS, SSH and more, but let&#8217;s say we want to take it a bit further. What it we want to get some more stats out of it?
In order to do [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve flashed your old WRT54G or other vanilla router with the <a href="http://www.polarcloud.com/tomato">Tomato firmware</a>. This itself turns your router into a lean, mean routing machine with QOS, SSH and more, but let&#8217;s say we want to take it a bit further. What it we want to get some more stats out of it?</p>
<p>In order to do this, we first need to set up a way to pull this information from the router. The best way to do this is to install an SNMP (<strong><span style="text-decoration: underline;">S</span></strong>imple <span style="text-decoration: underline;"><strong>N</strong></span>etwork <strong><span style="text-decoration: underline;">M</span></strong>anagement <strong><span style="text-decoration: underline;">P</span></strong>rotocol) daemon on the system.</p>
<p>The main roadblock we face here is that the system mainly runs in volatile system memory, meaning that every time the system is rebooted the filesystem is reset. Fortunately Tomato provides a way to get around this using CIFS shares. Follow the steps below (as modified from <a href="http://www.linksysinfo.org/forums/showthread.php?t=51064">here</a>) to install an SNMP server on a Tomato router.</p>
<ol>
<li>Create a network (samba, CIFS) share somewhere on the network. This computer must be on all of the time in order for Tomato to run the SNMP server.</li>
<li>Download the snmpd.zip file from one of these locations:<br />
[<a href="http://bok.xs4all.nl/downloads/snmpd.zip">xs4all.nl</a>]<br />
[<a href="http://systembash.com/source/snmpd.zip">systembash</a>]</p>
<p>expand the binary and .conf file into the share or a subdirectory (for example, &lt;share name&gt;/snmp)</p>
<p>MD5 for snmpd binary is ae0d622648efdb8dceb7b3b5a63e23ac</li>
<li style="text-align: center; ">Set up the shared directory on the router. Visit Administration-&gt;CIFS Client. Add the share as follows, with your correct share information:<img class="aligncenter size-full wp-image-428" title="cifs1" src="http://systembash.com/wp-content/uploads/2009/08/cifs11.png" alt="cifs1" width="360" height="258" /></li>
<li>Log into the Tomato router via ssh, and start SNMPd on the router by issuing the command:
<pre>/cifs1/snmp/snmpd -c /cifs1/snmp/snmpd.conf &amp;</pre>
</li>
<li> Test that SNMP is running and can be accessed on another computer on the network. To test it, you can use snmpwalk like so:
<pre>snmpwalk -c public -v 2c &lt;IP Address of Router&gt;</pre>
<p>If it works properly, it will list the available OIDs from the router. You do not need to take note of these, but they will be used in the graphing software later.</li>
<li>Finally, we need to launch the SNMP server when the router is restarted. You do this by adding the command to start it in the area Administration -&gt; Scripts -&gt; Firewall:
<pre>sleep 30
/cifs1/snmp/snmpd -c /cifs1/snmp/snmpd.conf -s &amp;</pre>
<p>This launches the snmp server 30 seconds after the router is started or rebooted.</li>
</ol>
<p>Thats it! SNMP is now running on the router.</p>
<p>Now to add this SNMP host to your graphing software. For this example, I will use <a href="http://www.cacti.net/">Cacti</a>, which I will assume you have already set up. If you need to set it up, please <a href="http://www.cacti.net/documentation.php">follow the directions</a> on the Cacti site for installation.</p>
<p>First, add the router as a new device, using the information below (change IP to suite your needs):</p>
<p><center><img class="aligncenter size-full wp-image-430" title="adddevice" src="http://systembash.com/wp-content/uploads/2009/08/adddevice.png" alt="adddevice" width="338" height="768" /></center></p>
<p>After adding the device, you have several options depending on what sort of data you are looking for. For system information on the router &#8211; for example CPU usage, memory usage, etc; you can go directly to Create -&gt; New Graphs. Select your device and then add the graph you are looking for.</p>
<p>The graph will show as a broken image at first, or a blank graph with &#8220;NaN&#8221; as the data source. Give it a few minutes to update, and the information should start to flow through. The ucd/net options work best, but feel free to experiment.</p>
<p>To get traffic stats on the interface, you first need to &#8220;Walk&#8221; the device.  Go back to your device list, and edit the device you added. Under &#8220;Associated Data Queries&#8221;, Add Data Query, add &#8220;SNMP &#8211; Interface Statistics&#8221; with Re-Index period as &#8220;Uptime goes backwards&#8221;. After adding it you should see under status something like: Success [39 Items, 6 Rows].</p>
<p>Since these data sources are now added, you can go back to Add a new Graph. After selecting the device, you should see a list of these new interfaces. Select the interfaces you wish to graph, and select the graph type (I suggest In/Out bits with Total).</p>
<p>After a few minutes, the data should start filling in. After a while, you will get a graph like this:</p>
<p><center><a href="http://systembash.com/wp-content/uploads/2009/08/graph_image.php1.png"><img src="http://systembash.com/wp-content/uploads/2009/08/graph_image.php1-300x120.png" alt="graph_image.php" title="graph_image.php" width="300" height="120" class="aligncenter size-medium wp-image-435" /></a></center></p>
<p><em>In conclusion</em>, with a little work, you can get enterprise class graphing from your consumer router. The total project took me about 45 minutes, and I was trying to figure out all of the data sources and the correct way to enter everything.</p>
<p>Let me know your experiences, suggestions and corrections!</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/how-to-install-snmp-on-tomato-router-firmware-and-graph-traffic-with-cacti/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A Twitter Search Wordpress Plugin</title>
		<link>http://systembash.com/content/a-twitter-search-wordpress-plugin/</link>
		<comments>http://systembash.com/content/a-twitter-search-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 28 May 2009 02:33:42 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=373</guid>
		<description><![CDATA[Ok, this is not really a plugin per se, but Wordpress already has the capability of displaying a Twitter search stream via it&#8217;s RSS feed widget.
It is dirt simple to set up.
Go into Appearance -> Widgets and select the widget area you wish to add the twitter search stream to;
Add &#8220;RSS&#8221; and position the widget [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, this is not really a plugin <em>per se</em>, but <a href="http://www.wordpress.com">Wordpress</a> already has the capability of displaying a <a href="http://twitter.com">Twitter</a> <a href="http://search.twitter.com">search</a> stream via it&#8217;s RSS feed widget.</p>
<p>It is dirt simple to set up.</p>
<p>Go into Appearance -> Widgets and select the widget area you wish to add the twitter search stream to;</p>
<p>Add &#8220;RSS&#8221; and position the widget accordingly. </p>
<p>Click &#8220;Edit&#8221; and &#8220;Enter the RSS feed URL here:&#8221;. This is the link from <a href="http://search.twitter.com">search.twitter.com</a> where it says &#8220;Feed for this query&#8221;.</p>
<p><center><img src="http://systembash.com/wp-content/uploads/2009/05/searchrss1.png" alt="Twitter Search RSS Feed" title="Twitter Search RSS Feed Link" width="246" height="168" class="aligncenter size-full wp-image-376" /></center></p>
<p>Enter a title, if appropriate. </p>
<p>Thats it! You will see an area on the site such as the one below:</p>
<p><center><img src="http://systembash.com/wp-content/uploads/2009/05/sodarss.png" alt="Twitter Search Plugin" title="Twitter Search Plugin" width="324" height="246" class="aligncenter size-full wp-image-374" /></center></p>
<p>To summarize: There is no Twitter Search Plugin but Wordpress&#8217;s RSS feature works just fine!</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/a-twitter-search-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Password Protected Folder Gives 404 Not Found in Wordpress Installation Sub-folder.</title>
		<link>http://systembash.com/content/password-protected-folder-gives-404-not-found-in-wordpress-installation-sub-folder/</link>
		<comments>http://systembash.com/content/password-protected-folder-gives-404-not-found-in-wordpress-installation-sub-folder/#comments</comments>
		<pubDate>Tue, 05 May 2009 10:51:02 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Other Code]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=359</guid>
		<description><![CDATA[
Came across this little maddening issue again today after fixing it a few months back. I created a directory that is password protected using a .htaccess file. However, when trying to access this folder or anything under this directory, a File Not Found 404 error from Wordpress is displayed before it even prompts you for [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-361" title="Wordpress" src="http://systembash.com/wp-content/uploads/2009/05/icon-wordpress.jpg" alt="Wordpress" width="50" height="50" /></p>
<p>Came across this little maddening issue again today after fixing it a few months back. I created a directory that is password protected using a .htaccess file. However, when trying to access this folder or anything under this directory, a File Not Found 404 error from Wordpress is displayed before it even prompts you for the password. The problem here lays within the main Wordpress .htaccess file</p>
<p>The default .htaccess file for WordPress is:</p>
<p><code># BEGIN wordpress<br />
&amp;lt;IfModule mod_rewrite.c&amp;gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&amp;lt;/IfModule&amp;gt;<br />
# END wordpress</code></p>
<p>This means that if a file is requested from the server, if it is not a file that exists in the server&#8217;s folder directory (!-f) and if it is not a directory that exists in the server&#8217;s folder directories (!-d) then pass the request onto index.php. This way, Wordpress will handle both customized URLs (such as those used for SEO) and also 404 File Not Found errors.</p>
<p>If you set up a password protected folder in a directory included in a Wordpress install, all of a sudden Wordpress takes over that folder and returns a 404 page, like the file doesn&#8217;t exist.</p>
<p>This happens because of a little &#8216;gotcha&#8217; in the apache configuration. Luckily it is an easy fix.</p>
<p>In the password protected folder&#8217;s .htaccess file, you may already have the entries to ask for password access. Before all of that, place the following line:</p>
<p>ErrorDocument 401 /401.html</p>
<p>Then create a 401.html in the main folder, with any text, for example:</p>
<p>PASSWORD PROTECTED FOLDER &#8211; Please enter the correct username/password.</p>
<p>Voila, you can now enter your password protected folder again.</p>
<p>There is another workaround this little error, but since it involves editing the main wordpress .htaccess file, it can be overridden during an upgrade.</p>
<p>Solution found on: <a href="http://www.webmasterworld.com/apache/3688208.htm">http://www.webmasterworld.com/apache/3688208.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/password-protected-folder-gives-404-not-found-in-wordpress-installation-sub-folder/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Installing And Compiling Zabbix Client / Agent</title>
		<link>http://systembash.com/content/installing-and-compiling-zabbix-client-agent/</link>
		<comments>http://systembash.com/content/installing-and-compiling-zabbix-client-agent/#comments</comments>
		<pubDate>Mon, 04 May 2009 03:12:26 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[agent]]></category>
		<category><![CDATA[alerts]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[zabbix]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=355</guid>
		<description><![CDATA[
Zabbix is an excellent system monitoring package. It does everything from basic availability checking to detailed system resource analysis. It is capable of graphing the variables pulled from the system, and alerting admins if there is a problem or something needed for attention.
Once you have the Zabbix server set up, you need to install the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-356" title="Zabbix" src="http://systembash.com/wp-content/uploads/2009/05/zabbix1.png" alt="Zabbix" width="118" height="31" /></p>
<p>Zabbix is an excellent system monitoring package. It does everything from basic availability checking to detailed system resource analysis. It is capable of graphing the variables pulled from the system, and alerting admins if there is a problem or something needed for attention.</p>
<p>Once you have the Zabbix server set up, you need to install the client on any systems you want to monitor. Windows systems have a precompiled binary to install. On linux, unix or freebsd systems you&#8217;ll need to compile binaries. If you have a range of systems that are homogeneous, you can port the binary to those or also compile it with static dependencies. Below are steps to compile, configure and install the zabbix client:</p>
<h3>Steps to install a Zabbix Client</h3>
<ol>
<li>Download zabbix source code from www.zabbix.com; decompress with &#8216;tar zxvf&#8217; and cd to directory</li>
<li>Configure the make program: ./configure &#8211;enable-agent</li>
<li>Compile and install the program: make install</li>
<li>Add zabbix group and user: groupadd zabbix; adduser -g zabbix -s /sbin/nologin -M -p RANDOMPASS zabbix</li>
<li>Create log file: touch /var/log/zabbix_agentd.log; chown zabbix.zabbix /var/log/zabbix_agentd.log</li>
<li>Copy init script to /etc/init.d. Scripts are located in ./misc/init.d/ and your distro directory.</li>
<li>Make sure bin directory in init script is where Zabbix actually compiled to.</li>
<li>chmod 755 /etc/init.d/zabbix_agentd</li>
<li>chkconfig zabbix_agentd on</li>
<li>Copy agent config script to /etc/zabbix/zabbix_agentd.conf. Current one is:
<pre># This is config file for zabbix_agentd
# To get more information about ZABBIX, go http://www.zabbix.com

# This is the ip and port of the main zabbix server
Server=10.0.0.1
ServerPort=10051
Hostname=AGENTHOSTNAME
ListenPort=10050
# ListenIP=10.0.0.2
StartAgents=5
DisableActive=1
DebugLevel=1
PidFile=/var/tmp/zabbix_agentd.pid
# LogFile=/var/log/zabbix_agentd.log
LogFileSize=1
Timeout=10</pre>
</li>
<li>Start the zabbix service: service zabbix_agentd start</li>
<li>Open firewall for zabbix port (10050) if necessary.</li>
<li>Log into Zabbix on the server, Add server to hosts &#8211; use correct templates and groups depending on what type of server it is.</li>
<li>Add monitoring and notification as appropriate.</li>
<li>Consider if all necessary services are being monitored; test that detection of down services and notifications work properly.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/installing-and-compiling-zabbix-client-agent/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add IP to whitelist for Postini Mail Filtering</title>
		<link>http://systembash.com/content/add-ip-to-whitelist-for-postini-mail-filtering/</link>
		<comments>http://systembash.com/content/add-ip-to-whitelist-for-postini-mail-filtering/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 14:04:07 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[ip address]]></category>
		<category><![CDATA[postini]]></category>
		<category><![CDATA[white list]]></category>
		<category><![CDATA[whitelist]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=350</guid>
		<description><![CDATA[I could not find any way to see how you could add an IP address as a &#8216;white list&#8217; for our Postini installation. Mails coming from our mailing list manager kept getting caught in the Postini spam interface (which is probably a whole other issue, which I will need to address later).
To get Postini to [...]]]></description>
			<content:encoded><![CDATA[<p>I could not find any way to see how you could add an IP address as a &#8216;white list&#8217; for our Postini installation. Mails coming from our mailing list manager kept getting caught in the Postini spam interface (which is probably a whole other issue, which I will need to address later).</p>
<p>To get Postini to white list an IP address, you need to go into the Batch editing mode and issue this command:</p>
<pre>addallowedip organization name,domain.com:10.0.0.0</pre>
<p><a href="http://www.postini.com/webdocs/batch/reference/batch_reference.pdf">Full Postini Batch Reference</a></p>
<p>See page 30 for &#8216;addallowedip&#8217; syntax and more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/add-ip-to-whitelist-for-postini-mail-filtering/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installatron Wordpress Upgrade Disables Plugins</title>
		<link>http://systembash.com/content/installatron-wordpress-upgrade-disables-plugins/</link>
		<comments>http://systembash.com/content/installatron-wordpress-upgrade-disables-plugins/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 20:15:57 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[installatron]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=341</guid>
		<description><![CDATA[I just found a quick tip on the Installatron forums. 
By default Installatron disables all Wordpress plugins when doing an upgrade. This is due to the Wordpress best practices for upgrading the version of their system. When you have a lot of Wordpress installs to go through this is a big pain because it usually [...]]]></description>
			<content:encoded><![CDATA[<p>I just found a quick tip on the Installatron forums. </p>
<p>By default Installatron disables all Wordpress plugins when doing an upgrade. This is due to the Wordpress best practices for upgrading the version of their system. When you have a lot of Wordpress installs to go through this is a big pain because it usually breaks the site. </p>
<p>According to <a href="http://installatron.com/forum/viewtopic.php?f=2&#038;t=110">this post</a>, you disable the disabling of the plugins by creating a file named .dont_disable_plugins in the directory that wordpress is installed to.</p>
<p>Via command line it is as simple as this:</p>
<p><code>touch /path/to/wordpress/.dont_disable_plugins</code></p>
<p>Execute that command on the command line (or upload an empty file via FTP/SCP) and the plugins will remain enabled. There is also an option in the installatron settings to enable this file creation upon install.</p>
<p>Note that if you have a plugin that is not compatible with a new version of Wordpress, it may break your install!</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/installatron-wordpress-upgrade-disables-plugins/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Memory Allocation Problems on Xen Server &amp; Fix</title>
		<link>http://systembash.com/content/memory-allocation-problems-on-xen-server-fix/</link>
		<comments>http://systembash.com/content/memory-allocation-problems-on-xen-server-fix/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 13:14:31 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=338</guid>
		<description><![CDATA[Recently I started seeing this error while provisioning Xen VPSes on a server with 8GB of RAM:
[2009-03-23 15:51:40 xend.XendDomainInfo 3310] DEBUG (XendDomainInfo:1603) XendDomainInfo.destroy: domid=None
[2009-03-23 15:51:40 xend 3310] ERROR (xmlrpclib2:184) (12, 'Cannot allocate memory')
I checked the memory, and sure enough, all of the VPSes were using up the memory. More specifically, dom0 (the main server) had [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I started seeing this error while provisioning Xen VPSes on a server with 8GB of RAM:</p>
<p><code>[2009-03-23 15:51:40 xend.XendDomainInfo 3310] DEBUG (XendDomainInfo:1603) XendDomainInfo.destroy: domid=None<br />
[2009-03-23 15:51:40 xend 3310] ERROR (xmlrpclib2:184) (12, 'Cannot allocate memory')</code></p>
<p>I checked the memory, and sure enough, all of the VPSes were using up the memory. More specifically, dom0 (the main server) had &#8216;ballooned&#8217; and begun to take up 3GB of RAM, this is more than the system should need:</p>
<p><code>[2009-03-22 18:03:08 xend.XendDomainInfo 3310] DEBUG (XendDomainInfo:1113) Setting memory target of domain Domain-0 (0) to 2903 MiB.<br />
[2009-03-22 18:03:09 xend 3310] DEBUG (balloon:127) Balloon: 537840 KiB free; need 537600; done.</code></p>
<p>Basically when memory ballooning is set, the memory available to the main hypervisor will have a minimum value set and will balloon according to the current requirements. This setting is in the config file which for me is at /etc/xen/xend-config.sxp:</p>
<p><code># Dom0 will balloon out when needed to free memory for domU.<br />
# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.<br />
# If dom0-min-mem=0, dom0 will never balloon out.<br />
(dom0-min-mem 256)</code></p>
<p>I changed this line to:</p>
<p><code>(dom0-min-mem 0)</code></p>
<p>I also modified grub to set an absolute amount of memory to dom0:</p>
<p><code>title CentOS (2.6.18-92.1.22.el5xen)<br />
        root (hd0,0)<br />
        kernel /xen.gz-2.6.18-92.1.22.el5 dom0_mem=1536M<br />
        module /vmlinuz-2.6.18-92.1.22.el5xen ro root=/dev/vg_root/lv_root<br />
        module /initrd-2.6.18-92.1.22.el5xen.img</code></p>
<p>The value for dom0_mem sets the system memory at boot time. This will be set on the kernel line. Make sure this is large enough to handle system tasks; 1.5G seems to be good for me right now. </p>
<p>Reboot the server to set the memory for dom0.</p>
<p>You could also set the memory usage for dom0 temporarily by using the &#8216;xm mem-set&#8217; command:</p>
<p><code>Usage: xm mem-set &lt;Domain&gt; &lt;Mem&gt;</code></p>
<p>This would not apply after a reboot. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/memory-allocation-problems-on-xen-server-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apt-get Update GPG Key Errors and Fix</title>
		<link>http://systembash.com/content/apt-get-update-gpg-key-errors-and-fix/</link>
		<comments>http://systembash.com/content/apt-get-update-gpg-key-errors-and-fix/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 19:58:30 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[gpg]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=332</guid>
		<description><![CDATA[Running sudo apt-get upgrade, I started getting this error:
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 313D312748A22A95
W: You may want to run apt-get update to correct these problems
Ah ha! But apt-get update is the command causing this problem.
The solution is [...]]]></description>
			<content:encoded><![CDATA[<p>Running sudo apt-get upgrade, I started getting this error:</p>
<p><code>Reading package lists... Done</code></p>
<p><code>W: GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 313D312748A22A95</code></p>
<p><code>W: You may want to run apt-get update to correct these problems</code></p>
<p>Ah ha! But apt-get update is the command causing this problem.</p>
<p>The solution is to import this key from the gpg servers; I don&#8217;t know why this isn&#8217;t done automatically, but here is it:</p>
<p><code>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 313D312748A22A95; gpg --export --armor 313D312748A22A95 | sudo apt-key add -</code></p>
<p>Resulting in:</p>
<p><code>Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --recv-keys --keyserver keyserver.ubuntu.com 313D312748A22A95<br />
gpg: requesting key 48A22A95 from hkp server keyserver.ubuntu.com<br />
gpg: key 48A22A95: public key "Launchpad PPA for Filip Brcic" imported<br />
gpg: Total number processed: 1<br />
gpg:              unchanged: 1<br />
OK</code></p>
<p>Congrats! sudo apt-get update now works properly!</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/apt-get-update-gpg-key-errors-and-fix/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Remote Desktop from Windows XP to Windows Server 2008 or Windows Vista</title>
		<link>http://systembash.com/content/remote-desktop-from-windows-xp-to-windows-server-2008-or-windows-vista/</link>
		<comments>http://systembash.com/content/remote-desktop-from-windows-xp-to-windows-server-2008-or-windows-vista/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 14:28:02 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[credssp]]></category>
		<category><![CDATA[network level authentication]]></category>
		<category><![CDATA[nla]]></category>
		<category><![CDATA[remote desktop]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=318</guid>
		<description><![CDATA[The Remote Desktop connection settings for Windows Server 2008, and I believe Windows Vista, includes 3 levels of service:

Don&#8217;t allow connections to this computer
Allow connections from computers running any version of Remote Desktop (less secure)
Allow connections only from computers running Remote Desktop with Network Level Authentication (more secure)


At first blush, you would probably choose the [...]]]></description>
			<content:encoded><![CDATA[<p>The Remote Desktop connection settings for Windows Server 2008, and I believe Windows Vista, includes 3 levels of service:</p>
<ul>
<li>Don&#8217;t allow connections to this computer</li>
<li>Allow connections from computers running any version of Remote Desktop (less secure)</li>
<li>Allow connections only from computers running Remote Desktop with Network Level Authentication (more secure)</li>
</ul>
<p style="text-align: center;"><img class="size-full wp-image-319 aligncenter" title="windows_server_2008_remote_desktop_properties" src="http://systembash.com/wp-content/uploads/2009/01/windows_server_2008_remote_desktop_properties.jpg" alt="windows_server_2008_remote_desktop_properties" width="414" height="465" /></p>
<p>At first blush, you would probably choose the &#8220;more secure&#8221; option. Practically, this mainly means that it only allows connections from the latest Remote Desktop software in Windows Vista. It is probably another attempt by Microsoft to force consumers and businesses into upgrading to Windows Vista. But&#8230; I digress.</p>
<p>When connecting with an older Terminal Services (TS) client in XP or even Vista, you will get this message:</p>
<p>&#8220;Remote computer requires Network Level Authentication, which your computer doesn&#8217;t support&#8221;</p>
<p><img class="aligncenter size-full wp-image-320" title="the-remote-computer-requires-network-level-authentication11" src="http://systembash.com/wp-content/uploads/2009/01/the-remote-computer-requires-network-level-authentication11.png" alt="the-remote-computer-requires-network-level-authentication11" width="477" height="78" /></p>
<p>Not all is lost. There are two ways around this. The first and most obvious solution is to <strong>select the less secure option</strong> and disabled Network Level Authentication (NLA). If you are in an environment that does not allow this change, or there are some other circumstances where you need to keep Network Level Authentication enabled, you <strong>can get a Remote Desktop connection from Windows XP</strong>.</p>
<p>The first step is to download the latest Remote Desktop Client for Windows XP. As of the writing of this article, the latest version is 6.1.</p>
<p>For XP SP3: <a href="http://support.microsoft.com/kb/951616">here</a></p>
<p>For XP SP2: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6e1ec93d-bdbd-4983-92f7-479e088570ad&amp;displaylang=en">here</a></p>
<p>That is not it. For XP, you need to enable CredSSP &#8211; Credential Security Service Provider.</p>
<blockquote><p>CredSSP is a new Security Service Provider (SSP) that is available in Windows XP SP3 by using the Security Service Provider Interface (SSPI). CredSSP enables a program to use client-side SSP to delegate user credentials from the client computer to the target server.</p></blockquote>
<p>Directions on how do do this are available at Microsoft here:</p>
<p><a href="http://support.microsoft.com/kb/951608/">http://support.microsoft.com/kb/951608/</a></p>
<p>The quick and dirty summary:</p>
<ol>
<li>Click <strong class="uiterm">Start</strong>, click <strong class="uiterm">Run</strong>, type <span class="userInput">regedit</span>, and then press ENTER.</li>
<li>In the navigation pane, locate and then click the following registry subkey:
<div class="indent">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa</div>
</li>
<li>In the details pane, right-click <strong class="uiterm">Security Packages</strong>, and then click <strong class="uiterm">Modify</strong>.</li>
<li>In the <strong class="uiterm">Value data</strong> box, type <span class="userInput">tspkg</span>. Leave any data that is specific to other SSPs, and then click <strong class="uiterm">OK</strong>.</li>
<li>In the navigation pane, locate and then click the following registry subkey:
<div class="indent">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders</div>
</li>
<li>In the details pane, right-click SecurityProviders, and then click <strong class="uiterm">Modify</strong>.</li>
<li>In the <strong class="uiterm">Value data</strong> box, type <span class="userInput">credssp.dll</span>. Leave any data that is specific to other SSPs, and then click <strong class="uiterm">OK</strong>.</li>
<li>Exit Registry Editor.</li>
<li>Restart the computer.</li>
</ol>
<p>For more information on CredSSP including how to deploy this setting using Group Policy, see the <a href="http://support.microsoft.com/kb/951608/">CredSSP page here.</a></p>
<p>Let me know if you have any other tips or a simpler way to connect to the more secure version of Remote Desktop.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/remote-desktop-from-windows-xp-to-windows-server-2008-or-windows-vista/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing VirtualBox on a PAE Kernel System</title>
		<link>http://systembash.com/content/installing-virtualbox-pae-kernel-centos/</link>
		<comments>http://systembash.com/content/installing-virtualbox-pae-kernel-centos/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 19:58:15 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=301</guid>
		<description><![CDATA[I recently got stuck while trying to install Headless Virtualbox on a Centos 5.2 server per the directions at Howtoforge here. The RPM failed with the error that it couldn&#8217;t find the kernel source. I thought I had already installed kernel-devel, and confirmed that I did. The instructions were to define the KERN_DIR variable like [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got stuck while trying to install Headless Virtualbox on a Centos 5.2 server per the directions at Howtoforge <a href="http://www.howtoforge.com/vboxheadless-running-virtual-machines-with-virtualbox-2.0-on-a-headless-centos-5.2-server">here</a>. The RPM failed with the error that it couldn&#8217;t find the kernel source. I thought I had already installed kernel-devel, and confirmed that I did. The instructions were to define the KERN_DIR variable like so:</p>
<pre class="prettyprint">$ export KERN_DIR=/usr/src/kernels/2.6.18-92.1.22.el5-i686/
$ /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [  OK  ]
Removing old VirtualBox netflt kernel module [  OK  ]
Removing old VirtualBox kernel module [  OK  ]
Recompiling VirtualBox kernel module [  OK  ]
Starting VirtualBox kernel module [FAILED]
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)</pre>
<p>dmesg shows this:</p>
<pre class="prettyprint">vboxdrv: disagrees about version of symbol struct_module</pre>
<p>Interesting!</p>
<p>After several missteps, it turns out there is a separate development rpm for the PAE kernel:</p>
<pre class="prettyprint">$ yum install kernel-PAE-devel</pre>
<p>After that installs, we are good:</p>
<pre class="prettyprint">$ export KERN_DIR=/usr/src/kernels/2.6.18-92.1.22.el5-PAE-i686/
$ /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [  OK  ]
Removing old VirtualBox netflt kernel module [  OK  ]
Removing old VirtualBox kernel module [  OK  ]
Recompiling VirtualBox kernel module [  OK  ]
Starting VirtualBox kernel module [  OK  ]</pre>
<p>Golden.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/installing-virtualbox-pae-kernel-centos/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
