<?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>Tech Stuff &#187; linux</title>
	<atom:link href="http://tech-stuff.org/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech-stuff.org</link>
	<description>Hosting Tips &#38; Tricks</description>
	<lastBuildDate>Fri, 20 May 2011 14:08:32 +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>Linux (centos) binary prelink issues</title>
		<link>http://tech-stuff.org/linux-centos-binary-prelink-issues/</link>
		<comments>http://tech-stuff.org/linux-centos-binary-prelink-issues/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 08:37:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[prelink]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://tech-stuff.org/?p=140</guid>
		<description><![CDATA[Today on a Cpanel server after nightly upgrade , our firewall (csf) detected some changed files. Then I run bellow verify command : #rpm -qfV /bin/bash prelink: /bin/bash: at least one of file&#8217;s dependencies has changed since prelinking S.?&#8230;..    /bin/bash I had never seen this before, but apparently rpm is doing something different now that [...]]]></description>
			<content:encoded><![CDATA[<p>Today on a Cpanel server after nightly upgrade , our firewall (csf) detected some changed files. Then I run bellow verify command :</p>
<p>#rpm -qfV /bin/bash<br />
prelink: /bin/bash: at least one of file&#8217;s dependencies has changed since prelinking<br />
S.?&#8230;..    /bin/bash</p>
<p>I had never seen this before, but apparently rpm is doing something different now that prelink is present. Note that the &#8217;5&#8242; was replaced by &#8216;?&#8217; which I take to mean that RPM doesn&#8217;t know if the checksum matches or not.</p>
<p>No, there was no hacking attempt . you just have to run /etc/cron.daily/prelink, and when that&#8217;s done, no more binary files issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech-stuff.org/linux-centos-binary-prelink-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Tip: MySQL Server Has Gone Away Or Lost connection to server during query</title>
		<link>http://tech-stuff.org/mysql-tip-mysql-server-has-gone-away-or-lost-connection-to-server-during-query/</link>
		<comments>http://tech-stuff.org/mysql-tip-mysql-server-has-gone-away-or-lost-connection-to-server-during-query/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 17:45:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://tech-stuff.org/?p=128</guid>
		<description><![CDATA[A much dreaded MySQL error message during queries is &#8220;MySQL server has gone away&#8221;. An alternative message is &#8220;Lost connection to server during query&#8221;. This is a strange problem which afflicts a wide variety of PHP software including but not limited to WordPress. There are several causes for it. Let&#8217;s look at the common and [...]]]></description>
			<content:encoded><![CDATA[<p>A much dreaded MySQL error message during queries is &#8220;MySQL server has gone away&#8221;. An alternative message is &#8220;Lost connection to server during query&#8221;. This is a strange problem which afflicts a wide variety of <strong></strong><strong>PHP</strong> software including but not limited to WordPress. There are several causes for it. Let&#8217;s look at the common and some rare causes and what you can do to fix it.</p>
<p><span id="more-2041"> </span></p>
<p>The most common causes are:<br />
1. The server timed out and closed the connection. By default, the server closes the connection after 8 hours or 28800 seconds if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld via your server&#8217;s /etc/my.cnf (on Linux; locate the file in installation directory on windows) as well. This mostly affects persistent connections; connections opened using mysql_pconnect() in <strong>PHP</strong>. It can also affect pooled connections from say any server side connection pooling.</p>
<p>2. Another common reason to receive the MySQL server has gone away error is because you have issued a &#8220;close&#8221; on your MySQL connection and then tried to run a query on the closed connection. This is a simple logic problem. Are you sharing the connection across multiple threads?</p>
<p>3. You got a timeout from the TCP/IP connection on the client side. This may happen if you have been using the commands: mysql_options(…, MYSQL_OPT_READ_TIMEOUT,…) or mysql_options(…, MYSQL_OPT_WRITE_TIMEOUT,…). In this case increasing the timeout, as described above, may help solve the problem.</p>
<p>4. You have encountered a timeout on the server side and the <a href="http://blog.taragana.com/index.php/archive/how-to-enable-disable-auto-reconnect-in-mysql/">automatic reconnection</a> in the client is disabled. Please refer to the article linked above for details and solution.</p>
<p>5. You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld receives a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by setting the server&#8217;s max_allowed_packet variable, which has a default value of 1MB. You may also need to increase the maximum packet size on the client end. More information on setting the packet size is given in Section B.1.2.9, “Packet too large”.</p>
<p>6. An INSERT or REPLACE statement that inserts a great many rows can also cause these sorts of errors. Either one of these statements sends a single request to the server irrespective of the number of rows to be inserted; thus, you can often avoid the error by reducing the number of rows sent per INSERT or REPLACE.</p>
<p>7. You also get a lost connection if you are sending a packet 16MB or larger if your client is older than 4.0.8 and your server is 4.0.8 and above, or the other way around.</p>
<p>Few rare causes are:<br />
1. Rarely the db administrator may have killed the running thread with a KILL statement or a mysqladmin kill command.</p>
<p>2. A client application running on a different host does not have the necessary privileges to connect to the MySQL server from that host.</p>
<p>3. You are using a Windows client and the server had dropped the connection (probably because wait_timeout expired) before the command was issued. The problem on Windows is that in some cases MySQL doesn&#8217;t get an error from the OS when writing to the TCP/IP connection to the server, but instead gets the error when trying to read the answer from the connection.</p>
<p>4. Prior to MySQL 5.0.19, even if the reconnect flag in the MYSQL structure is equal to 1, MySQL does not automatically reconnect and re-issue the query as it doesn&#8217;t know if the server did get the original query or not.</p>
<p>5. It is also possible to see this error if hostname lookups fail (for example, if the DNS server on which your server or network relies goes down). This is because MySQL is dependent on the host system for name resolution, but has no way of knowing whether it is working — from MySQL&#8217;s point of view the problem is indistinguishable from any other network timeout.</p>
<p>6. You may also see the MySQL server has gone away error if MySQL is started with the –skip-networking option.</p>
<p>7. You can also encounter this error with applications that fork child processes, all of which try to use the same connection to the MySQL server. This can be avoided by using a separate connection for each child process.</p>
<p>8. Another networking issue that can cause this error occurs if the MySQL port (default 3306) is blocked by your firewall, thus preventing any connections at all to the MySQL server.</p>
<p>9. You have encountered a bug where the server died while executing the query. <a href="http://dev.mysql.com/doc/refman/5.0/en/gone-away.html">Source</a></p>
<p>It takes time and effort to identify and solve these problems. Speaking from experience it is often not what it looks in the first place. Don&#8217;t assume anything, diligently rule out all possibilities till you solve it.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech-stuff.org/mysql-tip-mysql-server-has-gone-away-or-lost-connection-to-server-during-query/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Verify installed rpm&#8217;s</title>
		<link>http://tech-stuff.org/verify-installed-rpms/</link>
		<comments>http://tech-stuff.org/verify-installed-rpms/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 13:55:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tech-stuff.org/?p=125</guid>
		<description><![CDATA[For those who don&#8217;t like to RTFM, bellow can find codes for verifying rpm&#8217;s: for e.g. rpm -qfV /usr/sbin/sshd S.5&#8230;.T  c /etc/pam.d/sshd S.5&#8230;.T  c /etc/ssh/sshd_config explains into: S file Size differs M Mode differs (includes permissions and file type) 5 MD5 sum differs D Device major/minor number mismatch L readLink(2) path mismatch U User ownership [...]]]></description>
			<content:encoded><![CDATA[<p>For those who don&#8217;t like to RTFM, bellow can find codes for verifying rpm&#8217;s:</p>
<p>for e.g.</p>
<p>rpm -qfV /usr/sbin/sshd<br />
S.5&#8230;.T  c /etc/pam.d/sshd<br />
S.5&#8230;.T  c /etc/ssh/sshd_config</p>
<p>explains into:</p>
<p>S file Size differs<br />
M Mode differs (includes permissions and file type)<br />
5 MD5 sum differs<br />
D Device major/minor number mismatch<br />
L readLink(2) path mismatch<br />
U User ownership differs<br />
G Group ownership differs<br />
T mTime differs</p>
]]></content:encoded>
			<wfw:commentRss>http://tech-stuff.org/verify-installed-rpms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash tips &amp; tricks</title>
		<link>http://tech-stuff.org/bash-tips-tricks/</link>
		<comments>http://tech-stuff.org/bash-tips-tricks/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 10:51:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tech-stuff.org/?p=88</guid>
		<description><![CDATA[I know that bash is not really a scripting language (I like perl ) but there are times when you just want to do things on a single command line. So, if you want for example drop some databases from a folder list: ls /var/lib/mysql &#124; grep dbmatch* &#124; while read i; do echo &#8220;drop [...]]]></description>
			<content:encoded><![CDATA[<p>I know that bash is not really a scripting language (I like perl ) but there are times when you just want to do things on a single command line.</p>
<p>So, if you want for example drop some databases from a folder list:</p>
<blockquote><p>ls /var/lib/mysql | grep dbmatch* | while read i; do echo &#8220;drop database $i&#8221;; done | mysql</p></blockquote>
<p>Or, if you want to change same content on multiple files:</p>
<blockquote><p>cd folder ; grep &#8220;oldvalue&#8221; * -l | while read f; do cat $f | sed s/oldvalue/newvalue/ &gt; /tmp/x; cat /tmp/x &gt; $f; done</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://tech-stuff.org/bash-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to identify high load apache processes</title>
		<link>http://tech-stuff.org/how-to-identify-high-load-apache-processes/</link>
		<comments>http://tech-stuff.org/how-to-identify-high-load-apache-processes/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 14:32:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tech-stuff.org/?p=59</guid>
		<description><![CDATA[just paste to shell (cpanel server): ps -axo &#8220;%C %p&#8221; &#124;sort -nr &#124;head -5 &#124;while read i p; do echo -n $i; /usr/local/apache/bin/apachectl fullstatus &#124;grep -A 1 $p; done there is also a python script for that : apache-top.py . you can donwload it from: http://www.fr3nd.net/projects/apache-top/. it&#8217;s a nice tool but still need some customization.]]></description>
			<content:encoded><![CDATA[<p>just paste to shell (cpanel server):</p>
<p>ps -axo &#8220;%C %p&#8221; |sort -nr |head -5 |while read i p; do echo -n $i; /usr/local/apache/bin/apachectl fullstatus |grep -A 1 $p; done</p>
<p>there is also a python script for that : apache-top.py . you can donwload it from: http://www.fr3nd.net/projects/apache-top/. it&#8217;s a nice tool but still need some customization.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech-stuff.org/how-to-identify-high-load-apache-processes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>/usr/bin/find: argument list too long</title>
		<link>http://tech-stuff.org/usrbinfind-argument-list-too-long/</link>
		<comments>http://tech-stuff.org/usrbinfind-argument-list-too-long/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 15:21:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.tech-stuff.org/?p=18</guid>
		<description><![CDATA[I kept running into this error when searching for a certain string, so I came up with a different way of searching: find . -name *\* -exec grep -i -H -n ’string’ {} \; Problem solved.]]></description>
			<content:encoded><![CDATA[<p>I kept running into this error when searching for a certain string, so I came up with a different way of searching:<br />
find . -name *\* -exec grep -i -H -n ’string’ {} \;<br />
Problem solved.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech-stuff.org/usrbinfind-argument-list-too-long/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/40 queries in 0.030 seconds using disk: basic
Object Caching 397/460 objects using disk: basic

Served from: tech-stuff.org @ 2012-02-05 22:21:30 -->
