<?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>dennis henry &#187; Xen</title>
	<atom:link href="http://dennishenry.net/category/linux/xen/feed/" rel="self" type="application/rss+xml" />
	<link>http://dennishenry.net</link>
	<description>ramblings of an IT professional</description>
	<lastBuildDate>Mon, 26 Sep 2011 16:50:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Total Memory on a Xen Node</title>
		<link>http://dennishenry.net/2010/11/22/total-memory-on-a-xen-node/</link>
		<comments>http://dennishenry.net/2010/11/22/total-memory-on-a-xen-node/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 17:53:36 +0000</pubDate>
		<dc:creator>dennis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[memory usage]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://dennishenry.net/?p=112</guid>
		<description><![CDATA[I ran into an interesting issue the other day that I figured I&#8217;d make a post about in order for others. Since my company is getting more into Xen Hosting, I&#8217;ve tried to be at the forefront of the virtualization software for the company. We did run into an interesting issue though the other day when  [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into an interesting issue the other day that I figured I&#8217;d make a post about in order for others. Since my company is getting more into Xen Hosting, I&#8217;ve tried to be at the forefront of the virtualization software for the company. We did run into an interesting issue though the other day when it came to determining the total amount of memory on a hardware node. Since we set up the Domain-0 to use only 512MB of memory, we were having a tough time determining how much total RAM is in the server. After googling for awhile and asking some co-workers, I discovered the following command:</p>
<pre>xm info</pre>
<p>This command shows quite a few interesting metrics including the total memory for the server. Using this I was able to easily discern the total amount of memory and write a quick script to compute total amount of memory:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">total_memory</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>xm info <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> total_memory <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $3}'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">remaining</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>xm info <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> free_memory <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $3 - 512}'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">used_memory</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>total_memory-remaining<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'Total Memory:\t'</span><span style="color: #007800;">$total_memory</span><span style="color: #ff0000;">'MB ('</span>$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>total_memory<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1024</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">'GB)'</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'Memory Used:\t'</span><span style="color: #007800;">$used_memory</span><span style="color: #ff0000;">'MB ('</span>$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>used_memory<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1024</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">'GB)'</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'Remaining:\t'</span><span style="color: #007800;">$remaining</span><span style="color: #ff0000;">'MB ('</span>$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>remaining<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1024</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">'GB)'</span></pre></td></tr></table></div>

<p>Hope this helps anyone else trying to figure out accurate Xen Memory usage</p>
]]></content:encoded>
			<wfw:commentRss>http://dennishenry.net/2010/11/22/total-memory-on-a-xen-node/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Install Xen 3.4.3 on CentOS 5.x</title>
		<link>http://dennishenry.net/2010/09/10/install-xen-3-4-3-on-centos-5-x/</link>
		<comments>http://dennishenry.net/2010/09/10/install-xen-3-4-3-on-centos-5-x/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 18:30:45 +0000</pubDate>
		<dc:creator>dennis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[3.4.3]]></category>
		<category><![CDATA[5.x]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://dennishenry.net/?p=103</guid>
		<description><![CDATA[So I have had to install Xen 3.4.3 recently 3 different times so I thought I&#8217;d make a quick post regarding the best route I have found to do this. Please note, this may not be the most optimal route but it has worked well for me 3 times now:

yum install xen PyXML mesa-libGL
yum remove xen  [...]]]></description>
			<content:encoded><![CDATA[<p>So I have had to install Xen 3.4.3 recently 3 different times so I thought I&#8217;d make a quick post regarding the best route I have found to do this. Please note, this may not be the most optimal route but it has worked well for me 3 times now:</p>
<pre>
yum install xen PyXML mesa-libGL
yum remove xen python-virtinst libvirt-python libvirt xen-libs
mkdir rpms
cd rpms
wget http://www.gitco.de/repo/xen3.4.3/libvirt-0.7.0-6.el5.x86_64.rpm
wget http://www.gitco.de/repo/xen3.4.3/libvirt-client-0.7.0-6.el5.x86_64.rpm
wget http://www.gitco.de/repo/xen3.4.3/libvirt-python-0.7.0-6.el5.x86_64.rpm
wget http://www.gitco.de/repo/xen3.4.3/python-virtinst-0.500.0-1.el5.noarch.rpm
wget http://www.gitco.de/repo/xen3.4.3/xen-3.4.3-1.el5.x86_64.rpm
wget http://www.gitco.de/repo/xen3.4.3/xen-libs-3.4.3-1.el5.x86_64.rpm
wget http://www.gitco.de/repo/xen3.4.3/glusterfs-client-2.0.8-1.el5.x86_64.rpm
wget http://www.gitco.de/repo/xen3.4.3/glusterfs-common-2.0.8-1.el5.x86_64.rpm
wget http://www.gitco.de/repo/xen3.4.3/fuse-2.7.4-1.rf.x86_64.rpm
wget http://www.gitco.de/repo/xen3.4.3/libibverbs-1.1-1.x86_64.rpm
rpm -ivh *.rpm
</pre>
<p>After that block, make sure you edit /etc/grub.conf to set the following lines:</p>
<pre>
---snip---
default = 0
---snip---
kernel /xen.gz-3.4.3 dom0_mem=512m
---snip---
</pre>
<p>The first will set the xen kernel as the default and the second will limit dom0 to only be able to use 512m of memory, leaving the rest for your VEs. After these changes, go ahead and reboot. Let me know if this route works for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://dennishenry.net/2010/09/10/install-xen-3-4-3-on-centos-5-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

