<?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; CentOS</title>
	<atom:link href="http://systembash.com/tags/software/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://systembash.com</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Fri, 13 Jan 2012 03:18:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A Poor Man&#8217;s VPN: Proxy Web Connection to Remote Server (via SSH and Tunnel)</title>
		<link>http://systembash.com/content/a-poor-mans-vpn-proxy-web-connection-to-remote-server-via-ssh-and-tunnel/</link>
		<comments>http://systembash.com/content/a-poor-mans-vpn-proxy-web-connection-to-remote-server-via-ssh-and-tunnel/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 13:12:20 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://systembash.com/content/a-poor-mans-vpn-proxy-web-connection-to-remote-server-via-ssh-and-tunnel/</guid>
		<description><![CDATA[Did you ever have a situation where you needed to access a website that had an IP restriction in place? I recently had a situation where I needed to access the web via my university connection (due to IP restrictions placed on accessing databases of research papers). They do not have a VPN setup so it is hard to do this off-campus. I do however have access to a linux machine on campus. I am familiar with port forwarding using SSH but I had never used it to actually tunnel web traffic using a web browser on Windows. Turns out it is surprisingly easy! The ssh command to use is: 1ssh -C2qTnN -D 8080 username@remote_host This command sshes to the remote_host, and creates a tunnel on your localhost, port 8080. Note that you need to have private key authentication already set up for this host &#8211; it will not work....]]></description>
			<content:encoded><![CDATA[<p>Did you ever have a situation where you needed to access a website that had an IP restriction in place? I recently had a situation where I needed to access the web via my university connection (due to IP restrictions placed on accessing databases of research papers). They do not have a VPN setup so it is hard to do this off-campus.</p>
<p>I do however have access to a linux machine on campus. I am familiar with port forwarding using SSH but I had never used it to actually tunnel web traffic using a web browser on Windows. Turns out it is surprisingly easy!</p>
<p>The ssh command to use is:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ssh -C2qTnN -D 8080 username@remote_host</div></td></tr></tbody></table></div>
<p>This command sshes to the remote_host, and creates a tunnel on your localhost, port 8080. Note that you need to have private key authentication already set up for this host &#8211; it will not work with password authentication.</p>
<p>The description of the switches are (from the <a href="http://linux.die.net/man/1/ssh">ssh man page</a>):</p>
<ul>
<li>-C : Compression</li>
<li>-2 : Use SSHv2</li>
<li>-q : quiet!</li>
<li>-T : Disable pseuto-tty allocation</li>
<li>-n : Prevents reading from stdin (you need to have private key authentication set up, to prevent password authentication)</li>
<li>-N : Do not execute a remote command (or launch a shell). Just use the ssh process for port forwarding</li>
<li>-D : Allocate a socket to listen on the local side. When a connection is made to this port it is located to the remote machine. Makes SSH work as a SOCKS server. Only root can forward&nbsp;privileged&nbsp;ports like this.</li>
</ul>
<p>From here, you set up Firefox or your browser of choice to use a Socks proxy on localhost:8080. The man page says that SOCKS4 and SOCK5 should both work but I had to use SOCKS v4, SOCKS v5 did not seem to work for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/a-poor-mans-vpn-proxy-web-connection-to-remote-server-via-ssh-and-tunnel/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Command Line Packet Sniff Existing Running Process in Linux</title>
		<link>http://systembash.com/content/command-line-packet-sniffing-existing-running-process-in-linux/</link>
		<comments>http://systembash.com/content/command-line-packet-sniffing-existing-running-process-in-linux/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 13:57:23 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[system admin]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=398</guid>
		<description><![CDATA[Have you ever come across a server that is doing a lot of traffic? Maybe you have logged in to see a process running at 100% CPU, so you know the culprit, but instead of kill -9ing it, wouldn&#8217;t it be great to see what exactly it is up to? Or even if you see a process and don&#8217;t know exactly what it is doing, and you are just curious what it is up to? As with most issues there are several ways to skin this cat. You can use tcpdump or wireshark to sniff the all of the network traffic on the device. If you know the port the program is running on (you can use lsof for that), you can restrict traffic to that port. But what if the program is jumping ports, or even uses a side-port for some sort of data transmission (UDP?). The main problem....]]></description>
			<content:encoded><![CDATA[<p>Have you ever come across a server that is doing a lot of traffic? Maybe you have logged in to see a process running at 100% CPU, so you know the culprit, but instead of kill -9ing it, wouldn&#8217;t it be great to see what exactly it is up to? Or even if you see a process and don&#8217;t know exactly what it is doing, and you are just curious what it is up to?</p>
<p><img src="http://systembash.com/wp-content/uploads/2009/07/terminal-icon-64x64.png" alt="terminal-icon-64x64" title="terminal-icon-64x64" width="64" height="64" class="alignnone size-full wp-image-401" style="float: right; padding: 0 0 15px 15px;"/>As with most issues there are several ways to skin this cat. You can use <a href="http://www.chm.tu-dresden.de/edv/manuals/aix/cmds/aixcmds5/tcpdump.htm">tcpdump</a> or <a href="http://www.wireshark.org/">wireshark </a>to sniff the all of the network traffic on the device. If you know the port the program is running on (you can use <a href="http://en.wikipedia.org/wiki/Lsof">lsof</a> for that), you can restrict traffic to that port. But what if the program is jumping ports, or even uses a side-port for some sort of data transmission (UDP?).</p>
<p>The main problem going down this route is that on a server that is doing any significant bit of traffic, it is like sorting through a needle in a haystack. If you have a single process that is taking up all of your bandwidth, you can probably find it pretty fast. But if the process is not doing a ton of traffic it can be hard to track down.</p>
<h2>Strace to the rescue</h2>
<p>You can use the great program strace to sniff the network data that an executed program is doing, or even a currently running program. This works well because if you are trying to isolate the network traffic a currently running process, your options can be limited. Using strace is the only way that I know of to see ALL of the traffic coming from a process.</p>
<p>To check the traffic of a currently running process X:</p>
<pre class="prettyprint lang-bsh">strace -p X -f -e trace=network -s 10000</pre>
<p>The command breaks down:</p>
<ul>
<li>-p: process ID</li>
<li>-f: follow forks</li>
<li>-e: follow set of system calls. In our case, we use trace=network, which follows network system calls.</li>
<li>-s: set output string sizes. default is 32, which does not  give a lot of information.</li>
</ul>
<p>Finally if you have a new program to execute and you want to watch the network traffic on it, you execute that command with strace. This would be good to use if you work in a highly secure environment and need to find out what sort of network traffic a distributed binary is doing. Checking for a program &#8216;Phoning home&#8217; is a good example of that.</p>
<p>Here is the command that launches a new process:</p>
<pre class="prettyprint lang-bsh">strace -f -e trace=network -s 10000 /usr/bin/command arguments</pre>
<p>Hopefully using strace in this manner will help you debug some issues on your server &#8211; I know I have used it several times.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/command-line-packet-sniffing-existing-running-process-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy Search and Replace in Multiple Files on Linux Command Line</title>
		<link>http://systembash.com/content/easy-search-and-replace-in-multiple-files-on-linux-command-line/</link>
		<comments>http://systembash.com/content/easy-search-and-replace-in-multiple-files-on-linux-command-line/#comments</comments>
		<pubDate>Thu, 07 May 2009 03:10:57 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Other Code]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=365</guid>
		<description><![CDATA[I recently came across a typo that existed in a bunch of html files on my web server. I thought it should be easy enough to change, but since it was in a number of files, editing it by hand would be time consuming. Fortunately, there is an easy, one liner command to replace the text in multiple files in a sub directory using recursion. grep -lr -e '&#60;oldword&#62;' * &#124; xargs sed -i 's/&#60;oldword&#62;/&#60;newword&#62;/g' This command broken down: grep for the word in a files, use recursion (to find files in sub directories), and list only file matches &#124; xargs passes the results from the grep command to sed sed -i uses a regular expression (regex) to evaluate the change: s (search) / search word / target word / g (global replace) For more information, see man pages for grep, sed, and xarg. Also it is very handy to....]]></description>
			<content:encoded><![CDATA[<p>I recently came across a typo that existed in a bunch of html files on my web server. I thought it should be easy enough to change, but since it was in a number of files, editing it by hand would be time consuming. Fortunately, there is an easy, one liner command to replace the text in multiple files in a sub directory using recursion.</p>
<pre>grep -lr -e '&lt;oldword&gt;' * | xargs sed -i 's/&lt;oldword&gt;/&lt;newword&gt;/g'</pre>
<p>This command broken down:</p>
<ul>
<li>grep for the word in a files, use recursion (to find files in sub directories), and list only file matches</li>
<li>| xargs passes the results from the grep command to sed</li>
<li>sed -i uses a regular expression (regex) to evaluate the change: s (search) / search word / target word / g (global replace)</li>
</ul>
<p>For more information, see man pages for grep, sed, and xarg. Also it is very handy to learn about <a href="http://www.regular-expressions.info/">regular expressions</a> as they are a valuable tool to any command line programmer!</p>
<h3>Update 2009/7/19:</h3>
<p>Thanks to reader btr we have a great one-line perl command that will perform the same task:</p>
<p>Perl provides a really nice one-line for this kind of thing:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">perl -p -i -e ’s///g’ *</div></td></tr></tbody></table></div>
<p>It also provides the option of creating a backup of each file changed:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">perl -p -i.bak -e ’s///g’ *</div></td></tr></tbody></table></div>
<p>mnemonic: PIE (”easy as pie”, etc.)<br />
google “perl pie” and you’ll get lots of info for other uses of this technique.</p>
<p><a href="http://www.linux.org/lessons/short/perlpie/perl_pie.html">http://www.linux.org/lessons/short/perlpie/perl_pie.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/easy-search-and-replace-in-multiple-files-on-linux-command-line/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 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: Steps to install a Zabbix Client Download zabbix source code from www.zabbix.com; decompress with &#8216;tar zxvf&#8217; and cd to directory Configure the make program: ./configure &#8211;enable-agent Compile and install the program: make....]]></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>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: 12[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 &#8216;ballooned&#8217; and begun to take up 3GB of RAM, this is more than the system should need: 12[2009-03-22 18:03:08 xend.XendDomainInfo 3310] DEBUG (XendDomainInfo:1113) Setting memory target of domain Domain-0 (0) to 2903 MiB. [2009-03-22 18:03:09 xend 3310] DEBUG (balloon:127) Balloon: 537840 KiB free; need 537600; done. 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: 1234# Dom0 will balloon out when....]]></description>
			<content:encoded><![CDATA[<p>Recently I started seeing this error while provisioning Xen VPSes on a server with 8GB of RAM:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[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')</div></td></tr></tbody></table></div>
<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>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[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.</div></td></tr></tbody></table></div>
<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>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># 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)</div></td></tr></tbody></table></div>
<p>I changed this line to:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">(dom0-min-mem 0)</div></td></tr></tbody></table></div>
<p>I also modified grub to set an absolute amount of memory to dom0:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">title CentOS (2.6.18-92.1.22.el5xen)<br />
&nbsp; &nbsp; &nbsp; &nbsp; root (hd0,0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; kernel /xen.gz-2.6.18-92.1.22.el5 dom0_mem=1536M<br />
&nbsp; &nbsp; &nbsp; &nbsp; module /vmlinuz-2.6.18-92.1.22.el5xen ro root=/dev/vg_root/lv_root<br />
&nbsp; &nbsp; &nbsp; &nbsp; module /initrd-2.6.18-92.1.22.el5xen.img</div></td></tr></tbody></table></div>
<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>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Usage: xm mem-set &lt;Domain&gt; &lt;Mem&gt;</div></td></tr></tbody></table></div>
<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>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/18 queries in 0.006 seconds using disk: basic

Served from: systembash.com @ 2012-02-08 15:27:25 -->
