<?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>Planet Admon</title>
	<atom:link href="http://planet.admon.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://planet.admon.org</link>
	<description>Howtos on Linux System Administration</description>
	<lastBuildDate>Sun, 29 Aug 2010 10:08:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Difference between registered memory and unbuffered memory</title>
		<link>http://planet.admon.org/howto/difference-between-registered-memory-and-unbuffered-memory-2/</link>
		<comments>http://planet.admon.org/howto/difference-between-registered-memory-and-unbuffered-memory-2/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 17:02:17 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Hardwares]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[buffered memory]]></category>
		<category><![CDATA[RAM]]></category>
		<category><![CDATA[registered memory]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=723</guid>
		<description><![CDATA[Unbuffered memory is also known as unregistered memory (or UDIMM). Buffered memory is also known as registered memory (or RDIMM). Unbuffered memory is memory where the memory controller module drives the memory directly, instead of using a store-and-forward system like registered memory. Buffered memory modules have built-in registers on their address and control lines. A [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/how-about-the-memory-limitations-for-linux/' rel='bookmark' title='Permanent Link: How about the memory limitations for linux?'>How about the memory limitations for linux?</a></li>
<li><a href='http://planet.admon.org/howto/clean-up-buffer-and-cached-memory-by-defrag_mem/' rel='bookmark' title='Permanent Link: Clean up buffer and cached memory by defrag_mem'>Clean up buffer and cached memory by defrag_mem</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a title="Unbuffered memory" href="http://en.wikipedia.org/wiki/Unbuffered_memory" target="_blank">Unbuffered memory</a> is also known as unregistered memory (or <strong>UDIMM</strong>). Buffered memory is also known as <a title="registered memory" href="http://en.wikipedia.org/wiki/Registered_memory" target="_blank">registered memory</a> (or <strong>RDIMM</strong>).</p>
<p>Unbuffered memory is memory where the memory controller module drives the memory directly, instead of using a store-and-forward system like registered memory. <strong>Buffered memory</strong> modules have built-in registers on their address and control lines.<span id="more-723"></span> A register is a very small temporary holding area (usually 64 bits) for data. These registers act as buffers between the Glossary Link CPU and the memory.</p>
<p>Some systems do not support unbuffered memory, others require <strong>unbuffered memory</strong>, and many more give you the option to use unbuffered or registered memory. The use of unbuffered memory is reasonable for gaming systems. It is not recommended for server-class systems.</p>
<p style="text-align: center;"><a href="http://planet.admon.org/wp-content/uploads/2010/08/Registered-Memory.jpg"><img class="aligncenter size-full wp-image-731" title="Registered-Memory" src="http://planet.admon.org/wp-content/uploads/2010/08/Registered-Memory.jpg" alt="Registered Memory" width="300" height="300" /></a></p>
<p style="text-align: center;"><a title="kingston homepage" href="http://www.kingston.com/" target="_blank">Kingston</a> registered memory</p>
<p>The use of <strong>registered memory</strong> increases the reliability of the data, that is why most true servers motherboards require registered memory. Registered memory is slightly slower than unregistered memory (1 clock cycle) as data must be moved through the registers. The use of registered memory is recommended for server-class systems. It is not useful on gaming systems.</p>
<p>Finally, the unregistered RAM is cheaper than the registered RAM.</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/how-about-the-memory-limitations-for-linux/' rel='bookmark' title='Permanent Link: How about the memory limitations for linux?'>How about the memory limitations for linux?</a></li>
<li><a href='http://planet.admon.org/howto/clean-up-buffer-and-cached-memory-by-defrag_mem/' rel='bookmark' title='Permanent Link: Clean up buffer and cached memory by defrag_mem'>Clean up buffer and cached memory by defrag_mem</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/difference-between-registered-memory-and-unbuffered-memory-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate random password in Linux Command Line</title>
		<link>http://planet.admon.org/howto/generate-random-password-linux-command-line/</link>
		<comments>http://planet.admon.org/howto/generate-random-password-linux-command-line/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 05:37:24 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[random password]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=715</guid>
		<description><![CDATA[Password is widely used in a production environment, for example, when we created a system account, we need to set an initial password for it, and When email / database / Subversion / LDAP (..etc.) accounts created, random passwords are needed as well. As the random password is common, there are many ways to generate [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/ways-to-reset-mysql-user-password/' rel='bookmark' title='Permanent Link: Ways to reset MySQL user password'>Ways to reset MySQL user password</a></li>
<li><a href='http://planet.admon.org/howto/generate-mac-address-by-scripts/' rel='bookmark' title='Permanent Link: Generate MAC Address by Scripts'>Generate MAC Address by Scripts</a></li>
<li><a href='http://planet.admon.org/howto/dmidecode-report-hardware-information-from-command-line/' rel='bookmark' title='Permanent Link: Dmidecode: Report hardware information from command line'>Dmidecode: Report hardware information from command line</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Password is widely used in a production environment, for example, when we created a system account, we need to set an initial password for it, and When email / database / Subversion / LDAP (..etc.) accounts created, random passwords are needed as well.<br />
<span id="more-715"></span>As the random password is common, there are many ways to generate random passwords in Linux/UNIX. We&#8217;ll show some examples here on how to generate a strong password on Linux command line.</p>
<p>Please note that this post does not cover the topics on <a href="http://en.wikipedia.org/wiki/Password_strength" target="_blank">password strength</a>. you can use some <a href="http://www.passwordmeter.com/" target="_blank">online tools</a> to check password strength.</p>
<p style="text-align: center;"><a href="http://planet.admon.org/wp-content/uploads/2010/07/Gmail-PassWord-Strength.png"><img class="aligncenter size-full wp-image-734" title="Gmail-PassWord-Strength" src="http://planet.admon.org/wp-content/uploads/2010/07/Gmail-PassWord-Strength.png" alt="Gmail passWord strength check" width="553" height="288" /></a><em>GMail Password Strength Check</em></p>
<p>You can use the following four commands directly in most of Linux distributions with default install.</p>
<pre>joseph@test:~$ &lt; /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c8
3saMDFXB</pre>
<p>I personally prefer to use this command. The other commands work great too, check below:</p>
<pre>cat /dev/urandom | tr -cd 'a-f0-9' | head -c 16
dd if=/dev/random count=10 bs=1 | hexdump  | cut -d   -f 2-| head -n 1 | tr -d " "</pre>
<p>uuencode which is supplied by <a href="http://www.gnu.org/software/sharutils/">sharutils</a> is needed by this command (Sharutils is not installed by default):</p>
<pre>head -c 12 /dev/random | uuencode -m - | tail -n 2 | head -n 1</pre>
<p>By using the following command, you need to get <em>mkpasswd</em> installed. It&#8217;s man page is <a href="http://linux.about.com/library/cmd/blcmdl_mkpasswd.htm">available here</a>. It can be run like this:</p>
<pre>mkpasswd -l 16 -s 0 -C 0|sed 's/[0ol1]/f/g'</pre>
<p>Finally, if you have <a href="http://sourceforge.net/projects/pwgen/" target="_blank">pwgen</a> installed, you can also generate a random password in linux command line like this:</p>
<pre>pwgen -ycn 16 1</pre>
<p>PWGen supports Windows platform as well, you just need to install <a href="http://sourceforge.net/projects/pwgen-win/" target="_blank">pwgen-win</a> instead, it has a nice GUI.</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/ways-to-reset-mysql-user-password/' rel='bookmark' title='Permanent Link: Ways to reset MySQL user password'>Ways to reset MySQL user password</a></li>
<li><a href='http://planet.admon.org/howto/generate-mac-address-by-scripts/' rel='bookmark' title='Permanent Link: Generate MAC Address by Scripts'>Generate MAC Address by Scripts</a></li>
<li><a href='http://planet.admon.org/howto/dmidecode-report-hardware-information-from-command-line/' rel='bookmark' title='Permanent Link: Dmidecode: Report hardware information from command line'>Dmidecode: Report hardware information from command line</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/generate-random-password-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploring the software behind Facebook</title>
		<link>http://planet.admon.org/howto/exploring-the-software-behind-facebook/</link>
		<comments>http://planet.admon.org/howto/exploring-the-software-behind-facebook/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 11:36:55 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[pingdom]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=713</guid>
		<description><![CDATA[Pingdom.com created a nice article last month, it took a look at some of the software and techniques that used by Facebook to keep its site up and running smoothly in spite of handling close to half a billion active users. At the scale that Facebook operates, a lot of traditional approaches to serving web [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/cassandra-structured-key-value-based-storage-system/' rel='bookmark' title='Permanent Link: Cassandra: Structured Key-Value based storage system'>Cassandra: Structured Key-Value based storage system</a></li>
<li><a href='http://planet.admon.org/howto/haystack-new-storage-solution-for-billions-of-photos/' rel='bookmark' title='Permanent Link: Haystack new storage solution for billions of photos'>Haystack new storage solution for billions of photos</a></li>
<li><a href='http://planet.admon.org/howto/flashcache-caching-data-in-ssd-disks/' rel='bookmark' title='Permanent Link: Flashcache: caching data in SSD disks'>Flashcache: caching data in SSD disks</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Pingdom.com created a nice article last month, it took a look at some of the software and techniques that used by Facebook to keep its site up and running smoothly in spite of handling close to <strong>half   a billion active users</strong>. At the scale that <a href="http://www.facebook.com/">Facebook</a> operates, a  lot of traditional approaches to serving web content break down or  simply aren’t practical.<span id="more-713"></span></p>
<p>Before we get into the article, here are a few factoids like <a href="http://planet.admon.org/howto/haystack-new-storage-solution-for-billions-of-photos/">Haystack</a> and <a href="http://planet.admon.org/howto/cassandra-structured-key-value-based-storage-system/">Cassandra</a> <em>(note that this article was created in Middle, 2009)</em> to give you an  idea of the scaling challenge that Facebook has to deal with.</p>
<p>Let&#8217;s go back here at <a href="http://royal.pingdom.com">http://royal.pingdom.com</a> to check the full version of this article <a href="http://royal.pingdom.com/2010/06/18/the-software-behind-facebook/">Exploring the software behind Facebook, the world’s largest site</a>!</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/cassandra-structured-key-value-based-storage-system/' rel='bookmark' title='Permanent Link: Cassandra: Structured Key-Value based storage system'>Cassandra: Structured Key-Value based storage system</a></li>
<li><a href='http://planet.admon.org/howto/haystack-new-storage-solution-for-billions-of-photos/' rel='bookmark' title='Permanent Link: Haystack new storage solution for billions of photos'>Haystack new storage solution for billions of photos</a></li>
<li><a href='http://planet.admon.org/howto/flashcache-caching-data-in-ssd-disks/' rel='bookmark' title='Permanent Link: Flashcache: caching data in SSD disks'>Flashcache: caching data in SSD disks</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/exploring-the-software-behind-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Assigning return value by reference is deprecated</title>
		<link>http://planet.admon.org/howto/php-assigning-return-value-by-reference-is-deprecated/</link>
		<comments>http://planet.admon.org/howto/php-assigning-return-value-by-reference-is-deprecated/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 08:35:06 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-5.3]]></category>
		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=711</guid>
		<description><![CDATA[Recently I upgraded to PHP 5.3.2 on my testing server. But soon I got some warning message from some Joomla&#8216;s new themes like JV Eoty. It worked well in PHP 5.2.x, but the moment I did this I started getting numerous warnings. The one that appeared the most was: Deprecated: Assigning the return value of [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/avoid-script-running-multiple-times-by-file-lock/' rel='bookmark' title='Permanent Link: Avoid script running multiple times by file lock'>Avoid script running multiple times by file lock</a></li>
<li><a href='http://planet.admon.org/howto/details-about-tcp_miss000-in-squid-access-log/' rel='bookmark' title='Permanent Link: Details about TCP_MISS/000 in Squid access.log'>Details about TCP_MISS/000 in Squid access.log</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.admon.org/wp-content/uploads/2010/07/php.gif"><img class="alignleft size-full wp-image-774" title="php" src="http://planet.admon.org/wp-content/uploads/2010/07/php.gif" alt="php" width="150" height="150" /></a>Recently I upgraded to <a href="http://www.phparch.com/2010/03/04/php-5-3-2-released/">PHP 5.3.2</a> on my testing server. But soon I got some warning message from some <a href="http://www.joomla.org/">Joomla</a>&#8216;s new themes like <em>JV Eoty</em>. It worked well in PHP 5.2.x, but the moment I did this I started getting numerous warnings. The one that appeared the most was:<span id="more-711"></span></p>
<p><strong>Deprecated: Assigning the return value of new by reference is deprecated in jv_eoty/jv_menus/jv.common.php on line 61</strong></p>
<p>Apparently in PHP5 all objects are passed as reference and 5.3.x formally deprecated the feature, which has forced me to turn off error reporting until I can update all my php code.</p>
<p>So the problem is that traditionally objects would be passed by value and you had to explicitly declare when you wanted the object to be passed by reference, but in PHP 5.3.x you don&#8217;t need to do that any more.  For instance, a simplified example would be:</p>
<pre>class myClass{
  public $temp = array();
  function new_construct() {
    $this-&gt;temp = array[1,2,3];
  }
}

$someArray = &amp; new myClass();
</pre>
<p>The <em>&amp;</em> sign tells PHP to return the value as a reference. In PHP 5.3.x you don’t need to specify the <em>&amp;</em>, otherwise, you&#8217;ll get to warning message that we mentioned here!</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/avoid-script-running-multiple-times-by-file-lock/' rel='bookmark' title='Permanent Link: Avoid script running multiple times by file lock'>Avoid script running multiple times by file lock</a></li>
<li><a href='http://planet.admon.org/howto/details-about-tcp_miss000-in-squid-access-log/' rel='bookmark' title='Permanent Link: Details about TCP_MISS/000 in Squid access.log'>Details about TCP_MISS/000 in Squid access.log</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/php-assigning-return-value-by-reference-is-deprecated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manage Debian auto startup scripts</title>
		<link>http://planet.admon.org/howto/manage-debian-auto-startup-scripts/</link>
		<comments>http://planet.admon.org/howto/manage-debian-auto-startup-scripts/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 15:24:31 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[init scripts]]></category>
		<category><![CDATA[update-rc.d]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=689</guid>
		<description><![CDATA[Debian uses a Sys-V like init system for executing commands when the system runlevel changes &#8211; for example at bootup and shutdown time. Its startup files are stored in /etc/init.d/ and symbolic linked within the /etc/rcX.d/ directories. Debian Linux comes with different utilities to manage these startup file, here we&#8217;ll show two examples on managing [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/set-syste-variables-in-debian-and-centos/' rel='bookmark' title='Permanent Link: Set system variables in Debian and CentOS'>Set system variables in Debian and CentOS</a></li>
<li><a href='http://planet.admon.org/howto/postfix-manage-transport-mapping-table/' rel='bookmark' title='Permanent Link: Postfix: Manage transport mapping table'>Postfix: Manage transport mapping table</a></li>
<li><a href='http://planet.admon.org/howto/how-to-run-32bit-application-under-x64-system/' rel='bookmark' title='Permanent Link: How to run 32bit application under x64 system'>How to run 32bit application under x64 system</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.admon.org/wp-content/uploads/2010/06/debian.png"><img class="size-thumbnail wp-image-736 alignleft" title="debian" src="http://planet.admon.org/wp-content/uploads/2010/06/debian-150x150.png" alt="Debian Linux" width="150" height="150" /></a>Debian uses a <a href="http://en.wikipedia.org/wiki/UNIX_System_V">Sys-V like</a> init system for executing commands when the system runlevel changes &#8211; for example at bootup and shutdown time. Its startup files are stored in <em>/etc/init.d/</em> and symbolic linked within the <em>/etc/rcX.d/</em> directories. Debian Linux comes with different utilities to manage these startup file<span id="more-689"></span>, here we&#8217;ll show two examples on managing these system init scripts.</p>
<p><strong>1, rcconf </strong>- <a href="http://packages.debian.org/lenny/rcconf">http://packages.debian.org/lenny/rcconf</a></p>
<p>This tool configures system services in connection with system runlevels. It turns on/off services using the scripts in <em>/etc/init.d/</em>. Rcconf works with System-V style runlevel configuration. It is a Text User Interface (TUI) frontend to the update-rc.d command.</p>
<p>To start <strong>rcconf</strong>, login as root and type the command &#8220;<em>rcconf</em>&#8220;, then select the service that you would like to enable or disable, and press Tab to apply a change.</p>
<p>A similar command is <a href="http://packages.debian.org/lenny/sysv-rc-conf">sysv-rc-conf</a>, you can make more specified choices in this TUI based configuration tool.</p>
<p><strong>2, sysv-rc</strong> &#8211; <a href="http://packages.debian.org/lenny/sysv-rc">http://packages.debian.org/lenny/sysv-rc</a></p>
<p>Sysv-rc provides a terminal interface for managing &#8220;<em>/etc/rcX.d/</em>&#8221; symlinks. With the help of update-rc.d, you can allow turning services on or off simply. Actually it&#8217;s much what <a href="http://www.linuxjournal.com/article/4445">chkconfig</a> does in Redhat/CentOS, which means you can edit startup scripts for any runlevel.</p>
<p>By default <strong>sysv-rc</strong> is installed even in a minimal installation. Otherwise you need to run &#8220;apt-get install sysv-rc&#8221; to install it. Here&#8217;re some common usage examples for update-rc.d:</p>
<p>To remove the service SERVICE-NAME:</p>
<pre>update-rc.d -f SERVICE-NAME remove</pre>
<p>To add the service SERVICE-NAME:</p>
<pre>update-rc.d SERVICE-NAME defaults</pre>
<pre>update-rc.d SERVICE-NAME defaults 29</pre>
<p>The argument 29 is optional, which ensures that SERVICE-NAME is called after all scripts whose number is less than 29 have completed, and before all scripts whose number is 30 or greater.</p>
<p>To start the script SERVICE-NAME in runlevels 2345 and stop in 456, run (as root):</p>
<pre>update-rc.d SERVICE-NAME start 2 3 4 5 . stop 0 1 6 .</pre>
<pre>update-rc.d SERVICE-NAME start 30 2 3 4 5 . stop 70 0 1 6 .</pre>
<p>You can find more details of this command by running &#8220;man 8 update-rc.d&#8221;.</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/set-syste-variables-in-debian-and-centos/' rel='bookmark' title='Permanent Link: Set system variables in Debian and CentOS'>Set system variables in Debian and CentOS</a></li>
<li><a href='http://planet.admon.org/howto/postfix-manage-transport-mapping-table/' rel='bookmark' title='Permanent Link: Postfix: Manage transport mapping table'>Postfix: Manage transport mapping table</a></li>
<li><a href='http://planet.admon.org/howto/how-to-run-32bit-application-under-x64-system/' rel='bookmark' title='Permanent Link: How to run 32bit application under x64 system'>How to run 32bit application under x64 system</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/manage-debian-auto-startup-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About CPU: The logical and physical cores</title>
		<link>http://planet.admon.org/howto/about-cpu-the-logical-and-physical-cores/</link>
		<comments>http://planet.admon.org/howto/about-cpu-the-logical-and-physical-cores/#comments</comments>
		<pubDate>Mon, 31 May 2010 09:52:01 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Hardwares]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[HyperThreading]]></category>
		<category><![CDATA[Logical CPU]]></category>
		<category><![CDATA[Processor]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=605</guid>
		<description><![CDATA[This post will demonstrate a detailed method of enumerating processors in a running linux server. Before delving into the topic, some terms should be defined: Physical Package: The physical package is a microprocessor. For each physical package, it plugs into a physical socket on a mainboard, and may contain one or more processor cores. Processor [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/how-to-bind-a-certain-process-to-specified-core/' rel='bookmark' title='Permanent Link: How to bind a certain process to specified core?'>How to bind a certain process to specified core?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This post will demonstrate a detailed method of enumerating processors in a running linux server. Before delving into the topic, some terms should be defined:</p>
<ul>
<li><strong>Physical Package</strong>: The physical package is a microprocessor. For each physical package, it plugs into a physical socket on a mainboard, and may contain one or more processor cores.<span id="more-605"></span></li>
<li><strong>Processor Core</strong>: The circuitry that provides ability to decode and execute instructions. A processor core may contain one or more logical processors.</li>
<li><strong>Logical Processor</strong>: The basic unit of processor hardware that allows the software executive in the operating system to dispatch a task or execute a thread context. Each logical processor can execute only one thread context at a time.</li>
<li><a href="http://en.wikipedia.org/wiki/Hyper-threading"><strong>Hyper-Threading</strong></a>: A feature within the IA-32 family of processors, where each processor core provides the functionality of more than one logical processor.</li>
<li><strong>Multi-Core Processor</strong>: A physical package that contains more than one processor core.</li>
</ul>
<p><em>(The above definitions come from <a href="http://software.intel.com/en-us/articles/optimal-performance-on-multithreaded-software-with-intel-tools/">Intel&#8217;s website</a>, it would be decent to identify what we&#8217;re talking.)</em></p>
<p>As we know, on a running Linux/UNIX system, a detailed information of CPU can be retrieved from <em>/proc/cpuinfo</em>, but how can we identify the logical processors and the physical cores smartly?  Basically, there are two rules that will help you achieve these info.</p>
<p>1. Any CPU with the same &#8220;core id&#8221; are hyperthreads in the same processor core, which means this process core has Hyper-Threading enabled.<br />
2. The &#8220;physical id&#8221; identifies physical package. Any cpu with the same physical id are threads or cores in the same physical socket.</p>
<p>Let me take <a href="http://www.dell.com/us/en/dfb/servers/pedge_2950/pd.aspx?refid=pedge_2950&amp;cs=28&amp;s=dfb">Dell PowerEdge 2950</a> as an example, we&#8217;re running Red Hat Enterprise Linux AS release 4 Update 7 on this server.</p>
<pre>$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
stepping        : 10
cpu MHz         : 1995.005
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl tm2 cx16 xtpr lahf_lm
bogomips        : 3992.87
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:                                                                   

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
stepping        : 10
cpu MHz         : 1995.005
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 4
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl tm2 cx16 xtpr lahf_lm
bogomips        : 3990.03
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:                                                                   

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
stepping        : 10
cpu MHz         : 1995.005
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl tm2 cx16 xtpr lahf_lm
bogomips        : 3990.01
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:                                                                   

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
stepping        : 10
cpu MHz         : 1995.005
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 6
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl tm2 cx16 xtpr lahf_lm
bogomips        : 3990.03
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:                                                                   

processor       : 4
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
stepping        : 10
cpu MHz         : 1995.005
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl tm2 cx16 xtpr lahf_lm
bogomips        : 3989.99
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:                                                                   

processor       : 5
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
stepping        : 10
cpu MHz         : 1995.005
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 5
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl tm2 cx16 xtpr lahf_lm
bogomips        : 3990.02
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:                                                                   

processor       : 6
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
stepping        : 10
cpu MHz         : 1995.005
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 3
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl tm2 cx16 xtpr lahf_lm
bogomips        : 3990.01
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:                                                                   

processor       : 7
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
stepping        : 10
cpu MHz         : 1995.005
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 7
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl tm2 cx16 xtpr lahf_lm
bogomips        : 3990.03
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:</pre>
<p>From the outputs, we can see that, there&#8217;re 8 processor-cores in 2 physical packages (in other words, there&#8217;re two quad-cores CPU on this server), and none of them has Hyper-Threading enabled. Here&#8217;s a quick explanation for some keywords that listed above:</p>
<ul>
<li>The processor entry contains a unique identifier for this logical processor.</li>
<li>The physical id entry contains a unique identifier for each physical package.</li>
<li>The core id entry holds a unique identifier for each core.</li>
<li>The siblings entry lists the number of logical processors that exist on the same physical package.</li>
<li>The cpu cores entry contains the number of cores that exist on the same physical package.</li>
<li>The vendor id entry holds the string. GenuineIntel if the processor is an Intel processor, and AuthenticAMD if it&#8217;s an AMD processor.</li>
</ul>
<p>There are some commands here to help identify these type of information quickly on a running Linux:</p>
<ol>
<li> Total amount of processors including the logical ones:
<pre># cat /proc/cpuinfo | grep "processor"| wc -l</pre>
</li>
<li> Total amount of CPU package:
<pre># cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l</pre>
</li>
<li> How many cores for each CPU. (Here we should call CPU as physical package as we mentioned above):
<pre># cat /proc/cpuinfo | grep "cpu cores" | wc -l</pre>
</li>
<li> For each physical CPU, the amount of Logical CPU (the logical CPU can be physical cores, soft cores like threaded, or both).
<pre># cat /proc/cpuinfo | grep "siblings"</pre>
</li>
</ol>
<p>Finally, please note that the msg from <em>/proc/cpuinfo</em> depends on your operating systems, which means it&#8217;s not always right or up-to-date. If you faced any issues, please create a thread at <a href="http://forum.admon.org/hardware-forum/">our support forum</a>, thanks!</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/how-to-bind-a-certain-process-to-specified-core/' rel='bookmark' title='Permanent Link: How to bind a certain process to specified core?'>How to bind a certain process to specified core?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/about-cpu-the-logical-and-physical-cores/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flashcache: caching data in SSD disks</title>
		<link>http://planet.admon.org/howto/flashcache-caching-data-in-ssd-disks/</link>
		<comments>http://planet.admon.org/howto/flashcache-caching-data-in-ssd-disks/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 06:07:31 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[dm-cache]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[flashcache]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=600</guid>
		<description><![CDATA[Facebook released a kernel module called Flashcache this wednesday, which is used to speed up MySQL by caching data in faster media like SSD disks.  It&#8217;s only tested for kernel versions 2.6.18 and 2.6.20. As mentioned at Facebook.com: We built Flashcache to help us scale InnoDB/MySQL, but it was designed as a generic caching module [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/haystack-new-storage-solution-for-billions-of-photos/' rel='bookmark' title='Permanent Link: Haystack new storage solution for billions of photos'>Haystack new storage solution for billions of photos</a></li>
<li><a href='http://planet.admon.org/howto/mpb-innodb-vs-myisam-vs-falcon/' rel='bookmark' title='Permanent Link: MPB: InnoDB vs MyISAM vs Falcon'>MPB: InnoDB vs MyISAM vs Falcon</a></li>
<li><a href='http://planet.admon.org/howto/what-data-is-cached-by-operation-system/' rel='bookmark' title='Permanent Link: What data is cached by operation system'>What data is cached by operation system</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Facebook released a kernel module called <a href="http://github.com/facebook/flashcache">Flashcache</a> this wednesday, which is used to speed up MySQL by caching data in faster media like SSD disks.  It&#8217;s only tested for kernel versions 2.6.18 and 2.6.20.<span id="more-600"></span></p>
<p>As mentioned at <a href="http://www.facebook.com/">Facebook.com</a>:</p>
<blockquote><p>We built Flashcache to help us scale InnoDB/MySQL, but it was designed as a generic caching module that can be used with any application built on top of any block device. For InnoDB, when the working set does not fit in the InnoDB buffer pool, read latency is significantly improved due to caching more of the working set in faster media, such as SSD&#8217;s. We also improve write performance by first caching writes in SSD&#8217;s and lazily flushing the data back to disk.</p></blockquote>
<p>It looks like its based on the <a href="http://users.cis.fiu.edu/~zhaom/dmcache/index.html">dm-cache</a> work. It&#8217;s nice to see that moving again.</p>
<p>Read more details about Flashcache <a href="http://www.facebook.com/note.php?note_id=388112370932">here at Facebook&#8217;s announcing page</a>, and Flashcache&#8217;s source code is available at <a href="http://github.com/facebook/flashcache">GitHub.com</a>.</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/haystack-new-storage-solution-for-billions-of-photos/' rel='bookmark' title='Permanent Link: Haystack new storage solution for billions of photos'>Haystack new storage solution for billions of photos</a></li>
<li><a href='http://planet.admon.org/howto/mpb-innodb-vs-myisam-vs-falcon/' rel='bookmark' title='Permanent Link: MPB: InnoDB vs MyISAM vs Falcon'>MPB: InnoDB vs MyISAM vs Falcon</a></li>
<li><a href='http://planet.admon.org/howto/what-data-is-cached-by-operation-system/' rel='bookmark' title='Permanent Link: What data is cached by operation system'>What data is cached by operation system</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/flashcache-caching-data-in-ssd-disks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Batch rename files in Linux</title>
		<link>http://planet.admon.org/howto/batch-rename-files-in-linux/</link>
		<comments>http://planet.admon.org/howto/batch-rename-files-in-linux/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 07:55:35 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[rename]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=595</guid>
		<description><![CDATA[Is there any easy ways to batch rename files in Linux? A common requirement is that the web developers may ask you to help rename all *.html files to *.htm, how can we do that? Someone probably will say that they can make a simple script in some minutes to do this kind of things. [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/rename-a-vserver-step-by-step/' rel='bookmark' title='Permanent Link: Rename a Vserver step by step'>Rename a Vserver step by step</a></li>
<li><a href='http://planet.admon.org/howto/set-syste-variables-in-debian-and-centos/' rel='bookmark' title='Permanent Link: Set system variables in Debian and CentOS'>Set system variables in Debian and CentOS</a></li>
<li><a href='http://planet.admon.org/howto/manage-debian-auto-startup-scripts/' rel='bookmark' title='Permanent Link: Manage Debian auto startup scripts'>Manage Debian auto startup scripts</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Is there any easy ways to batch rename files in Linux? A common requirement is that the web developers may ask you to help rename all <em>*.html</em> files to<em> *.htm</em>, how can we do that?<span id="more-595"></span></p>
<p>Someone probably will say that they can make a simple script in some minutes to do this kind of things. Actually you don&#8217;t need to recreate the wheel, the operating system have supplied such an utility already, the command is rename, it&#8217;s part of the <a href="http://www.kernel.org/pub/linux/utils/util-linux/">util-linux package</a>.</p>
<p>With the help of this command, it&#8217;s a very easy work to bulk rename files.<br />
But, note that this command is a little different by systems.<br />
Here we&#8217;ll show the usage examples for <strong>rename</strong> in both Redhat / CentOS and Debian / Ubuntu.</p>
<p><strong>1, Batch rename files in Redhat / CentOS</strong><br />
For the scenario we mentioned above, it can be done like this:</p>
<pre>$ rename .html .htm *</pre>
<p>It renames all files in current working directory that match <em>*.html*</em> to <em>*.htm*</em>.<br />
Note that only the first matched occurrence will be modified. If there&#8217;s a file called <em>abc.html.abc.html</em>, after renamed once, the new name is abc.htm.abc.html, not abc.html.abc.htm.</p>
<p><strong>2, Bulk rename files in Debian / Ubuntu</strong><br />
The command here in Debian are quite different which makes it more powerful and professional.<br />
I&#8217;ll show two examples with explaination:</p>
<pre>$ rename -n 's/.html$/htm/' *</pre>
<p><em>-n</em> means no action will be applied, it will shows detailed information on what files would have been renamed:</p>
<pre>$ rename -n 's/.html$/.htm/' abc.html.abc.html
abc.html.abc.html renamed as abc.html.abc.htm</pre>
<p>The expression regunation here is in Perl style, which means you can apply multiple actions at one time, like this:</p>
<pre>$ rename 's/.html$/htm/, s/css/css.backup/, s/jscript/js/' *</pre>
<p>For more details you can raise a forum thread <a href="http://forum.admon.org/linux-scripting/">here at our support forum</a>.</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/rename-a-vserver-step-by-step/' rel='bookmark' title='Permanent Link: Rename a Vserver step by step'>Rename a Vserver step by step</a></li>
<li><a href='http://planet.admon.org/howto/set-syste-variables-in-debian-and-centos/' rel='bookmark' title='Permanent Link: Set system variables in Debian and CentOS'>Set system variables in Debian and CentOS</a></li>
<li><a href='http://planet.admon.org/howto/manage-debian-auto-startup-scripts/' rel='bookmark' title='Permanent Link: Manage Debian auto startup scripts'>Manage Debian auto startup scripts</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/batch-rename-files-in-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using VETH instead of VENET in OpenVZ</title>
		<link>http://planet.admon.org/howto/using-veth-instead-of-venet-in-openvz/</link>
		<comments>http://planet.admon.org/howto/using-veth-instead-of-venet-in-openvz/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 13:42:52 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[venet]]></category>
		<category><![CDATA[veth]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=586</guid>
		<description><![CDATA[By default OpenVZ is using VENET as network device. It does packet switching based on IP header, which makes it look like a point-to-point connection between VPS and the physical host. An alternative device is Virtual Ethernet device (a.k.a. VETH). Veth is an Ethernet-like device, unlike venet network device, veth device has a MAC address, [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/openvz-on-centos-5-3-installation-and-config/' rel='bookmark' title='Permanent Link: OpenVZ On CentOS 5.4 installation and configuration'>OpenVZ On CentOS 5.4 installation and configuration</a></li>
<li><a href='http://planet.admon.org/howto/how-do-i-set-up-hugepages-in-rhel/' rel='bookmark' title='Permanent Link: How do I set up hugepages in RHEL?'>How do I set up hugepages in RHEL?</a></li>
<li><a href='http://planet.admon.org/howto/what-network-issues-should-be-monitored/' rel='bookmark' title='Permanent Link: What network issues should be monitored?'>What network issues should be monitored?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.admon.org/wp-content/uploads/2010/04/openvz.png"><img class="size-full wp-image-743 alignleft" title="openvz" src="http://planet.admon.org/wp-content/uploads/2010/04/openvz.png" alt="" width="135" height="135" /></a>By default <a href="http://wiki.openvz.org/Main_Page">OpenVZ</a> is using VENET as network device. It does packet switching based on IP header, which makes it look like a point-to-point connection between VPS and the physical host. An alternative device is <a href="http://wiki.openvz.org/Virtual_Ethernet_device">Virtual Ethernet device</a> (a.k.a. VETH).<br />
<span id="more-586"></span><br />
Veth is an Ethernet-like device, unlike <a href="http://wiki.openvz.org/Venet">venet</a> network device, veth device has a MAC address, therefore it can be used in configurations. When veth is bridged to ethX or other device, the administrator is able to sets up his networking himself, including IPs, gateways etc.</p>
<p>VENet consists of two Ethernet devices &#8212; the one in physical server and another one in virtualized guest. These devices are connected to each other, so if a packet goes into one device it will come out from the other device.</p>
<p>In this post, we&#8217;ll share some tips on how to enable venet. The content is mainly from OpenVZ&#8217;s <a href="http://wiki.openvz.org/Virtual_Ethernet_device#Adding_veth_to_a_CT">official guide</a>.</p>
<p>The commands that we used are listed below with explanations.</p>
<p>Firstly, assuming that we&#8217;re in the physical server, We need to add a new device named eth0</p>
<pre>vzctl set 150 --netif_add eth0,00:12:34:56:78:9A,veth101.0,00:12:34:56:78:9B --save</pre>
<p>The second MAC address is from the mother side, and the first MAC address is self-generated. Click here if you&#8217;re not sure <a href="http://planet.admon.org/howto/generate-mac-address-by-scripts/">how to generate a MAC address</a>.</p>
<p>Then enable forwarding and ARP proxy, and apply some changes in route table:</p>
<pre># cat veth150.sh
ifconfig veth150.0 0
echo 1 &gt; /proc/sys/net/ipv4/conf/veth150.0/forwarding
echo 1 &gt; /proc/sys/net/ipv4/conf/veth150.0/proxy_arp
echo 1 &gt; /proc/sys/net/ipv4/conf/eth0/forwarding
echo 1 &gt; /proc/sys/net/ipv4/conf/eth0/proxy_arp
ip route add 192.168.201.150 dev veth150.0</pre>
<p>Warning: Before making these changes to your system, you&#8217;re suggested to verify what exactly you&#8217;re doing. For example, proxy_arp is problematic in a mixed network.</p>
<p>Secondly, in the VPS we need to config the new device eth0 like this:</p>
<pre>/sbin/ifconfig venet0:0 0
/sbin/ifconfig eth0 0
/sbin/ip addr add 192.168.201.150 dev eth0
/sbin/ip route add default dev eth0</pre>
<p>The IP address <em>192.168.201.150</em> can be in a different network from the physical side, you just need to make sure they are in the same VLAN.</p>
<p>When it&#8217;s tested OK, don&#8217;t forget to modify your network configuration files in <em>/etc/sysconfig/network-scripts/</em> for a permanent change.</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/openvz-on-centos-5-3-installation-and-config/' rel='bookmark' title='Permanent Link: OpenVZ On CentOS 5.4 installation and configuration'>OpenVZ On CentOS 5.4 installation and configuration</a></li>
<li><a href='http://planet.admon.org/howto/how-do-i-set-up-hugepages-in-rhel/' rel='bookmark' title='Permanent Link: How do I set up hugepages in RHEL?'>How do I set up hugepages in RHEL?</a></li>
<li><a href='http://planet.admon.org/howto/what-network-issues-should-be-monitored/' rel='bookmark' title='Permanent Link: What network issues should be monitored?'>What network issues should be monitored?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/using-veth-instead-of-venet-in-openvz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUM: Download a RPM package without installation</title>
		<link>http://planet.admon.org/howto/yum-download-a-rpm-package-without-installation/</link>
		<comments>http://planet.admon.org/howto/yum-download-a-rpm-package-without-installation/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 14:07:19 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[yum]]></category>
		<category><![CDATA[yum-utils]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=576</guid>
		<description><![CDATA[Yum is commonly used in major RPM based Linux distributions such as CentOS, Redhat and SuSE, it can help us perform automatic dependency checking. If you&#8217;d like to only download the RPM packages via yum and do not install/update them, it&#8217;s nearly impossible by default. How can we download a RPM package using YUM? Generally, [...]


Related posts:<ol><li><a href='http://planet.admon.org/howto/how-to-skip-broken-dependencies-when-upgrading-system/' rel='bookmark' title='Permanent Link: How to skip broken dependencies when Upgrading System'>How to skip broken dependencies when Upgrading System</a></li>
<li><a href='http://planet.admon.org/howto/openvz-on-centos-5-3-installation-and-config/' rel='bookmark' title='Permanent Link: OpenVZ On CentOS 5.4 installation and configuration'>OpenVZ On CentOS 5.4 installation and configuration</a></li>
<li><a href='http://planet.admon.org/howto/update-centos-4-to-centos-5-remotely/' rel='bookmark' title='Permanent Link: Update CentOS 4 to CentOS 5 remotely'>Update CentOS 4 to CentOS 5 remotely</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.admon.org/wp-content/uploads/2010/04/yum.png"><img class="size-full wp-image-738 alignleft" title="yum" src="http://planet.admon.org/wp-content/uploads/2010/04/yum.png" alt="Yellowdog Updater, Modified" width="185" height="70" /></a>Yum is commonly used in major RPM based Linux distributions such as <a href="http://www.centos.org/">CentOS</a>, <a href="http://www.redhat.com/">Redhat</a> and <a href="http://www.novell.com/linux/">SuSE</a>, it can help us perform automatic dependency checking. If you&#8217;d like to only download the RPM packages via yum and do not install/update them, it&#8217;s nearly impossible by default. <span id="more-576"></span></p>
<p>How can we download a RPM package using YUM?  Generally, there are two ways, you can use either <strong>yum-downloadonly</strong> or <strong>yum-utils</strong>.  <strong>1, yum-downloadonly installation and usage example</strong> You just need to install a plugin called yum-downloadonly. This plugin supplies a new parameter called <em>&#8211;downloadonly</em> so that yum can download the package  s without an further installation/upgrade. It&#8217;s much like <a href="http://www.debian.org/doc/manuals/apt-howto/">apt-get</a>&#8216;s -d option in Ubuntu/Debian:</p>
<pre>$ yum --help| grep download
Loaded plugins: downloadonly, fastestmirror
  --downloadonly        don't update, just download
  --downloaddir=DLDIR   specifies an alternate directory to store package</pre>
<p>A further question is How can I install the download-only plugin for Yum? It&#8217;s as simple as a normal install, you just need to run:</p>
<pre>$ sudo yum install yum-downloadonly</pre>
<p>If you wanna download a package without installation, you just need to add the parameter <em>&#8211;downloadonly</em>. By default the downloaded package will be stored in /var/cache/yum,  you can specifies an alternate directory to store this file such as /opt, like this:</p>
<pre>yum update httpd -y --downloadonly --downloaddir=/opt</pre>
<p><strong>2, yum-utils.noarch installation and usage example</strong></p>
<p><a href="http://yum.baseurl.org/wiki/YumUtils">Yum-utils</a> is a collection of utilities and plugins extending and supplementing yum in different ways, and all the utilities are contained in yum-utils package, including the one that we need which is called yumdownloader.</p>
<pre># yum -y install yum-utils.noarch</pre>
<p>Now we can use the yumdownloader command to download packages from yum repositories. Here&#8217;s an example:</p>
<pre># yumdownloader httpd</pre>
<p>When you get the RPM, you can <a href="http://planet.admon.org/howto/rpm-common-usage-examples/">query further information from it</a>, or decompress it.</p>


<p>Related posts:<ol><li><a href='http://planet.admon.org/howto/how-to-skip-broken-dependencies-when-upgrading-system/' rel='bookmark' title='Permanent Link: How to skip broken dependencies when Upgrading System'>How to skip broken dependencies when Upgrading System</a></li>
<li><a href='http://planet.admon.org/howto/openvz-on-centos-5-3-installation-and-config/' rel='bookmark' title='Permanent Link: OpenVZ On CentOS 5.4 installation and configuration'>OpenVZ On CentOS 5.4 installation and configuration</a></li>
<li><a href='http://planet.admon.org/howto/update-centos-4-to-centos-5-remotely/' rel='bookmark' title='Permanent Link: Update CentOS 4 to CentOS 5 remotely'>Update CentOS 4 to CentOS 5 remotely</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://planet.admon.org/howto/yum-download-a-rpm-package-without-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
