<?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>ServerAdminBlog &#187; Hardware</title>
	<atom:link href="http://www.serveradminblog.com/category/hardware/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serveradminblog.com</link>
	<description>Short Circuit...</description>
	<lastBuildDate>Sat, 04 Feb 2012 16:56:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>fsck in CentOS 5.x howto</title>
		<link>http://www.serveradminblog.com/2010/06/fsck-in-centos-5-x-howto/</link>
		<comments>http://www.serveradminblog.com/2010/06/fsck-in-centos-5-x-howto/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 14:06:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=116</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.serveradminblog.com/2010/06/fsck-in-centos-5-x-howto/' addthis:title='fsck in CentOS 5.x howto '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>fsck is used to check and optionally repair one or more Linux file systems. File system can be a device name (e.g. /dev/sda2), a mount point (e.g. /, /usr,&#8230; ), or an ext2 label or UUID specifier. By default, the fsck will try to handle filesystems on different physical disk drives in parallel to reduce [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.serveradminblog.com/2010/06/fsck-in-centos-5-x-howto/' addthis:title='fsck in CentOS 5.x howto '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>fsck is used to check and optionally repair one or more Linux file systems. File system can be a device name (e.g. /dev/sda2), a mount point (e.g. /, /usr,&#8230; ), or an ext2 label or UUID specifier. By default, the fsck will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of the filesystems.</p>
<p><span id="more-116"></span></p>
<p>I hope you won&#8217;t need this instructions but in case you have some problems &#8230;</p>
<p>First, keep in mind that running fsck on a mounted file system can result in data corruption so use this commands at your own risk. I&#8217;m not responsible for any damage you may cause. </p>
<p>To avoid this, you can:</p>
<ul>
<li>Change the running state of the system to single user mode and unmount the file system</li>
<p> (Note: Skip this option if you need to check / part.)</p>
<li>Boot the computer into Rescue Mode using the installation CD</li>
</ul>
<p><strong>1) Single user mode</strong></p>
<p>Change the run level to 1 and unmont the file system with (I suppose the /home was affected with problems)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># init 1
# umount /home</pre></div></div>

<p>Then run fsck with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># fsck /dev/sda2</pre></div></div>

<p><strong>2) Rescue mode with install CD</strong></p>
<p>Insert the Installation CD into the drive and reboot your system with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># reboot</pre></div></div>

<p>Wait a while and after booting from the Installation CD type in command prompt:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># linux rescue nomount</pre></div></div>

<p>Note: nomount directive will skip mounting so you can safely run fsck on your filesystem</p>
<p>Then enter</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># fsck -yvf /dev/sda2</pre></div></div>

<p>where /dev/sda2 is problematic partition.<br />
Note: -yvf means<br />
-y attempt to fix any detected filesystem corruption automatically (answer all questions with &#8220;yes&#8221;)<br />
-f force a check even if reported in a clean state<br />
-v verbose output, including all file system-specific commands that are executed (you will see all errors and recovery process)</p>
<p><strong>LVM Partitions</strong><br />
Situation with LVM partitions is a little different. To run fsck on lvm partitions first you need to find the pv’s, vg’s, lv’s and then to activate them.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># lvm pvscan
# lvm vgscan
# lvm lvchange -ay VolGroup00
# lvm lvscan
&nbsp;
# fsck -yfv /dev/VolGroup00/LogVol00</pre></div></div>

<p>fsck can be scheduled on boot with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># shutdown -Fr now</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/06/fsck-in-centos-5-x-howto/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Set date and time from command prompt</title>
		<link>http://www.serveradminblog.com/2010/03/set-date-and-time-from-command-prompt/</link>
		<comments>http://www.serveradminblog.com/2010/03/set-date-and-time-from-command-prompt/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 08:55:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=61</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.serveradminblog.com/2010/03/set-date-and-time-from-command-prompt/' addthis:title='Set date and time from command prompt '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>If the Linux server time and date is wrong and you need to set it to new values from the shell prompt, you should use date command. You must login as root user to use date command. Also from command prompt you can check and set system clock (hwclock command). Use the following syntax to [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.serveradminblog.com/2010/03/set-date-and-time-from-command-prompt/' addthis:title='Set date and time from command prompt '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>If the Linux server time and date is wrong and you need to set it to new values from the shell prompt, you should use date command. You must login as root user to use date command. Also from command prompt you can check and set system clock (hwclock command).</p>
<p>Use the following syntax to set new data and time:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># date -s &quot;16 MAR 2010 09:36:00&quot;</pre></div></div>

<p>Also you can use next syntax:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">date set=&quot;16 MAR 2010 09:36:00&quot;</pre></div></div>

<p>After you set date and time, it is good idea to check your system clock with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># hwclock --show</pre></div></div>

<p>If there is some difference you can sync system date and time with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># hwclock --systohc</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/03/set-date-and-time-from-command-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SysBench on CentOS &#8211; HowTo</title>
		<link>http://www.serveradminblog.com/2010/02/sysbench-on-centos-howto/</link>
		<comments>http://www.serveradminblog.com/2010/02/sysbench-on-centos-howto/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 14:44:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=42</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.serveradminblog.com/2010/02/sysbench-on-centos-howto/' addthis:title='SysBench on CentOS &#8211; HowTo '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>If you want to test server performance, you can think about SysBench. SysBench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load. The idea of this benchmark suite is to quickly get an impression about system performance without setting up [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.serveradminblog.com/2010/02/sysbench-on-centos-howto/' addthis:title='SysBench on CentOS &#8211; HowTo '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>If you want to test server performance, you can think about SysBench. SysBench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load. The idea of this benchmark suite is to quickly get an impression about system performance without setting up complex database benchmarks or even without installing a database at all. </p>
<p>Current features allow to test the following system parameters:</p>
<p>    * file I/O performance<br />
    * scheduler performance<br />
    * memory allocation and transfer speed<br />
    * POSIX threads implementation performance<br />
    * database server performance (OLTP benchmark)<br />
(Primarily written for MySQL server benchmarking, SysBench will be further extended to support multiple database backends, distributed benchmarks and third-party plug-in modules)</p>
<p>I couldn&#8217;t find CentOS RPM so here are few tips how to install it manually.</p>
<p>Download Sysbench (current version is 0.4.12)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># wget http://garr.dl.sourceforge.net/sourceforge/sysbench/sysbench-0.4.12.tar.gz</pre></div></div>

<p>Then unpack it and install with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># tar -xvzf sysbench-0.4.12.tar.gz
# cd sysbench-0.4.12
# libtoolize --force --copy 
# ./autogen.sh
# ./configure
# make
# make install</pre></div></div>

<p>To test CPU performance you can try</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># sysbench --test=cpu --cpu-max-prime=20000 run</pre></div></div>

<p>For MySQL test, you&#8217;ll need to prepare database for testing with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=500000 --mysql-user=test_database --mysql-password=test_database_password --mysql-socket=/var/lib/mysql/mysql.sock prepare</pre></div></div>

<p>(replace test_database with valid username and test_database_password with valid password)</p>
<p>This command will create sample table inside test_database and it will have 500 000 rows (InnoDB engine).</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">sysbench 0.4.12:  multi-threaded system evaluation benchmark
&nbsp;
No DB drivers specified, using mysql
Creating table 'test-database'...
Creating 500000 records in table 'test-database'...</pre></div></div>

<p>Now to start read test</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># sysbench --num-threads=16 --max-requests=100000 --test=oltp --oltp-table-size=500000 --mysql-socket=/var/lib/mysql/mysql.sock --oltp-read-only --mysql-user=test_database --mysql-password=test_database_password run</pre></div></div>

<p>For read-write test you can try</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># sysbench --num-threads=16 --max-requests=10000 --test=oltp --oltp-table-size=500000 --mysql-socket=/var/lib/mysql/mysql.sock --oltp-test-mode=complex --mysql-user=test_database --mysql-password=test_database_password run</pre></div></div>

<p>More info about specific parameters can be found in official docs (<a href="http://sysbench.sourceforge.net/docs/">http://sysbench.sourceforge.net/docs/</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/02/sysbench-on-centos-howto/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

