<?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>ITonGuard</title>
	<atom:link href="http://www.itonguard.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itonguard.com</link>
	<description></description>
	<lastBuildDate>Mon, 25 Apr 2011 18:22:53 +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>Replace end of lines with commas in sed</title>
		<link>http://www.itonguard.com/20110425/replace-end-of-lines-with-commas-in-sed/</link>
		<comments>http://www.itonguard.com/20110425/replace-end-of-lines-with-commas-in-sed/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 18:22:53 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=30</guid>
		<description><![CDATA[Need to extract numbers and create a comma separated list: $ sed -e :label -e N -e &#8216;s/\n/, /&#8217; -e &#8216;s/[ &#124;]//g&#8217; -e tlabel &#60;&#60;xxxx &#62; &#124;     919 &#124; &#62; &#124;    1027 &#124; &#62; &#124;    1593 &#8230; <a href="http://www.itonguard.com/20110425/replace-end-of-lines-with-commas-in-sed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Need to extract numbers and create a comma separated list:</p>
<p>$ sed -e :label -e N -e &#8216;s/\n/, /&#8217; -e &#8216;s/[ |]//g&#8217; -e tlabel &lt;&lt;xxxx<br />
&gt; |     919 |<br />
&gt; |    1027 |<br />
&gt; |    1593 |<br />
&gt; |    1595 |<br />
&gt; xxxx<br />
919,1027,1593,1595</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20110425/replace-end-of-lines-with-commas-in-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send file attachments in email from centos or linux</title>
		<link>http://www.itonguard.com/20100225/useful-centos-tips/</link>
		<comments>http://www.itonguard.com/20100225/useful-centos-tips/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 20:42:45 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[centos linux mail email uuencode mutt attachment file]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[uuencode]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=19</guid>
		<description><![CDATA[Q: Where can I find uuencode to send file attachments via email? A: yum install sharutils uuencode file.jpg file.jpg&#124;mail -s &#8220;sending you this pretty picture&#8221; oops@domain.com A: Or better yet install mutt echo &#8220;My file&#8221;&#124;mutt -a file.jpg -s &#8220;sending you &#8230; <a href="http://www.itonguard.com/20100225/useful-centos-tips/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Q: Where can I find uuencode to send file attachments via email?</p>
<p>A: yum install sharutils</p>
<p>uuencode file.jpg file.jpg|mail -s &#8220;sending you this pretty picture&#8221; oops@domain.com</p>
<p>A: Or better yet install mutt</p>
<p>echo &#8220;My file&#8221;|mutt -a file.jpg -s &#8220;sending you this pretty picture&#8221; oops@domain.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20100225/useful-centos-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful java parameters</title>
		<link>http://www.itonguard.com/20090324/useful-java-parameters/</link>
		<comments>http://www.itonguard.com/20090324/useful-java-parameters/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 15:44:11 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jdk]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[outofmemory]]></category>
		<category><![CDATA[parameter]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=18</guid>
		<description><![CDATA[&#8220;Good&#8221; set of java parameters to run &#8220;generic&#8221; application like tomcat: JAVA_OPTS=&#8221;-d64 -Xms512m -Xmx512m -XX:MaxPermSize=128m&#8221; JAVA_OPTS=&#8221;-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true $JAVA_OPTS&#8221; JAVA_OPTS=&#8221;-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:-TraceClassUnloading $JAVA_OPTS&#8221; JAVA_OPTS=&#8221;-XX:+HeapDumpOnOutOfMemoryError -XX:+HeapDumpOnCtrlBreak -XX:HeapDumpPath=/home/tomcat/snapshots $JAVA_OPTS&#8221; These are not good but they are working options to enable jmxremote console. &#8230; <a href="http://www.itonguard.com/20090324/useful-java-parameters/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8220;Good&#8221; set of java parameters to run &#8220;generic&#8221; application like tomcat:</p>
<p>JAVA_OPTS=&#8221;-d64 -Xms512m -Xmx512m -XX:MaxPermSize=128m&#8221;<br />
JAVA_OPTS=&#8221;-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true $JAVA_OPTS&#8221;<br />
JAVA_OPTS=&#8221;-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:-TraceClassUnloading $JAVA_OPTS&#8221;<br />
JAVA_OPTS=&#8221;-XX:+HeapDumpOnOutOfMemoryError -XX:+HeapDumpOnCtrlBreak -XX:HeapDumpPath=/home/tomcat/snapshots $JAVA_OPTS&#8221;</p>
<p>These are not good but they are working options to enable jmxremote console.</p>
<p>JAVA_OPTS=&#8221;-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=1888 -Djava.rmi.server.hostname=test.com  $JAVA_OPTS&#8221;<br />
To exit on OutOfMemoryError in jdk1.6:</p>
<p>Unix:<br />
<tt>-XX:OnOutOfMemoryError="kill -9 %p"</tt></p>
<p>Windows:<br />
<tt>-XX:OnOutOfMemoryError="taskkill /F /PID %p"</tt></p>
<p>JRockIT:<br />
<tt>-XXexitOnOutOfMemory</tt></p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20090324/useful-java-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weblogic starts slow</title>
		<link>http://www.itonguard.com/20090313/weblogic-starts-slow/</link>
		<comments>http://www.itonguard.com/20090313/weblogic-starts-slow/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 13:44:24 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[urandom]]></category>
		<category><![CDATA[weblogic]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=17</guid>
		<description><![CDATA[I had a lot of troubles starting Oracle Weblogic 10.3g under linux (CentOS 5.2). It took anywhere between 5 to 20 minutes from the time I ran startup script to the point when Weblogic actually started. Here is typical log: &#8230; <a href="http://www.itonguard.com/20090313/weblogic-starts-slow/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had a lot of troubles starting Oracle Weblogic 10.3g under linux (CentOS 5.2). It took anywhere between 5 to 20 minutes from the time I ran startup script to the point when Weblogic actually started. Here is typical log:</p>
<p>&lt;Mar 12, 2009 12:35:34 PM EDT&gt; &lt;Info&gt; &lt;Management&gt; &lt;BEA-141107&gt; &lt;Version: WebLogic Server 10.3  Fri Jul 25 16:30:05 EDT 2008 1137967 &gt;<br />
&lt;Mar 12, 2009 12:46:37 PM EDT&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STARTING&gt;</p>
<p>Turns out Weblogic uses random number generator during start up. Because of the bug in java it reads &#8216;randomness&#8217; from /dev/random. /dev/random is very good random numbers generators but it is extremely slow. It takes sometimes 10 minutes or more to generate one number. /dev/urandom is not that good, but it is instant.<br />
Java somehow maps /dev/urandom file to /dev/random. That&#8217;s why default settings in $JAVA_HOME/jre/lib/security/java.security are useless.</p>
<p>Possible solutions:<br />
1) Add  &#8220;-Djava.security.egd=<a rel="nofollow" href="file:///dev/urandom">file:/dev/./urandom</a>&#8221; (/dev/urandom does not work) to java parameters.</p>
<p>Worse but working solution is:<br />
2) mv /dev/random /dev/random.ORIG ; ln /dev/urandom /dev/random</p>
<p>3) Best solution is to change $JAVA_HOME/jre/lib/security/java.security<br />
Replace securerandom.source with</p>
<p>securerandom.source=file:/dev/./urandom</p>
<p>This problem does not happen under windows because it uses different implementation of /dev/random.</p>
<p>It takes seconds to start weblogic server now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20090313/weblogic-starts-slow/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>strace &#8211; trace system calls and signals</title>
		<link>http://www.itonguard.com/20090113/strace-trace-system-calls-and-signals/</link>
		<comments>http://www.itonguard.com/20090113/strace-trace-system-calls-and-signals/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 21:19:43 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open files]]></category>
		<category><![CDATA[strace]]></category>
		<category><![CDATA[trace]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=16</guid>
		<description><![CDATA[Nice little program that might be used in linux to find what files were open by the process. For example: strace ls 2>&#038;1&#124;grep &#8220;open&#8221;]]></description>
			<content:encoded><![CDATA[<p>Nice little program that might be used in linux to find what files were open by the process. For example:</p>
<p>strace ls 2>&#038;1|grep &#8220;open&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20090113/strace-trace-system-calls-and-signals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find what application is using network port in linux?</title>
		<link>http://www.itonguard.com/20081230/how-to-find-what-application-is-using-network-port-in-linux/</link>
		<comments>http://www.itonguard.com/20081230/how-to-find-what-application-is-using-network-port-in-linux/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 18:11:04 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netstat]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[tcp/ip]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=15</guid>
		<description><![CDATA[netstat -nlp will give you an idea. [root@os]# netstat -nlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name tcp        0      0 0.0.0.0:9921                0.0.0.0:*                   LISTEN      10982/ora_d000_orcl tcp        0      0 10.10.10.10:1521           0.0.0.0:*                   LISTEN      12516/tnslsnr tcp        &#8230; <a href="http://www.itonguard.com/20081230/how-to-find-what-application-is-using-network-port-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>netstat -nlp will give you an idea.</p>
<pre>
[root@os]# netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:9921                0.0.0.0:*                   LISTEN      10982/ora_d000_orcl
tcp        0      0 10.10.10.10:1521           0.0.0.0:*                   LISTEN      12516/tnslsnr
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      6561/sshd
udp        0      0 127.0.0.1:1052              0.0.0.0:*                               10920/ora_pmon_orcl
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20081230/how-to-find-what-application-is-using-network-port-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bacula backup</title>
		<link>http://www.itonguard.com/20081214/bacula-backup/</link>
		<comments>http://www.itonguard.com/20081214/bacula-backup/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 04:20:42 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bacula]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=14</guid>
		<description><![CDATA[Backup job stopped with: Device is BLOCKED waiting to create a volume for: It means that bacula ran out of volumes or space on disk and want you to create new volume manually. Use &#8220;Label&#8221;, enter new volume name, assign &#8230; <a href="http://www.itonguard.com/20081214/bacula-backup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Backup job stopped with:</p>
<p><strong> Device is BLOCKED waiting to create a volume for:</strong></p>
<p>It means that bacula ran out of volumes or space on disk and want you to create new volume manually.<br />
Use &#8220;Label&#8221;, enter new volume name, assign it to a pool.<br />
Your job should continue automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20081214/bacula-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When you use &#8216;find&#8217; and &#8216;zip&#8217; in one sentence&#8230;</title>
		<link>http://www.itonguard.com/20081125/when-you-use-find-and-zip-in-one-sentence/</link>
		<comments>http://www.itonguard.com/20081125/when-you-use-find-and-zip-in-one-sentence/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 02:21:50 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=13</guid>
		<description><![CDATA[Instead of find albums -name *.jpg -not -name *.sized.jpg -not -name *.thumb.jpg -not -name *.highlight.jpg -exec zip -r -1 album.zip {} ;&#38; use find albums -name *.jpg -not -name *.sized.jpg -not -name *.thumb.jpg -not -name *.highlight.jpg -print&#124; zip -1 album.zip &#8230; <a href="http://www.itonguard.com/20081125/when-you-use-find-and-zip-in-one-sentence/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Instead of</p>
<p><strong>find</strong> albums -name *.jpg -not -name *.sized.jpg -not -name *.thumb.jpg -not -name *.highlight.jpg <strong>-exec zip</strong> -r -1 album.zip {} ;&amp;</p>
<p>use</p>
<p><strong>find</strong> albums -name *.jpg -not -name *.sized.jpg -not -name *.thumb.jpg -not -name *.highlight.jpg <strong>-print| zip</strong> -1 album.zip <strong>-@</strong></p>
<p>It will take 5 minutes instead of 5 hours on 500MB archive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20081125/when-you-use-find-and-zip-in-one-sentence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Permanent Redirects in Apache</title>
		<link>http://www.itonguard.com/20080703/permanent-redirects-in-apache/</link>
		<comments>http://www.itonguard.com/20080703/permanent-redirects-in-apache/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 18:22:54 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[Apache Tips]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[permanent redirect]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=12</guid>
		<description><![CDATA[These are simple and often overlooked rewrite rules to generate Permanent Redirects for sister domains. UseCanonicalName On ServerName www.olegshpak.com ServerAlias olegshpak.com ServerAlias www.niteart.com ServerAlias niteart.com RewriteEngine on RewriteCond %{REQUEST_METHOD} !^(GET&#124;POST&#124;HEAD)$ RewriteRule .* &#8211; [F] RewriteCond %{HTTP_HOST} ^niteart.com$ [OR] RewriteCond %{HTTP_HOST} &#8230; <a href="http://www.itonguard.com/20080703/permanent-redirects-in-apache/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>These are simple and often overlooked rewrite rules to generate Permanent Redirects for sister domains.</p>
<p>UseCanonicalName On</p>
<p>ServerName www.olegshpak.com<br />
ServerAlias olegshpak.com<br />
ServerAlias www.niteart.com<br />
ServerAlias niteart.com</p>
<p>RewriteEngine on<br />
RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD)$<br />
RewriteRule .* &#8211; [F]<br />
RewriteCond %{HTTP_HOST} ^niteart.com$ [OR]<br />
RewriteCond %{HTTP_HOST} ^www.niteart.com$ [OR]<br />
RewriteCond %{HTTP_HOST} ^olegshpak.com$<br />
RewriteRule ^(.*)$    http://%{SERVER_NAME}$1 [R=permanent,L]</p>
<p>If your configuration requires you to set UseCanonicalName to Off then use a real server name instead of variable in RewriteRule.</p>
<p>Why is it important? Main reason is SEO. With permanent redirect search engines are not going to think that you have two or more different websites with the same content.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20080703/permanent-redirects-in-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable &#8220;WARNING: Parameters: Invalid chunk ignored.&#8221; messages in Tomcat log</title>
		<link>http://www.itonguard.com/20080605/disable-warning-parameters-invalid-chunk-ignored-messages-in-tomcat-log/</link>
		<comments>http://www.itonguard.com/20080605/disable-warning-parameters-invalid-chunk-ignored-messages-in-tomcat-log/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 17:06:00 +0000</pubDate>
		<dc:creator>niteartadmin</dc:creator>
				<category><![CDATA[Tomcat Tips]]></category>
		<category><![CDATA[catalina.out]]></category>
		<category><![CDATA[invalid chunk ignored]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://www.itonguard.com/?p=10</guid>
		<description><![CDATA[To disable this message you need to modify logging properties file. If you have logging.properties in your tomcat/conf folder then make changes there. Otherwise modify jre&#8217;s file. Add to the end of /usr/local/java/jre/lib/logging.properties this line: org.apache.tomcat.util.http.Parameters.level = SEVERE Restart tomcat. &#8230; <a href="http://www.itonguard.com/20080605/disable-warning-parameters-invalid-chunk-ignored-messages-in-tomcat-log/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To disable this message you need to modify logging properties file.<br />
If you have logging.properties in your tomcat/conf folder then make changes there. Otherwise modify jre&#8217;s file.</p>
<p>Add to the end of /usr/local/java/jre/lib/logging.properties this line:</p>
<p>org.apache.tomcat.util.http.Parameters.level = SEVERE</p>
<p>Restart tomcat.</p>
<p>The reason for this message is some problem with url&#8217;s parameters format, like &amp;&amp; in the begining of parameters etc. It is harmless, tomcat will process parameters anyway.</p>
<p>Another nice feature to reduce ammount of information in catalina.out file is to redirect system output from catalina.out to web application log. Add swallowOutput=&#8221;true&#8221; to the context like this:</p>
<p>[root@u tomcat]# more conf/Catalina/localhost/ROOT.xml<br />
&lt;Context docBase=&#8221;/clients/client1&#8243;<br />
privileged=&#8221;true&#8221; antiResourceLocking=&#8221;false&#8221; antiJARLocking=&#8221;false&#8221;<br />
swallowOutput=&#8221;true&#8221;&gt;<br />
&lt;/Context&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itonguard.com/20080605/disable-warning-parameters-invalid-chunk-ignored-messages-in-tomcat-log/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

