<?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>Nix World</title>
	<atom:link href="http://onaxer.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://onaxer.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 27 Aug 2010 05:48:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SVN plugin inside Eclipse and Microsoft visual Studio</title>
		<link>http://onaxer.com/blog/2010/08/27/svn-plugin-inside-eclipse-and-microsoft-visual-studio/</link>
		<comments>http://onaxer.com/blog/2010/08/27/svn-plugin-inside-eclipse-and-microsoft-visual-studio/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 05:48:32 +0000</pubDate>
		<dc:creator>Pawan Kumar</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=668</guid>
		<description><![CDATA[SVN plugin inside a IDE ( Eclipse or Visual Studio ) is a great help for the developer. Installation of SVN plugin inside Eclipse , I will use subversive plugin here . 1. Go to Help-&#62;Software Updates. 2. Click on the “Available Software” tab. 3. Unfold the Ganymede-&#62;Collaboration Tools node, and , you will see [...]]]></description>
			<content:encoded><![CDATA[<p>SVN plugin inside a IDE ( Eclipse or Visual Studio ) is a great help for the developer.</p>
<p>Installation of SVN plugin inside Eclipse , I will use subversive plugin here .</p>
<p>1. Go to Help-&gt;Software Updates.<br />
2. Click on the “Available Software” tab.<br />
3. Unfold the Ganymede-&gt;Collaboration Tools node, and , you will see the “SVN Team Provider (Incubation)” item , “0.7.1.I20080612-1500″. What you really need  is the version from 2008-08-01.<br />
4. Click on “Manage Sites…”.<br />
5. Uncheck the “Ganymede” checkbox (http://download.eclipse.org/releases/ganymede)<br />
6. Scroll down to find “http://download.eclipse.org/technology/subversive/0.7/update-site/”, select it and click “OK”.<br />
7. You should be back on the “Available Software” tab, with only the subversive items present. Note that the version identifier is “0.7.3.I20080814-1500″.<br />
8. Check the box, and click”install”. The install will be change to an update. Restart Eclipse at the end of the install.<br />
9. Go to “Help-&gt;Software Updates”.<br />
10. Choose the “Available Software” tab.<br />
11. Click the “Add Site” button, and add “http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/”.<br />
12. Check the SVNKit Connectors and click “Install”. Restart Eclipse at the end of the install.<br />
13. Subversive should be working !</p>
<p>Installation of SVN plugin inside Visual Studio IDE</p>
<p>This is very simple just install AnkhSvn exe from the site</p>
<p>http://ankhsvn.open.collab.net/downloads</p>
<p>Install this exe and restart Visual Studio .<br />
This will work on Visual Studio 2005/05/10.</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/27/svn-plugin-inside-eclipse-and-microsoft-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tomcat 6 installation on CentOS 5/RHEL</title>
		<link>http://onaxer.com/blog/2010/08/25/tomcat-6-installation-on-centos-5rhel/</link>
		<comments>http://onaxer.com/blog/2010/08/25/tomcat-6-installation-on-centos-5rhel/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 06:25:54 +0000</pubDate>
		<dc:creator>Pawan Kumar</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Tomcat 6 installation on CentOS 5]]></category>
		<category><![CDATA[Tomcat 6 installation on CentOS 5/RHEL]]></category>
		<category><![CDATA[Tomcat6]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=666</guid>
		<description><![CDATA[We can add repository under /etc/yum.repos.d/ wget ‘http://www.jpackage.org/jpackage50.repo’ #rpm -Uvh ‘http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm #yum update # yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps # service tomcat6 start]]></description>
			<content:encoded><![CDATA[<p>We can add repository under /etc/yum.repos.d/<br />
wget ‘http://www.jpackage.org/jpackage50.repo’</p>
<p>#rpm -Uvh ‘http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm</p>
<p>#yum update<br />
# yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps<br />
# service tomcat6 start</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/25/tomcat-6-installation-on-centos-5rhel/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Oracle 10g R2 installtion on CentOS 5.5/RHEL</title>
		<link>http://onaxer.com/blog/2010/08/25/oracle-10g-r2-installtion-on-centos-5-5rhel/</link>
		<comments>http://onaxer.com/blog/2010/08/25/oracle-10g-r2-installtion-on-centos-5-5rhel/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 06:24:00 +0000</pubDate>
		<dc:creator>Pawan Kumar</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[CentOS 5.5 /RHEL]]></category>
		<category><![CDATA[installtion on CentOS 5.5/RHEL]]></category>
		<category><![CDATA[Oracle 10g R2]]></category>
		<category><![CDATA[Oracle 10g R2 installtion on CentOS 5.5/RHEL]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=661</guid>
		<description><![CDATA[The main required packages for installing oracle are (installing on 32 bit architecture) binutils.i386 compat-gcc-7.3-2.96.128.i386 compat-gcc-c++-7.3-2.96.128.i386 compat-libstdc++-7.3-2.96.128.i386 compat-libstdc++-devel-7.3-2.96.128.i386 cpp.i386 gcc.i386 gcc-c++.i386 glibc.i386 glibc-common.i386 glibc-devel.i386 glibc-headers.i386 glibc-kernheaders.i386 libstdc++.i386 libstdc++-devel.i386 libaio libai-devel.i386 pdksh.i386 setarch.i386 sysstat.i386 Download the Oracle 10gR2 from , http://www.oracle.com/technology/software/products/database/oracle10g/index.html Preinstallation Steps: 1. Edit /etc/hosts file 2. Edit /etc/sysctl.conf #kernel.shmall = 2097152 #kernel.shmmax = 2147483648 [...]]]></description>
			<content:encoded><![CDATA[<p>The main required packages for installing oracle are (installing on 32 bit architecture)</p>
<p>binutils.i386<br />
compat-gcc-7.3-2.96.128.i386<br />
compat-gcc-c++-7.3-2.96.128.i386<br />
compat-libstdc++-7.3-2.96.128.i386<br />
compat-libstdc++-devel-7.3-2.96.128.i386<br />
cpp.i386<br />
gcc.i386<br />
gcc-c++.i386<br />
glibc.i386<br />
glibc-common.i386<br />
glibc-devel.i386<br />
glibc-headers.i386<br />
glibc-kernheaders.i386<br />
libstdc++.i386<br />
libstdc++-devel.i386<br />
libaio<br />
libai-devel.i386<br />
pdksh.i386<br />
setarch.i386<br />
sysstat.i386</p>
<p>Download the Oracle 10gR2 from ,</p>
<p>http://www.oracle.com/technology/software/products/database/oracle10g/index.html</p>
<p>Preinstallation Steps:<br />
1. Edit /etc/hosts file</p>
<p>2. Edit /etc/sysctl.conf<br />
#kernel.shmall = 2097152<br />
#kernel.shmmax = 2147483648<br />
kernel.shmmni = 4096<br />
# semaphores: semmsl, semmns, semopm, semmni<br />
kernel.sem = 250 32000 100 128<br />
#fs.file-max = 65536<br />
net.ipv4.ip_local_port_range = 1024 65000<br />
net.core.rmem_default=262144<br />
net.core.rmem_max=262144<br />
net.core.wmem_default=262144<br />
net.core.wmem_max=262144</p>
<p>3. Run the following command to change the kernel parameters</p>
<p>/sbin/sysctl -p</p>
<p>4. Add the following security parameter<br />
in /etc/security/limits.conf</p>
<p>oracle    soft  nproc  2047<br />
oracle    hard  nproc  16384<br />
oracle    soft  nofile  1024<br />
oracle    hard  nofile  65536</p>
<p>5. Edit /etc/pam.d/login and add following line</p>
<p>session    required     pam_limits.so</p>
<p>6. SElinux and firewall should be turned off</p>
<p>check /etc/selinux/config</p>
<p>SELINUX=disabled</p>
<p>7. Creating following users and Groups</p>
<p>groupadd oinstall<br />
groupadd dba<br />
groupadd oper</p>
<p>useradd -g oinstall -G dba oracle<br />
passwd oracle</p>
<p>8. Oracle will be installed in the following Directories</p>
<p>#mkdir -p /u01/app/oracle/product/10.2.0/db_1<br />
#chown -R oracle.oinstall /u01</p>
<p>9. Login as Root user on the machine in GUI console and execute<br />
#xhost +<br />
This will enable other users to use X console</p>
<p>10. Take backup of the file /etc/redhat-release to /etc/redhat-release.original</p>
<p>and edit /etc/redhat-release<br />
#echo &#8220;redhat-4&#8243;&gt; /etc/redhat-release</p>
<p>11. Edit the /home/oracle/.bash_profile<br />
add the following lines</p>
<p># Oracle Settings<br />
TMP=/tmp; export TMP<br />
TMPDIR=$TMP; export TMPDIR</p>
<p>ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE<br />
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME<br />
ORACLE_SID=TSH1; export ORACLE_SID<br />
ORACLE_TERM=xterm; export ORACLE_TERM<br />
PATH=/usr/sbin:$PATH; export PATH<br />
PATH=$ORACLE_HOME/bin:$PATH; export PATH</p>
<p>LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH<br />
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH</p>
<p>if [ $USER = "oracle" ]; then<br />
if [ $SHELL = "/bin/ksh" ]; then<br />
ulimit -p 16384<br />
ulimit -n 65536<br />
else<br />
ulimit -u 16384 -n 65536<br />
fi<br />
fi</p>
<p>12. Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable:</p>
<p>DISPLAY=:0.0; export DISPLAY</p>
<p>13. Copy the file 10201_database_linux32.zip into oracle user home directory ,i.e, /home/oracle</p>
<p>and unzip the file.</p>
<p>14. Now the time to start installation</p>
<p>when u extact the file it will create a database directory.<br />
$cd database<br />
$./runInstaller<br />
This will start Oracle Universal Installer</p>
<p>15 . In Oracle Universal Installer</p>
<p>a. Select Advanced Installation<br />
b. Here Specify Inventory Directory and Credentials</p>
<p>Values are : /u01/app/oracle/oraInventory<br />
and OS group name will be onistall</p>
<p>c. Select Installation Type<br />
Enterprise Edition<br />
d. Specify Home Details<br />
Name; db_1<br />
Path ; /u01/app/oracle/product/10.2.0/db_1</p>
<p>e. Product Specific Prerequisite checks</p>
<p>This should come passed ,otherwise select user varified</p>
<p>f. Select Configuration Options</p>
<p>Create Database</p>
<p>g. Select Database configuration</p>
<p>General Purpose</p>
<p>h. Specify Database configuration options<br />
Global Database Name: TSH1<br />
SID : TSH1</p>
<p>i. Select Database management options</p>
<p>use database control for database management</p>
<p>j. Specify Database Storage Option<br />
File System<br />
location /u01/app/oracle/oradata</p>
<p>k. Specify Backup and Recovery Options</p>
<p>Do not enable</p>
<p>l. Specify Database Schema Passwords</p>
<p>give a password which you must remember .</p>
<p>m. Summery and install<br />
when the installation finishes it will show<br />
Database Configuration Assistant<br />
click ok<br />
Now it will give you 2 scripts which must be run as root<br />
#/u01/app/oracle/oraInventory/orainstRoot.sh<br />
#/u01/app/oracle/product/10.2.0/db_1/root.sh</p>
<p>This is the end of installation part.</p>
<p>16. Post installation Steps</p>
<p>Just copy back<br />
#cp /etc/redhat-release.original /etc/redhat-release</p>
<p>Edit the file /etc/oratab , In last change to  Y</p>
<p>TSH1:/u01/app/oracle/product/10.2.0/db_1:Y</p>
<p>17. Autostart and Stop Script , login as root and create a script</p>
<p>This script is required to automatically start/stop  Oracle database</p>
<p>#vim /etc/init.d/dbora</p>
<pre>ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/bin/dbstart ]
then
    echo "Oracle startup: cannot start"
    exit
fi

case "$1" in
    'start')
        # Start the Oracle databases:
        # The following command assumes that the oracle login
        # will not prompt the user for any values
        su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
        ;;
    'stop')
        # Stop the Oracle databases:
        # The following command assumes that the oracle login
        # will not prompt the user for any values
        su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
        ;;
esac

---------------------------------
<pre><a name="Setting up Automatic Database Starting and Stopping"><strong><strong>#chmod 750 /etc/init.d/dbora</strong></strong></a></pre>
</pre>
<pre><a name="Setting up Automatic Database Starting and Stopping">#chkconfig --level 345 dbora on

Now we have created the script which will start/stop with Operating system<strong><strong> </strong></strong></a></pre>
<p>#/etc/init.d/dbora stop</p>
<p>#/etc/init.d/dbora start</p>
<p>Note : you may get the listener waring message while starting oracle db</p>
<pre><a name="Setting up Automatic Database Starting and Stopping">Failed to auto-start Oracle Net Listener using /ade/vikrkuma_new/oracle/bin/tnslsnr</a></pre>
<p>To Resolve the issue ,login as oracle user and  change the file <a name="Setting up Automatic Database Starting and Stopping"><tt>$ORACLE_HOME/bin/dbstart</tt></a></p>
<p>Nearly 78 line</p>
<pre><a name="Setting up Automatic Database Starting and Stopping">ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle

Change to
</a>
<pre><a name="Setting up Automatic Database Starting and Stopping">ORACLE_HOME_LISTNER=$ORACLE_HOME</a></pre>
</pre>
<p>18. As oracle user Login in shell</p>
<p>$sqlplus<br />
usename : SYSTEM<br />
password : givenbyyou</p>
<p>Some of the Reference taken from<br />
1. http://dearlinux.wordpress.com/2010/07/01/installing-oracle-database-10g-release-2-on-linux-rhel-5-part-2/<br />
2. http://www.oracle-base.com/articles/10g/OracleDB10gR2InstallationOnRHEL5.php<br />
3. http://ivan.kartik.sk/oracle/install_ora10gR2_redhat.html</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/25/oracle-10g-r2-installtion-on-centos-5-5rhel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t read /sys/hypervisor/uuid which leads to high load average.</title>
		<link>http://onaxer.com/blog/2010/08/14/cant-read-syshypervisoruuid-which-leads-to-high-load-average/</link>
		<comments>http://onaxer.com/blog/2010/08/14/cant-read-syshypervisoruuid-which-leads-to-high-load-average/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 15:59:28 +0000</pubDate>
		<dc:creator>Manoj Chauhan</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[/etc/cron.hourly/mcelog.cron]]></category>
		<category><![CDATA[/etc/cron.hourly/mcelog.cron can't read /sys/hypervisor/uuid]]></category>
		<category><![CDATA[cat /sys/hypervisor/uuid]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=663</guid>
		<description><![CDATA[Description of problem: When the daemon of xend stops ,the cron task who is /etc/cron.hourly/mcelog.cron can&#8217;t read /sys/hypervisor/uuid.It leads to D status of &#8220;cat /sys/hypervisor/uuid &#8221; which results in high load average Version-Release number of selected component (if applicable): In RHEL5.4 for 64 bits x86_64 xen kernel. How reproducible: In xen kernel,make the daemon of [...]]]></description>
			<content:encoded><![CDATA[<p>Description of problem:</p>
<p>When the daemon of xend stops ,the cron task who is<br />
/etc/cron.hourly/mcelog.cron can&#8217;t read /sys/hypervisor/uuid.It leads to D<br />
status of &#8220;cat /sys/hypervisor/uuid &#8221; which results in high load average</p>
<p>Version-Release number of selected component (if applicable):<br />
In RHEL5.4 for 64 bits x86_64 xen kernel.</p>
<p>How reproducible:<br />
In xen kernel,make the daemon of xend stop.</p>
<p>Steps to Reproduce:<br />
1.#service xend stop<br />
2.#top  (see the load average by hours)<br />
3.#ps aux |grep &#8220;^D&#8221; (there are lots of &#8220;D&#8221; status process)</p>
<p>Actual results:<br />
See the result of &#8216;ps&#8217; ,we will find there are a lot of &#8220;D&#8221; state<br />
process.Theses process are waiting for cat /sys/hypervisor/uuid.And the load<br />
average become more and more high.<br />
Expected results:</p>
<p>When the daemon of xend stops, the process can read /syst/hypervisor/uuid.The<br />
load average is not high by hours.</p>
<p>[root@server ~]# ps aux | grep /sys/hypervisor/uuid<br />
root       708  0.0  0.0   3796   400 ?        D    05:00   0:00 cat /sys/hypervisor/uuid<br />
root      2313  0.0  0.0   3796   396 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root      4477  0.0  0.0   3796   400 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root      5813  0.0  0.0   3796   396 ?        D    06:00   0:00 cat /sys/hypervisor/uuid<br />
root      6140  0.0  0.0   3796   396 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root      6502  0.0  0.0   3796   400 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root      7403  0.0  0.0   3796   396 ?        D    00:00   0:00 cat /sys/hypervisor/uuid<br />
root      9434  0.0  0.0   3796   396 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root     10902  0.0  0.0   3796   396 ?        D    07:01   0:00 cat /sys/hypervisor/uuid<br />
root     11499  0.0  0.0   3796   400 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root     12471  0.0  0.0   3796   400 ?        D    01:00   0:00 cat /sys/hypervisor/uuid<br />
root     14525  0.0  0.0   3796   396 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root     16579  0.0  0.0   3796   400 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root     16630  0.0  0.0   3796   400 ?        D    08:01   0:00 cat /sys/hypervisor/uuid<br />
root     17055  0.0  0.0  58904   464 ?        D    08:07   0:00 cat /sys/hypervisor/uuid<br />
root     17562  0.0  0.0   3796   396 ?        D    02:00   0:00 cat /sys/hypervisor/uuid<br />
root     18017  0.0  0.0  61160   748 pts/2    S+   08:17   0:00 grep /sys/hypervisor/uuid<br />
root     19598  0.0  0.0   3796   396 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid<br />
root     21655  0.0  0.0   3796   400 ?        D    Aug13   0:00 cat /sys/hypervisor/uuid</p>
<p>Due to this load average is very -2 high ( load average: 22.09, 22.07, 22.01). After stopping xend #service xend stop and i have started again and all cat /sys/hypervisor/uuid process stopped and i have stopped this process again.</p>
<p>After restarting xend services, all /sys/hypervisor/uuid processes killed and also load average was coming donw<br />
[root@server ~]# ps aux | grep /sys/hypervisor/uuid<br />
root     21666  0.0  0.0  61160   736 pts/0    S+   08:30   0:00 grep /sys/hypervisor/uuid<br />
[root@server ~]#</p>
<p>[root@server ~]# uptime<br />
08:30:26 up 22:03,  1 user,  load average: 2.35, 14.47, 19.67<br />
[root@server ~]#</p>
<p>Thanks<br />
Manoj</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/14/cant-read-syshypervisoruuid-which-leads-to-high-load-average/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading MySQL from 4 to 5</title>
		<link>http://onaxer.com/blog/2010/08/14/upgrading-mysql-from-4-to-5/</link>
		<comments>http://onaxer.com/blog/2010/08/14/upgrading-mysql-from-4-to-5/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 05:07:47 +0000</pubDate>
		<dc:creator>Pawan Kumar</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[How Upgrading MySQL from 4 to 5]]></category>
		<category><![CDATA[MySql upgrade]]></category>
		<category><![CDATA[Upgrading MySQL]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=654</guid>
		<description><![CDATA[MySQL upgradation is a simple process of removing old binaries and installing the new one. Following is a process of how to upgrade MySQL 4.1 to MySQL 5 on RHAS 4 Note: Before going to upgrade your database take a backup of your database and /etc/my.cnf file. Now find out the current packages Installed on [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL upgradation is a simple process of removing old binaries and installing the new one.<br />
Following is a process of how to upgrade MySQL 4.1 to MySQL 5 on RHAS 4</p>
<p>Note: Before going to upgrade your database take a backup of your database and /etc/my.cnf file.</p>
<p>Now find out the current packages Installed on your system by</p>
<p>[root@localhost~]# rpm –qa | grep mysql<br />
mysqlclient10-3.23.58-4.RHEL4.1<br />
mysql-devel-4.1.7-4.RHEL4.1<br />
mysql-server-4.1.7-4.RHEL4.1<br />
mysql-4.1.7-4.RHEL4.1<br />
mod_auth_mysql-2.6.1-2.1<br />
mysql-bench-4.1.7-4.RHEL4.1<br />
libdbi-dbd-mysql-0.6.5-10.RHEL4.1<br />
php-mysql-4.3.9-3.1</p>
<p>Once you find out the packages now its time to remove the unwanted packages mainly server and client, but the communication packages and authentication packages can be remain as it is; if require you can remove those also.</p>
<p>I have selected the following packages to remove, remove it by following command</p>
<p>rpm -e &#8211;nodeps mysql-devel-4.1.7-4.RHEL4.1<br />
rpm -e &#8211;nodeps mysql-server-4.1.7-4.RHEL4.1<br />
rpm -e &#8211;nodeps mysql-4.1.7-4.RHEL4.1<br />
rpm -e &#8211;nodeps mysql-bench-4.1.7-4.RHEL4.1<br />
rpm -e &#8211;nodeps mysql-bench-4.1.7-4.RHEL4.1</p>
<p>Once you have removed the mysql packages, restart the server (Not necessary but better to do)<br />
Before restarting the server check the folder name mysql on location /var/lib; this folder is actual repository of your mysql databases.</p>
<p>After restarting deploy the mysql 5 packages by issuing following command</p>
<p>rpm -ivh MySQL-server-community-5.0.51a-0.rhel4.i386.rpm<br />
rpm -ivh MySQL-client-community-5.0.51a-0.rhel4.i386.rpm<br />
rpm -ivh MySQL-shared-compat-5.0.51a-0.rhel4.i386.rpm<br />
rpm -ivh MySQL-devel-community-5.0.51a-0.rhel4.i386.rpm</p>
<p>Here you have upgrade the mysql 4 to mysql 5. Now try to log in to the database by using your previously defined database user and password.</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/14/upgrading-mysql-from-4-to-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Delete a Big Number of Files in a Folder</title>
		<link>http://onaxer.com/blog/2010/08/13/how-to-delete-a-big-number-of-files-in-a-folder/</link>
		<comments>http://onaxer.com/blog/2010/08/13/how-to-delete-a-big-number-of-files-in-a-folder/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 07:38:13 +0000</pubDate>
		<dc:creator>Manoj Chauhan</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[-bash: /bin/rm: Argument list too long]]></category>
		<category><![CDATA[Delete a Big Number of Files in a Folder]]></category>
		<category><![CDATA[hard to delete them as their number is growing]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=658</guid>
		<description><![CDATA[If you’re using temporary files you should notice that after some time it is hard to delete them as their number is growing. If you have many files and try to delete them with a usual command rm -f you should receive something like this: [root@server html]# rm -f * -bash: /bin/rm: Argument list too [...]]]></description>
			<content:encoded><![CDATA[<p>If you’re using temporary files you should notice that after some time it is hard to delete them as their number is growing. If you have many files and try to delete them with a usual command rm -f you should receive something like this:</p>
<p>[root@server html]# rm -f *<br />
-bash: /bin/rm: Argument list too long</p>
<p>OR</p>
<p>In our case (Number of files in the folder is around 1 million ) if we run ls or other command, linux shell prompt hung and we need to start new terminal.</p>
<p>What to do when this occurs? You have to combine several Linux commands in order to empty this folder. Here is the command you should use; I will explain what does it do below.</p>
<p>[root@server html]# ls | grep .| xargs rm</p>
<p>This will do the following: the first command ls outputs the list of files. The output is being sent to grep command so you won’t see it in your console. Grep searches for files with “.” symbol (in the example given I think that all your files have so named extension – filenames contain a dot. So grep will extract all the file names that contain a dot and will throw them to the next function – xargs. xargs accepts these filenames and deletes them one by one. This allows to reduce server load and gives us the possibility to delete multiple files in one folder that are no longer necessary.</p>
<p>Thanks<br />
Manoj</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/13/how-to-delete-a-big-number-of-files-in-a-folder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SVN installation with Apache</title>
		<link>http://onaxer.com/blog/2010/08/13/svn-installation-with-apache/</link>
		<comments>http://onaxer.com/blog/2010/08/13/svn-installation-with-apache/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 03:18:36 +0000</pubDate>
		<dc:creator>Pawan Kumar</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=652</guid>
		<description><![CDATA[1. First of all, install apache/httpd * yum install httpd 2. Make sure you apache is running. You can also type &#8216;http://localhost&#8217; at your browser and apache test page should appear if your apache is running * /etc/init.d/httpd status 3. Make it start by default on startup * chkconfig httpd on 4. Edit the apache [...]]]></description>
			<content:encoded><![CDATA[<p>1. First of all, install apache/httpd<br />
* yum install httpd<br />
2. Make sure you apache is running. You can also type &#8216;http://localhost&#8217; at your browser and apache test page should appear if your apache is running<br />
* /etc/init.d/httpd status<br />
3. Make it start by default on startup<br />
* chkconfig httpd on<br />
4. Edit the apache configuration to suit your need. If not sure, leave the default setting as it is<br />
* vi /etc/httpd/conf/httpd.conf<br />
5. Install subversion and mod_dav_svn for apache<br />
* yum install mod_dav_svn subversion<br />
6. Go to subversion.conf in /etc/httpd/conf.d/. Edit as below<br />
* cd /etc/httpd/conf.d/<br />
* vi subversion.conf</p>
<p>1. This is the most basic configuration where anyone will have unrestricted access to the repos. Location is the name that will be used in the browser address bar. In this example it will be &#8216;http://localhost/svn/repos&#8217;</p>
<p>2. This is a configuration with username and password for the client</p>
<p>DAV svn</p>
<p>SVNListParentPath on</p>
<p>SVNParentPath /usr/local/svn/</p>
<p>AuthType Basic</p>
<p>AuthName &#8220;Subversion repositories&#8221;</p>
<p>AuthUserFile &#8220;/etc/httpd/conf.d/svnuserconf&#8221;</p>
<p>Require valid-user</p>
<p>1.<br />
* htpasswd -cm /etc/httpd/conf.d/svnuserconf admin &#8212; This command is not needed for the first configuration. To create the first user with password<br />
* htpasswd -m /etc/httpd/conf.d/svnuserconf pawan &#8212; use this command to add another user<br />
2. Configure your repository<br />
* mkdir /usr/local/svn &#8212; create folder svn<br />
* cd /usr/local/svn &#8212; change diectory to the newly created svn directory<br />
* svnadmin create repos &#8212; create svn repository named repos<br />
* chown apache.apache -R repos &#8212; change ownership of &#8216;repos&#8217; to apache<br />
* /etc/init.d/httpd restart &#8212; restart apache<br />
* If you are running different apache change port no from conf file.<br />
3. Open you browser and type &#8216;http://localhost/svn/repos&#8217;. You can see that a page with &#8216;Revision 0:/&#8217; will appear. Congratulation, you just completed the setup for svn server</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/13/svn-installation-with-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH login expect shell script to supply username and password</title>
		<link>http://onaxer.com/blog/2010/08/12/ssh-login-expect-shell-script-to-supply-username-and-password/</link>
		<comments>http://onaxer.com/blog/2010/08/12/ssh-login-expect-shell-script-to-supply-username-and-password/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 07:42:37 +0000</pubDate>
		<dc:creator>Manoj Chauhan</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[apassing ruments expect shell script]]></category>
		<category><![CDATA[aruments expect shell script]]></category>
		<category><![CDATA[expect shell script with aruments]]></category>
		<category><![CDATA[how pass aruments expect shell script]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=655</guid>
		<description><![CDATA[#!/usr/bin/expect -f # Expect script to supply root/admin password for remote ssh server # and execute command. # This script needs three argument to(s) connect to remote server: # password = Password of remote UNIX server, for root user. # ipaddr = IP Addreess of remote UNIX server, no hostname # scriptname = Path to [...]]]></description>
			<content:encoded><![CDATA[<p>#!/usr/bin/expect -f<br />
# Expect script to supply root/admin password for remote ssh server<br />
# and execute command.<br />
# This script needs three argument to(s) connect to remote server:<br />
# password = Password of remote UNIX server, for root user.<br />
# ipaddr = IP Addreess of remote UNIX server, no hostname<br />
# scriptname = Path to remote script which will execute on remote server<br />
# For example:<br />
#  ./sshlogin.exp password 192.168.1.11 who<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
# Copyright (c) 2010 Onaxer project &lt;http://onaxer.com/&gt;<br />
# This script is licensed under GNU GPL version 2.0 or above<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
# This script is part of Onaxer shell script collection (NSSC)<br />
# Visit http://onaxer.com/ for more information.<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
# set Variables<br />
set password [lrange $argv 0 0]<br />
set ipaddr [lrange $argv 1 1]<br />
set scriptname [lrange $argv 2 2]<br />
set arg1 [lrange $argv 3 3]<br />
set timeout -1<br />
# now connect to remote UNIX box (ipaddr) with given script to execute<br />
spawn ssh root@$ipaddr $scriptname $arg1<br />
match_max 100000<br />
# Look for passwod prompt<br />
expect &#8220;*?assword:*&#8221;<br />
# Send password aka $password<br />
send &#8212; &#8220;$password\r&#8221;<br />
# send blank line (\r) to make sure we get back to gui<br />
send &#8212; &#8220;\r&#8221;<br />
expect eof</p>
<p>Thanks<br />
Manoj Chauhan</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/12/ssh-login-expect-shell-script-to-supply-username-and-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup an entire hard disk using dd command</title>
		<link>http://onaxer.com/blog/2010/08/10/backup-an-entire-hard-disk-using-dd-command/</link>
		<comments>http://onaxer.com/blog/2010/08/10/backup-an-entire-hard-disk-using-dd-command/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 05:18:21 +0000</pubDate>
		<dc:creator>Manoj Chauhan</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Backup an entire hard disk using dd command]]></category>
		<category><![CDATA[backup tool]]></category>
		<category><![CDATA[entire hard disk backup]]></category>
		<category><![CDATA[entire hard disk using dd command]]></category>
		<category><![CDATA[linux command to backup]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=649</guid>
		<description><![CDATA[The &#8216; dd &#8216; command is one of the original Unix utilities and should be in everyone&#8217;s tool box. It can strip headers, extract parts of binary files and write into the middle of floppy disks; it is used by the Linux kernel Makefiles to make boot images. It can be used to copy and [...]]]></description>
			<content:encoded><![CDATA[<p>The &#8216; dd &#8216; command is one of the original Unix utilities and should be in everyone&#8217;s tool box. It can strip headers, extract parts of binary files and write into the middle of floppy disks; it is used by the Linux kernel Makefiles to make boot images. It can be used to copy and convert magnetic tape formats, convert between ASCII and EBCDIC, swap bytes, and force to upper and lowercase.</p>
<p>For blocked I/O, the dd command has no competition in the standard tool set. One could write a custom utility to do specific I/O or formatting but, as dd is already available almost everywhere, it makes sense to use it.</p>
<p>Like most well-behaved commands, dd reads from its standard input and writes to its standard output, unless a command line specification has been given. This allows dd to be used in pipes, and remotely with the rsh remote shell command.</p>
<p>Unlike most commands, dd uses a keyword=value format for its parameters. This was reputedly modeled after IBM System/360 JCL, which had an elaborate DD &#8216;Dataset Definition&#8217; specification for I/O devices. A complete listing of all keywords is available from GNU dd with</p>
<p># dd &#8211;help</p>
<p>For more options check dd man page</p>
<p>Using dd you can create backups of an entire harddisk or just a parts of it. This is also usefull to quickly copy installations to similar machines. It will only work on disks that are exactly the same in disk geometry, meaning they have to the same model from the same brand.</p>
<p>full hard disk copy</p>
<p>dd if=/dev/hdx of=/dev/hdy<br />
dd if=/dev/hdx of=/path/to/image<br />
dd if=/dev/hdx | gzip &gt; /path/to/image.gz</p>
<p>Hdx could be hda, hdb etc. In the second example gzip is used to compress the image if it is really just a backup.</p>
<p>Restore Backup of hard disk<br />
copy</p>
<p>dd if=/path/to/image of=/dev/hdx</p>
<p>gzip -dc /path/to/image.gz | dd of=/dev/hdx</p>
<p>MBR backup</p>
<p>In order to backup only the first few bytes containing the MBR and the partition table you can use dd as well.</p>
<p>dd if=/dev/hdx of=/path/to/image count=1 bs=512</p>
<p>MBR restore</p>
<p>dd if=/path/to/image of=/dev/hdx</p>
<p>Add &#8220;count=1 bs=446&#8243; to exclude the partition table from being written to disk. You can manually restore the table.</p>
<p>Thanks<br />
Manoj</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/08/10/backup-an-entire-hard-disk-using-dd-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InnoDB: The InnoDB memory heap is disabled</title>
		<link>http://onaxer.com/blog/2010/07/29/innodb-the-innodb-memory-heap-is-disabled/</link>
		<comments>http://onaxer.com/blog/2010/07/29/innodb-the-innodb-memory-heap-is-disabled/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 14:36:19 +0000</pubDate>
		<dc:creator>Pankaj Joshi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[ERROR]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[MEMORY HEAP]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=634</guid>
		<description><![CDATA[I enabled the innodb_plugin-1.0.4 made the necessary changes into the my.cnf file to bring the innodb plugin into the effect . Restarted MySQL and got the log entry into the MySQL error log InnoDB: The InnoDB memory heap is disabled , on some checking I got in this page (http://www.innodb.com/doc/innodb_plugin-1.0-doc-single/innodb-plugin.html#innodb-performance-use_sys_malloc) that I need to set [...]]]></description>
			<content:encoded><![CDATA[<p>I enabled the  innodb_plugin-1.0.4  made the necessary changes into the my.cnf file to bring the innodb plugin into the effect . Restarted MySQL and got the log entry into the MySQL error log   InnoDB: The InnoDB memory heap is disabled  , on some checking I got in this page (http://www.innodb.com/doc/innodb_plugin-1.0-doc-single/innodb-plugin.html#innodb-performance-use_sys_malloc)  that I need to set<br />
The value of innodb_use_sys_malloc as  0. so I made this entry innodb_use_sys_malloc =0 into the my.cnf and restarted the MySQL and the error was gone , happy MySQling</p>
<p>Thanks<br />
Pankaj Joshi</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/07/29/innodb-the-innodb-memory-heap-is-disabled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InnoDB: Fatal error: cannot allocate the memory for the buffer pool</title>
		<link>http://onaxer.com/blog/2010/07/29/innodb-fatal-error-cannot-allocate-the-memory-for-the-buffer-pool/</link>
		<comments>http://onaxer.com/blog/2010/07/29/innodb-fatal-error-cannot-allocate-the-memory-for-the-buffer-pool/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 14:35:08 +0000</pubDate>
		<dc:creator>Pankaj Joshi</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[BUFFER POOL]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[INNODB ERROR]]></category>
		<category><![CDATA[InnoDB: Fatal error: cannot allocate the memory for the buffer pool]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=635</guid>
		<description><![CDATA[I got this error while I was trying to setup a MySQLServer as Copy of another server I did not check the memory available in the system and I got the error “InnoDB: Fatal error: cannot allocate the memory for the buffer pool” I realized that the memory of the system is less then the [...]]]></description>
			<content:encoded><![CDATA[<pre>I got this error while I was trying to setup a MySQLServer as    Copy
of another server I did not check the memory available in the system
and I got the error
<strong>“InnoDB: Fatal error: cannot allocate the memory for the buffer pool”</strong>
I realized that the memory of the system is less then the  allocated
innodb_buffer_pool_size of 1 GB , I set it less then the   available
memory &lt;1GB , restarted the MySQL and it was done , error gone .</pre>
<pre>Thanks
Pankaj</pre>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/07/29/innodb-fatal-error-cannot-allocate-the-memory-for-the-buffer-pool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using ReiserFS and Linux</title>
		<link>http://onaxer.com/blog/2010/07/20/using-reiserfs-and-linux/</link>
		<comments>http://onaxer.com/blog/2010/07/20/using-reiserfs-and-linux/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 01:34:53 +0000</pubDate>
		<dc:creator>Manoj Chauhan</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring Tools]]></category>
		<category><![CDATA[Disk tunning in linux]]></category>
		<category><![CDATA[performace in linux]]></category>
		<category><![CDATA[ReiserFS and Linux]]></category>
		<category><![CDATA[Using ReiserFS]]></category>
		<category><![CDATA[Using ReiserFS and Linux]]></category>
		<category><![CDATA[what ReiserFS]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=630</guid>
		<description><![CDATA[Introduction In this article, I&#8217;ll show you how to get ReiserFS running under a typical Linux distribution. I&#8217;ll also share lots of technical information on a variety of topics, such as performance considerations and more. Since I&#8217;ll be covering installation first, I recommend that you read this article in its entirety before following the installation [...]]]></description>
			<content:encoded><![CDATA[<p>Introduction</p>
<p>In this article, I&#8217;ll show you how to get ReiserFS running under a typical Linux distribution. I&#8217;ll also share lots of technical information on a variety of topics, such as performance considerations and more. Since I&#8217;ll be covering installation first, I recommend that you read this article in its entirety before following the installation instructions. That way, you&#8217;ll have all the technical notes in the back of your head as you start getting ReiserFS running on your systems, allowing you to make any necessary adjustments along the way.</p>
<p>The Search For A Good Kernel</p>
<p>To enable ReiserFS on your system, you&#8217;ll first need to find a suitable kernel. At the time this article was orginally written (way back in 2001,) finding a suitable kernel for running ReiserFS required some effort, as ReiserFS was still an experimental filesystem. However, these days ReiserFS is no longer considered to be experimental and it&#8217;s quite easy to find a kernel that supports ReiserFS. Unfortunately, Red Hat has removed ReiserFS support from the official Red Hat Enterprise Linux kernel, but it available in the stock Linux kernel sources, as well as various RHEL-based kernels.</p>
<p>If for some reason you are using a 2.4 kernel version, try to avoid early revisions of the kernel and use something that is fairly recent, like 2.4.30 or higher.</p>
<p>Are You Ready?</p>
<p>The first step in using ReiserFS is to make sure that your kernel has ReiserFS support available. To do this, type:</p>
<p>cat /proc/filesystems</p>
<p>If you see &#8220;reiserfs&#8221; listed in the resultant list, then reiserfs support is currently available. You&#8217;re ready to go!</p>
<p>Now, what happens if you don&#8217;t see ReiserFS support listed? Well, it&#8217;s possible that it&#8217;s actually there, but available as a kernel module and not yet loaded. To see if this is the case, first become the root user if you aren&#8217;t root already, and type:</p>
<p># modprobe reiserfs</p>
<p>Was modprobe able to load the reiserfs module? Run the cat /proc/filesystems command again and see if reiserfs is in the list. If it is, great! If not, then it looks like you are going to need to either upgrade to a kernel with ReiserFS support or recompile your existing kernel, if you enjoy doing that kind of thing.</p>
<p>If you&#8217;re up for recompiling your own kernel, here&#8217;s how you&#8217;d go about enabling ReiserFS. First, type make menuconfig in your kernel source tree. Under the Code maturity level options section, make sure that the Prompt for development and/or incomplete code/drivers option is enabled if you are using a 2.4 kernel. Then, head over to the File systems section, and enable ReiserFS support. It&#8217;s recommended that you enable ReiserFS support to be compiled directly into your kernel (not as a module.) You may enable the extra ReiserFS capabilities if you wish. Now, save your settings, compile your kernel (make dep (for kernel 2.4 only); make bzImage; make modules; make modules_install) and configure your boot loader to load the new ReiserFS-enabled kernel.<br />
Important:<br />
It&#8217;s always a good idea to save your current kernel and configure your boot loader so that you can boot with your original kernel, just in case your new kernel doesn&#8217;t work.</p>
<p>Installing the Tools</p>
<p>Now, before you potentially reboot with a brand-new, ReiserFS-enabled kernel, we need to make sure that you have the &#8220;reiserfsprogs&#8221; tools installed. Most modern distributions will have these tools available. To determine if they are installed, run the following command as root:</p>
<p># reiserfsck</p>
<p>Was it found? If so, great! This means that the reiserfsprogs are installed and available. If they aren&#8217;t available, I recommend using your distribution&#8217;s package manager to track down these tools and install them. Once the tools are installed, now would be a good time to reboot to enable a new ReiserFS-enabled kernel if you installed one.</p>
<p>Creating and Mounting the Filesystem</p>
<p>Once rebooted, you&#8217;ll be able to create a ReiserFS filesystem on an empty partition as follows:</p>
<p># mkreiserfs /dev/hdxy</p>
<p>In the above example, /dev/hdxy should be a device node corresponding to a free partition. Mount it as you would any other filesystem:</p>
<p># mkdir /mnt/reiser<br />
# mount /dev/hdxy /mnt/reiser</p>
<p>And, if you&#8217;d like to add a ReiserFS filesystem to your /etc/fstab file, simply set the freq and passno fields to 0, as follows:</p>
<p>/dev/hdc1  /home  reiserfs  defaults  0  0</p>
<p>From this point forward, your ReiserFS filesystems should act identically to their ext2 counterparts, except that you&#8217;ll no longer need to worry about long fsck times, and overall performance will be much better &#8212; especially for small files.</p>
<p>ReiserFS Technical Notes</p>
<p>Filesystem Stability</p>
<p>With a modern kernel, ReiserFS is generally just as reliable as ext2 or ext3. As with all filesystems, a spattering of older kernels had some filesystem corruption bugs in them and should be avoided. However, if you are relying on your Linux distribution&#8217;s selection of kernels, then you should not experience any issues with ReiserFS.</p>
<p>No dump/restore</p>
<p>Yes, it&#8217;s true; ReiserFS does not yet have a dump and restore implementation. If you want to user ReiserFS and happen to be a dump fan, you&#8217;ll have to find some alternate way of backing data. In reality, this turns out to be a non-issue, since 2.4+ kernels are incompatible with dump and restore in the first place. For more information on the dump/kernel incompatibility, read the LKML posting by Linus Torvalds where he says that &#8220;Dump was a stupid program in the first place. Leave it behind.&#8221;</p>
<p>Performance Issues</p>
<p>While ReiserFS generally blows the socks off ext2, ReiserFS does have a few special-case performance weaknesses. The first is sparse file performance. ReiserFS sparse file performance will be significantly worse than ext2. This will change at some point, when the Namesys developers get around to optimizing that part of ReiserFS for ReiserFS 4. Until then, ext2 is a better solution for applications that place heavy demands on sparse (small) files.</p>
<p>Performance Tweaks</p>
<p>Fortunately, there are a couple of easy general performance tweaks you can use to make these problems less severe. The first is to mount your ReiserFS filesystem with the noatime mount option (a mount option that&#8217;s available for other filesystems as well as ReiserFS). As you probably know, UNIX systems record an atime, or access time, for each object on the filesystem that gets updated every time a file is read. For most people, the atime stamp isn&#8217;t very useful and hardly any applications (none I can think of) rely on the atime for any critical task. For this reason, it can usually be safely turned off, which gives a nice all-around performance boost. Generally, unless you specifically know that you need atime support, you should be mounting your filesystems with the noatime option. Use an /etc/fstab entry like this:</p>
<p>/dev/hdc1  /home  reiserfs  noatime  0  0</p>
<p>In first ReiserFS article, I mentioned that ReiserFS has a special feature called &#8220;tail packing&#8221;. In ReiserFS lingo, &#8220;tails&#8221; are files that are smaller than a filesystem block (4k) or the trailing portions of files that don&#8217;t quite fill up a complete filesystem block. ReiserFS has really excellent small-file performance because it is able to incorporate these tails into its b*tree (its primary organizational data structure) so that they are really close to the stat-data (ReiserFS&#8217; equivalent of an i-node). However, since tails don&#8217;t fill up a complete block, they can waste a lot of disk space (relatively speaking, of course). To solve this problem, ReiserFS uses its &#8220;tail packing&#8221; functionality to squish tails into as small a space as possible. Generally, this allows a ReiserFS filesystem to hold around 5% more than an equivalent ext2 filesystem.</p>
<p>Tail Packing Pros and Cons</p>
<p>However, tail packing also has its disadvantages. For one, it does give you a small but significant performance hit. Fortunately, the ReiserFS guys anticipated that some people would be willing to sacrifice around 5% of their disk capacity for a little extra performance, so they created the notail mount option. When a filesystem is mounted with this option, tail packing will be turned off, giving you greater speed and less storage capacity. In general, filesystem performance freaks mount their filesystems with both notail and noatime enabled, producing a noticeable performance improvement:</p>
<p>/dev/hdc1  /home  reiserfs  noatime,notail  0  0</p>
<p>Even if you want to save some disk space, there are times when temporarily mounting your filesystem with the notail option can be a good thing. In particular, some older boot-loaders have problems loading kernels that were created on a ReiserFS filesystem with tail packing enabled. If you&#8217;re using a LILO earlier than version 21.6, you&#8217;ll have this problem. You will also have problems with old versions of GRUB, which will not be able to load its stage1 and stage1_5 files. If you&#8217;re already experiencing this problem, you can fix it by mounting the filesystem with the notail option, moving the files to another filesystem, and then moving them back. When they&#8217;re recreated, they won&#8217;t have tails. Also, remember that you can easily remount a filesystem (with new options) without unmounting it. This particular example remounts the root filesystem with the notail option:</p>
<p># mount / -o remount,notail</p>
<p>Conclusion</p>
<p>I&#8217;ve found ReiserFS to be a truly incredible filesystem, offering oodles of small file performance and great (normally better than ext2) regular file performance. For example, updates to source code repositories using cvs and ReiserFS have been observed to complete in only fifteen seconds, where the same source code tree takes about two minutes to update with ext2. ReiserFS makes many peoples&#8217; lives more pleasant, and allows servers to handle large amounts of simultaneous IO without thrashing hard drives and negatively affecting interactive performance.</p>
<p>In future articles, I hope to take a look at Reiser4, a completely new (and incompatible) version of ReiserFS which sports some interesting new capabilities.</p>
<p>Repairing ReiserFS file system with reiserfsck</p>
<p>The idea and commands in this article submitted by Jacques Wagener via email. In his own words, &#8220;After nuking my partition by accident (and through my stupidity) I was really disappointed in myself, especially in losing my bookmarks and rss-feeds&#8221;. The following article is based upon our email communication. I am just putting them as an article.</p>
<p>We have already written about ext2/ext3 file repair using fsck and other utilities. Linux comes with different filesystems and different repair utilities. To repair a ReiserFS filesystem you need to run reiserfsck command, which is a checking tool for the ReiserFS filesystem (just like fsck command for ext2/ext3 file system).</p>
<p>Reiserfsck searches for a Reiserfs filesystem on a device, replays any necessary transactions, and either checks or repairs the file system. ReiserFS saves data or log in a special file for pending disk updates and later on it commit updates to disk resulting into very good filesystem consistency.</p>
<p>Step # 1: Install reiserfsck</p>
<p>You need to install reiserfsprogs package, which includes reiserfsck user level tools for ReiserFS filesystems.<br />
# apt-get install reiserfsprogs</p>
<p>Or if you are using RedHat/Fedor Core Linux:<br />
# yum install reiserfsprogs</p>
<p>Step # 2: Backup partition/disk</p>
<p>Take system down to runlevel 1.<br />
# init 1</p>
<p>Unmount /dev/sda1 (if it is still mounted as read/write only):<br />
# umount /dev/sda1; umount /dev/sda2</p>
<p>Before using any one of the following command you are strongly advised to make a backup copy of the whole partition using dd or ddrescue (recommended) command.<br />
# ddrescue /dev/sda /dev/sdb</p>
<p>OR use dd command:<br />
# dd if=/dev/sda of=/dev/sdb conv=noerror<br />
Step # 3: Check filesystem consistency</p>
<p>Above command makes a backup of your drive. Next check filesystem consistency which will reports problem to you with the following command (assuming that /dev/sda1 is your partition):<br />
# reiserfsck &#8211;check /dev/sda1</p>
<p>If you get an error Bad root block 0If you get following message:<br />
Running with &#8211;rebuild-tree is required</p>
<p>Then you need to run following command rebuilds the entire filesystem tree using leaf nodes found on the device (this is nothing but indication of corrupted :<br />
# reiserfsck &#8211;scan-whole-partition &#8211;rebuild-tree /dev/sda1</p>
<p>Where,</p>
<p>* &#8211;scan-whole-partition: This option causes &#8211;rebuild-tree to scan the whole partition but not only the used space on the partition. You should always use this option with &#8211;rebuild-tree.<br />
* &#8211;check: Checks filesystem consistency and reports, but does not repair any corruption that it finds.<br />
* &#8211;rebuild-tree: This option rebuilds the entire filesystem tree using leaf nodes found on the device. Once you passed this option, do not stop or interrupt building operating.</p>
<p>Recovering corrupted superblock</p>
<p>Each file system has a superblock, which contains information about file system such as:</p>
<p>* File system type<br />
* Size<br />
* Status<br />
* Information about other metadata structures</p>
<p>If this information lost, you are in trouble (data loss) so Linux maintains multiple redundant copies of the superblock in every file system.</p>
<p>During check (reiserfsck &#8211;check /dev/sda1) if you get an error superblock was missing, use following command to fix superblock:<br />
# reiserfsck &#8211;rebuild-sb /dev/sda1</p>
<p>Where,</p>
<p>* &#8211;rebuild-sb: This option recovers the superblock on a Reiserfs partition. Normally you only need this option if mount reports &#8220;read_super_block: can&#8217;t find a reiserfs file system&#8221;.</p>
<p>Caution: Do not run above command twice on same drive. You will damage your partition (data).<br />
Final note</p>
<p>Next logical step is mount your partition /dev/sda1 and check for your data:<br />
# mkdir -p /mnt/data<br />
# mount /dev/sda1 /mnt/data<br />
# cd /mnt/data<br />
# ls<br />
# ls lost+found/ -l</p>
<p>lost+found is a special directory where recovered files are kept by Linux/reiserfsck. You can examine these files and restore the data.</p>
<p>Better backup entire partition using tar or ssh session:<br />
# tar cvf /dev/nst0 /mnt/data</p>
<p>OR use scp to dump data to remote system:<br />
# scp -r /mnt/data you@myserver.com:/backup</p>
<p>Thanks<br />
Manoj Chauhan</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/07/20/using-reiserfs-and-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Accessing Remote Tables Data in MySQL</title>
		<link>http://onaxer.com/blog/2010/07/16/accessing-remote-tables-data-in-mysql/</link>
		<comments>http://onaxer.com/blog/2010/07/16/accessing-remote-tables-data-in-mysql/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 03:36:33 +0000</pubDate>
		<dc:creator>Pankaj Joshi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Accessing Remote Tables]]></category>
		<category><![CDATA[Accessing Remote Tables Data in MySQL]]></category>
		<category><![CDATA[DML operations]]></category>
		<category><![CDATA[FEDERATED storage engine]]></category>
		<category><![CDATA[FEDERATED table]]></category>
		<category><![CDATA[remote MySQL DB Server]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=611</guid>
		<description><![CDATA[We sometime need to access the data (tables ) which lies on another remote MySQL DB Server , MySQL provides an engine type federated which does exactly what we want . The FEDERATED storage engine enables data to be accessed from a remote MySQL database on a local server without using replication or cluster technology. [...]]]></description>
			<content:encoded><![CDATA[<p>We sometime need to access the data (tables ) which lies on another remote MySQL DB   Server , MySQL provides an engine type  federated  which does exactly what we want .</p>
<p>The FEDERATED storage engine enables data to be accessed from a remote MySQL database on a local server without using replication or cluster technology. When using a FEDERATED table, queries on the local server are automatically executed on the remote (federated) tables. No data is stored on the local tables.</p>
<p>federated table in action</p>
<p>check if the federated engine is enabled</p>
<p>Mysql &gt; show engines;</p>
<p>+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| Engine     | Support | Comment                                                        |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+</p>
<p>| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     |<br />
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         |<br />
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) |<br />
| CSV        | YES     | CSV storage engine                                             |<br />
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      |<br />
| FEDERATED  | YES     | Federated MySQL storage engine                                 |<br />
| ARCHIVE    | YES     | Archive storage engine                                         |<br />
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+</p>
<p>if it is not enabled go to /etc/my.cnf add federated=ON int the  [mysqld] section and restart the MySQL .</p>
<p>Creating original table on remote server</p>
<p>CREATE TABLE test_table (<br />
id     INT(20) NOT NULL AUTO_INCREMENT,<br />
name   VARCHAR(32) NOT NULL DEFAULT &#8221;,<br />
other  INT(20) NOT NULL DEFAULT &#8217;0&#8242;,<br />
PRIMARY KEY  (id),<br />
INDEX name (name),<br />
INDEX other_key (other)<br />
)<br />
ENGINE=MyISAM<br />
DEFAULT CHARSET=latin1;</p>
<p>Create table on the local server</p>
<p>Two methods</p>
<p>1) Creating a FEDERATED Table Using CONNECTION</p>
<p>CREATE TABLE test_table(<br />
id     INT(20) NOT NULL AUTO_INCREMENT,<br />
name   VARCHAR(32) NOT NULL DEFAULT &#8221;,<br />
other  INT(20) NOT NULL DEFAULT &#8217;0&#8242;,<br />
PRIMARY KEY  (id),<br />
INDEX name (name),<br />
INDEX other_key (other)<br />
)<br />
ENGINE=FEDERATED<br />
DEFAULT CHARSET=latin1<br />
CONNECTION=&#8217;mysql://fed_user@remote_host:9306/federated/test_table&#8217;;</p>
<p>more details can be checked on <a href="http://dev.mysql.com/doc/refman/5.1/en/federated-create-connection.html" target="_blank">http://dev.mysql.com/doc/refman/5.1/en/federated-create-connection.html</a></p>
<p>2)Creating a FEDERATED Table Using CREATE SERVER</p>
<p>For example, to create a server connection identical to the CONNECTION string:</p>
<p>CREATE SERVER fedlink<br />
FOREIGN DATA WRAPPER mysql</p>
<p>This server name is used while creating the federated table in CONNECTION</p>
<p>CREATE TABLE test_table (<br />
id     INT(20) NOT NULL AUTO_INCREMENT,<br />
name   VARCHAR(32) NOT NULL DEFAULT &#8221;,<br />
other  INT(20) NOT NULL DEFAULT &#8217;0&#8242;,<br />
PRIMARY KEY  (id),<br />
INDEX name (name),<br />
INDEX other_key (other)<br />
)<br />
ENGINE=FEDERATED<br />
DEFAULT CHARSET=latin1<br />
CONNECTION=&#8217;fedlink/test_table&#8217;;</p>
<p>more details can be checked at <a href="http://dev.mysql.com/doc/refman/5.1/en/federated-create-server.html" target="_blank">http://dev.mysql.com/doc/refman/5.1/en/federated-create-server.html</a></p>
<p>Access the data of the federated table on local server</p>
<p>mysql&gt;use test ;</p>
<p>mysql&gt;select * from test_table ;</p>
<p>federate table acts as a local table and all the select and DML operations can be done as if the table is lying on the local server ,<br />
please note that no actual data is stored on the local sever.</p>
<p>now we can have the cross MySQL  server data access</p>
<p>mysql &gt; select * from localtable join test_table on localtable.id =test_table.id ;</p>
<p>Important things to remember</p>
<p>•	FEDERATED tables may be replicated to other slaves, but you must ensure that the slave servers are able to use the user/password combination that is defined in the CONNECTION string (or the row in the mysql.servers table) to connect to the remote server.<br />
•	The remote server must be a MySQL server.<br />
•	The remote table that a FEDERATED table points to must exist before you try to access the table through the FEDERATED table.<br />
•	The FEDERATED storage engine supports SELECT, INSERT, UPDATE, DELETE, TRUNCATE TABLE, and indexes. It does not support ALTER TABLE, or any Data Definition Language statements that directly affect the structure of the table, other than DROP TABLE. The current implementation does not use prepared statements.      Transactions are not supported.<br />
•	There is no way for the FEDERATED engine to know if the remote table has changed. The reason for this is that this table must work like a data file that would never be written to by anything other than the database system. The integrity of the data in the local table could be breached if there was any change to the remote database.<br />
•	Any DROP TABLE statement issued against a FEDERATED table drops only the local table, not the remote table.<br />
•	FEDERATED tables do not work with the query cache.</p>
<p>Thanks<br />
Pankaj Joshi</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/07/16/accessing-remote-tables-data-in-mysql/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>htaccess to stop files listing &amp; executing any file inside folder</title>
		<link>http://onaxer.com/blog/2010/07/13/htaccess-to-stop-files-listing-executing-any-file-inside-folder/</link>
		<comments>http://onaxer.com/blog/2010/07/13/htaccess-to-stop-files-listing-executing-any-file-inside-folder/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 14:05:58 +0000</pubDate>
		<dc:creator>Manoj Chauhan</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[htaccess to stop executing any file inside folder]]></category>
		<category><![CDATA[htaccess to stop files listing]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=619</guid>
		<description><![CDATA[# htaccess to stop files listing on folder and stop executing any file inside folder like config.ini file etc which are not need to display in the browser IndexIgnore */* (It will stop files listing for specific folder) # deny access to all files of folder Order allow,deny Deny from all Satisfy All Forbidding a [...]]]></description>
			<content:encoded><![CDATA[<p># htaccess to stop files listing on folder and stop executing any file inside folder like config.ini file etc which are not need to display in the browser</p>
<p>IndexIgnore */* (It will stop files listing for specific folder)</p>
<p># deny access to all files of folder<br />
<Files ~ "^.*\.*"><br />
 Order allow,deny<br />
 Deny from all<br />
 Satisfy All<br />
</Files></p>
<p><strong>Forbidding a particular file:</strong></p>
<p>You can forbid a particular file using its name and extension.<br />
<Files config.inc.php><br />
  order allow,deny<br />
  deny from all<br />
</Files></p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/07/13/htaccess-to-stop-files-listing-executing-any-file-inside-folder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to find per-process I/O statistics on Linux</title>
		<link>http://onaxer.com/blog/2010/07/13/how-to-find-per-process-io-statistics-on-linux/</link>
		<comments>http://onaxer.com/blog/2010/07/13/how-to-find-per-process-io-statistics-on-linux/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 03:19:30 +0000</pubDate>
		<dc:creator>Manoj Chauhan</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring Tools]]></category>
		<category><![CDATA[find per-process I/O statistics]]></category>
		<category><![CDATA[find per-process I/O statistics on Linux]]></category>
		<category><![CDATA[I/O statistics on Linux]]></category>
		<category><![CDATA[per-process I/O accounting]]></category>
		<category><![CDATA[per-process I/O statistics]]></category>

		<guid isPermaLink="false">http://onaxer.com/blog/?p=613</guid>
		<description><![CDATA[How to find per-process I/O statistics on Linux: Need to monitor Linux server performance? Try these built-in command and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to find per-process I/O statistics on Linux:</strong></p>
<p>Need to monitor Linux server performance? Try these built-in command and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance problem. The commands discussed below are some of the most basic commands when it comes to system analysis and debugging server issues such as:</p>
<p>1. Finding out bottlenecks.<br />
2. Disk (storage) bottlenecks.<br />
3. CPU and memory bottlenecks.<br />
4. Network bottlenecks.</p>
<p>Newer Linux kernels have per-process I/O accounting and you can use the iotop tool to find out what’s performing I/O, but in many cases I’m trying to find the source of an I/O problem in an older kernel. I found sort of a hack-ish way to do that today, while trying to figure out why a system was basically unresponsive.</p>
<p>I found a post on Stack Overflow that showed a way you can get per process I/O statistics from the kernel even in older kernels. I adapted this to my needs, and wrote a little script.</p>
<p>Here’s how you use it. First, get it:</p>
<p>wget http://aspersa.googlecode.com/svn/trunk/iodump</p>
<p>Then turn on kernel messages about I/O:<br />
echo 1 &gt; /proc/sys/vm/block_dump</p>
<p>This makes the kernel start writing messages about every I/O operation that takes place. Now all you have to do is get those messages and feed them into my script:</p>
<p>while true; do sleep 1; dmesg -c; done | perl iodump</p>
<p>Wait a little while, then cancel the script. The results should look something like the following:</p>
<p>[root@manoj]# while true; do sleep 1; dmesg -c; done | perl iodump</p>
<p>Please wait for some time to get the stats from the dmesg and after 4 to 5 minute, please press Ctrl+c to abort the recording and below stats will come to screen.</p>
<p># Caught SIGINT.<br />
TASK                   PID      TOTAL       READ      WRITE      DIRTY DEVICES<br />
kjournald              442       2849          0       2849          0 dm-0<br />
nfsd                 29036       2731        217       2514          0 dm-0<br />
nfsd                 29041       2495        111       2384          0 dm-0<br />
nfsd                 29037       2120         74       2046          0 dm-0<br />
nfsd                 29039       1996         94       1902          0 dm-0<br />
nfsd                 29038       1380        110       1270          0 dm-0<br />
nfsd                 29040        727        109        618          0 dm-0<br />
pdflush              29423        234          0        234          0 dm-0<br />
nfsd                 29042         89         89          0          0 dm-0<br />
nfsd                 29035         87         87          0          0 dm-0<br />
bash                 19067          2          2          0          0 dm-0<br />
perl                 19066          2          2          0          0 dm-0<br />
bash                 19068          1          1          0          0 dm-0<br />
httpd                16476          1          1          0          0 dm-0</p>
<p>I deliberately generated a bunch of I/O by deleting my Firefox history and cache. If i see the above stats, it shows that NFSD (NFS Deamon) is doing lot&#8217;s of I/O and write operation is very -2 high.</p>
<p>Why not write a single script to do everything required, something like:</p>
<p>We can use below shell script to get the same stats, first it will turn on kernel messages about I/O after stats it will turn off kernel messages about I/O, as it is not good practice to keep kernel messages about I/O on.</p>
<p>#!/bin/sh<br />
dmesg -c<br />
/etc/init.d/klogd stop<br />
echo 1 &gt; /proc/sys/vm/block_dump</p>
<p># allow 30 seconds of stats to be logged<br />
sleep 30</p>
<p>dmesg -c | perl iodump</p>
<p>echo 0 &gt; /proc/sys/vm/block_dump<br />
/etc/init.d/klogd start</p>
<p>Thanks<br />
Manoj</p>
]]></content:encoded>
			<wfw:commentRss>http://onaxer.com/blog/2010/07/13/how-to-find-per-process-io-statistics-on-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
