<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: How To Display Linux VPS Memory Usage</title>
	<atom:link href="http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/feed/" rel="self" type="application/rss+xml" />
	<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/</link>
	<description>devnulled provides news, tips, resources, and articles about various topics that software developers and engineers enjoy.</description>
	<pubDate>Sun, 23 Nov 2008 17:50:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>By: Totonet</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-515624</link>
		<dc:creator>Totonet</dc:creator>
		<pubDate>Wed, 02 Jul 2008 08:23:14 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-515624</guid>
		<description>Thanks for sharing with us, works great for me.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing with us, works great for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Goran</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-301662</link>
		<dc:creator>Goran</dc:creator>
		<pubDate>Sun, 18 Nov 2007 01:44:33 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-301662</guid>
		<description>Worked for me, great scripts.
I just want to add a link for &lt;a href="http://en.wikipedia.org/wiki/Page_(computing)#UNIX_and_POSIX-based_Operating_Systems" title="" rel="nofollow"&gt;page size verifying code&lt;/a&gt;, because I had a little problem with that (incomplete code).
It is not Angie's mistake, problem was with tag parsing.</description>
		<content:encoded><![CDATA[<p>Worked for me, great scripts.<br />
I just want to add a link for <a href="http://en.wikipedia.org/wiki/Page_(computing)#UNIX_and_POSIX-based_Operating_Systems" onclick="javascript:pageTracker._trackPageview('/outbound/comment/en.wikipedia.org');" title="" rel="nofollow">page size verifying code</a>, because I had a little problem with that (incomplete code).<br />
It is not Angie&#8217;s mistake, problem was with tag parsing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Harper</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-282825</link>
		<dc:creator>Brandon Harper</dc:creator>
		<pubDate>Wed, 31 Oct 2007 07:38:16 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-282825</guid>
		<description>No problem Pete-- good to hear from you again.  Glad you found it useful!</description>
		<content:encoded><![CDATA[<p>No problem Pete&#8211; good to hear from you again.  Glad you found it useful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete Freitag</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-260127</link>
		<dc:creator>Pete Freitag</dc:creator>
		<pubDate>Fri, 12 Oct 2007 19:11:06 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-260127</guid>
		<description>Handy script thanks Brandon!</description>
		<content:encoded><![CDATA[<p>Handy script thanks Brandon!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hubert</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-248731</link>
		<dc:creator>Hubert</dc:creator>
		<pubDate>Thu, 04 Oct 2007 10:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-248731</guid>
		<description>Works well for me, and Angie's mod works even better, thanks.

Fedora Core release 2 (Tettnang)</description>
		<content:encoded><![CDATA[<p>Works well for me, and Angie&#8217;s mod works even better, thanks.</p>
<p>Fedora Core release 2 (Tettnang)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angie</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-237793</link>
		<dc:creator>Angie</dc:creator>
		<pubDate>Tue, 25 Sep 2007 17:58:42 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-237793</guid>
		<description>I had to tweak it a little bit.  This was for CentOS running version 2.5 of Virtuozzo.  However, without this as a start I'd still be guessing.  I also do the highly explicate math for the pages to Megs conversion.  Also, be sure to verify that your system uses a 4kB page when using the script above (that setting can be configured by your SysAdmin).  Here is my script:

#!/bin/bash
bean=`cat /proc/user_beancounters`
guar=`echo "$bean" &#124; grep vmguar &#124; awk '{ print $4;}'`
burst=`echo "$bean" &#124; grep privvm &#124; awk '{ print $5;}'`
alloca=`echo "$bean" &#124; grep privvmpages &#124; awk '{ print $2;}'`
priv=`echo "$bean" &#124; grep physpages &#124; awk '{ print $2;}'`
let guarenteed=guar*4096/1048576
let allocated=alloca*4096/1048576
let used=priv*4096/1048576
let burst=burst*4096/1048576
echo "VPS memory usage:"
echo "Allocated: $allocated MB"
echo "Used: $used MB"
echo "Guarenteed: $guarenteed MB"
echo "Burstable to: $burst MB"

Here is the code I used (I forget where I grabbed it from but I found it on the web) to verify the page size:

#include 
#include     // sysconf(3)

int main()
{
        printf("The page size for this system is %ld bytes\n", sysconf(_SC_PAGESIZE)); //_SC_PAGE_SIZE is OK too.
        return 0;
}</description>
		<content:encoded><![CDATA[<p>I had to tweak it a little bit.  This was for CentOS running version 2.5 of Virtuozzo.  However, without this as a start I&#8217;d still be guessing.  I also do the highly explicate math for the pages to Megs conversion.  Also, be sure to verify that your system uses a 4kB page when using the script above (that setting can be configured by your SysAdmin).  Here is my script:</p>
<p>#!/bin/bash<br />
bean=`cat /proc/user_beancounters`<br />
guar=`echo &#8220;$bean&#8221; | grep vmguar | awk &#8216;{ print $4;}&#8217;`<br />
burst=`echo &#8220;$bean&#8221; | grep privvm | awk &#8216;{ print $5;}&#8217;`<br />
alloca=`echo &#8220;$bean&#8221; | grep privvmpages | awk &#8216;{ print $2;}&#8217;`<br />
priv=`echo &#8220;$bean&#8221; | grep physpages | awk &#8216;{ print $2;}&#8217;`<br />
let guarenteed=guar*4096/1048576<br />
let allocated=alloca*4096/1048576<br />
let used=priv*4096/1048576<br />
let burst=burst*4096/1048576<br />
echo &#8220;VPS memory usage:&#8221;<br />
echo &#8220;Allocated: $allocated MB&#8221;<br />
echo &#8220;Used: $used MB&#8221;<br />
echo &#8220;Guarenteed: $guarenteed MB&#8221;<br />
echo &#8220;Burstable to: $burst MB&#8221;</p>
<p>Here is the code I used (I forget where I grabbed it from but I found it on the web) to verify the page size:</p>
<p>#include<br />
#include     // sysconf(3)</p>
<p>int main()<br />
{<br />
        printf(&#8221;The page size for this system is %ld bytes\n&#8221;, sysconf(_SC_PAGESIZE)); //_SC_PAGE_SIZE is OK too.<br />
        return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Wilde</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-183486</link>
		<dc:creator>Kevin Wilde</dc:creator>
		<pubDate>Wed, 08 Aug 2007 04:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-183486</guid>
		<description>Works on spry.com vps running CentOS.

Thanks for the great script.</description>
		<content:encoded><![CDATA[<p>Works on spry.com vps running CentOS.</p>
<p>Thanks for the great script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: v</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-141462</link>
		<dc:creator>v</dc:creator>
		<pubDate>Wed, 27 Jun 2007 22:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-141462</guid>
		<description>works very well for me.

Linux2.6.9-023stab040.1-enterprise #1 SMP  i686 i686 i386 GNU/Linux</description>
		<content:encoded><![CDATA[<p>works very well for me.</p>
<p>Linux2.6.9-023stab040.1-enterprise #1 SMP  i686 i686 i386 GNU/Linux</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kman</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-137389</link>
		<dc:creator>kman</dc:creator>
		<pubDate>Fri, 22 Jun 2007 14:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-137389</guid>
		<description>Works for eapps too</description>
		<content:encoded><![CDATA[<p>Works for eapps too</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: linuxchic</title>
		<link>http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-136826</link>
		<dc:creator>linuxchic</dc:creator>
		<pubDate>Thu, 21 Jun 2007 20:26:30 +0000</pubDate>
		<guid isPermaLink="false">http://devnulled.com/content/2007/06/how-to-display-linux-vps-memory-usage/#comment-136826</guid>
		<description>Works great at VPSlink.com hosting.</description>
		<content:encoded><![CDATA[<p>Works great at VPSlink.com hosting.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
