<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Code n&#039;roll &#187; linux</title>
	<atom:link href="http://tomasmuller.com.br/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://tomasmuller.com.br</link>
	<description>Tomás Augusto Müller personal blog</description>
	<lastBuildDate>Thu, 16 May 2013 23:20:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tomasmuller.com.br' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/e119777071ecba6b5b0b799228927ed7?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Code n&#039;roll &#187; linux</title>
		<link>http://tomasmuller.com.br</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tomasmuller.com.br/osd.xml" title="Code n&#039;roll" />
	<atom:link rel='hub' href='http://tomasmuller.com.br/?pushpress=hub'/>
		<item>
		<title>[short-tip] Extract range of pages from a PDF file</title>
		<link>http://tomasmuller.com.br/2012/04/26/extract-range-of-pages-from-a-pdf-file/</link>
		<comments>http://tomasmuller.com.br/2012/04/26/extract-range-of-pages-from-a-pdf-file/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 17:42:47 +0000</pubDate>
		<dc:creator>Tomás Augusto Müller</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[short]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://tomasmuller.com.br/?p=774</guid>
		<description><![CDATA[Let&#8217;s assume you downloaded a PDF file with 700 pages. But you want to send by email only pages 7 to 27. Ghostscript to the rescue! Available in every UNIX/Linux distribution, you can leverage the gs command to do this. gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER /    -dFirstPage=7 -dLastPage=27 /    -sOutputFile=name_of_outfile.pdf name_of_inputfile.pdf<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=774&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Let&#8217;s assume you downloaded a PDF file with 700 pages. But you want to send by email only pages 7 to 27.</p>
<p>Ghostscript to the rescue! Available in every UNIX/Linux distribution, you can leverage the <strong>gs</strong> command to do this.</p>
<pre>gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER /
   -dFirstPage=7 -dLastPage=27 /
   -sOutputFile=name_of_outfile.pdf name_of_inputfile.pdf</pre>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=774&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomasmuller.com.br/2012/04/26/extract-range-of-pages-from-a-pdf-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c80f7f96a7ef58e5c6da01620ba78ab?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tomasmuller</media:title>
		</media:content>
	</item>
		<item>
		<title>Benchmarking NeoQuotes (Jetty + JRubyRack)</title>
		<link>http://tomasmuller.com.br/2012/02/28/benchmarking-neoquotes/</link>
		<comments>http://tomasmuller.com.br/2012/02/28/benchmarking-neoquotes/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 17:09:38 +0000</pubDate>
		<dc:creator>Tomás Augusto Müller</dc:creator>
				<category><![CDATA[benchmark]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[contests]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JIT]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://tomasmuller.com.br/?p=743</guid>
		<description><![CDATA[To perform basic HTTP benchmarks against a web application, you can start with ab &#8211; Apache HTTP server benchmarking tool. If you use Ubuntu, the installation is very simple: sudo apt-get install apache2-utils I used this tool to benchmark NeoQuotes application, testing how Jetty with JRuby-Rack are performing against multiple concurrent requests. First, start up [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=743&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>To perform basic HTTP benchmarks against a web application, you can start with <a title="ab" href="http://httpd.apache.org/docs/2.0/programs/ab.html">ab &#8211; Apache HTTP server benchmarking tool</a>. <a href="http://tomasmuller.files.wordpress.com/2012/02/speed_icon.png"><img class="alignright  wp-image-752" style="border:0 none;" title="Apache Benchmark Tool" src="http://tomasmuller.files.wordpress.com/2012/02/speed_icon.png?w=94&#038;h=94" alt="speed" width="94" height="94" /></a></p>
<p>If you use Ubuntu, the installation is very simple:</p>
<pre style="padding-left:30px;">sudo apt-get install apache2-utils</pre>
<p>I used this tool to benchmark <a href="http://neoquotes.herokuapp.com/">NeoQuotes</a> application, testing how Jetty with JRuby-Rack are performing against multiple concurrent requests.</p>
<p>First, start up Jetty with <strong>mvn jetty:run</strong> or with the command defined in project Procfile (<strong>sh target/bin/jruby -S config/jetty.rb</strong> for NeoQuotes).<strong></strong></p>
<p>Next, execute multiple times the following command:</p>
<pre style="padding-left:30px;">ab -n 10000 -c 25 <a href="http://localhost:8080/" rel="nofollow">http://localhost:8080/</a></pre>
<p>where <strong>n</strong> = number of requests and <strong>c</strong> = concurrency level.</p>
<p>Is worth to look to the number of requests per second, that are increasing every time the benchmark is executed. This happens thanks to <a href="http://en.wikipedia.org/wiki/Just-in-time_compilation">JIT</a>!</p>
<p>Below some results after running <strong>ab -n 10000 -c 25 <a href="http://localhost:55012/" rel="nofollow">http://localhost:55012/</a></strong> three times in a commodity hardware (all tests were performed on the application homepage where there is no interaction with Neo4j and no cache mechanism is configured):</p>
<p style="padding-left:30px;"><strong>First execution:</strong></p>
<pre style="padding-left:30px;">Time taken for tests:   73.162 seconds
Requests per second:    136.68 [#/sec] (mean)</pre>
<p style="padding-left:30px;"><strong>Second execution:</strong></p>
<pre style="padding-left:30px;">Time taken for tests:   67.006 seconds
Requests per second:    149.24 [#/sec] (mean)</pre>
<p style="padding-left:30px;"><strong>Third execution:</strong></p>
<pre style="padding-left:30px;">Time taken for tests:   65.725 seconds
Requests per second:    152.15 [#/sec] (mean)</pre>
<p>Also, take a look at Min and Max threads of Jetty QueuedThreadPool, at <a href="https://github.com/tomasmuller/neoquotes/blob/master/config/jetty.rb">config/jetty.rb</a> configuration.</p>
<p>Depending of your hardware and your VM configuration,the more threads you configure into min and max, the worse your throughput gets when your VM starts to reach its resource limits.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=743&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomasmuller.com.br/2012/02/28/benchmarking-neoquotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c80f7f96a7ef58e5c6da01620ba78ab?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tomasmuller</media:title>
		</media:content>

		<media:content url="http://tomasmuller.files.wordpress.com/2012/02/speed_icon.png" medium="image">
			<media:title type="html">Apache Benchmark Tool</media:title>
		</media:content>
	</item>
		<item>
		<title>Close process by port number with one line</title>
		<link>http://tomasmuller.com.br/2011/06/09/close-process-by-port-number-with-one-line/</link>
		<comments>http://tomasmuller.com.br/2011/06/09/close-process-by-port-number-with-one-line/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 17:19:48 +0000</pubDate>
		<dc:creator>Tomás Augusto Müller</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://tomasmuller.com.br/?p=634</guid>
		<description><![CDATA[Recently I encountered myself executing so many times the following unix commands: 1: $ netstat -anp &#124; grep :port_number 2: (search manually the output for the PID that is using the given :port_number) 3: $ kill -9 :pid Bored, I challenged my friend Alisson to build a command to perform those three steps, in one [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=634&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I encountered myself executing so many times the following unix commands:</p>
<p><strong>1</strong>: $ netstat -anp | grep :port_number<br />
<strong>2</strong>: (search manually the output for the PID that is using the given :port_number)<br />
<strong>3</strong>: $ kill -9 :pid</p>
<p>Bored, I challenged my friend <a href="http://arpoc.wordpress.com/">Alisson</a> to build a command to perform those three steps, in one single line.</p>
<p>He came up with the following solution:</p>
<pre>kill -9 $(sudo netstat -anp | grep :[port_number] | awk '{print $7}' | cut -d '/' -f 1)</pre>
<p>Congratulations man! You deserve a very cold <a title="Heineken" href="http://en.wikipedia.org/wiki/Heineken">Heineken</a>!</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=634&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomasmuller.com.br/2011/06/09/close-process-by-port-number-with-one-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c80f7f96a7ef58e5c6da01620ba78ab?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tomasmuller</media:title>
		</media:content>
	</item>
		<item>
		<title>Instalação manual do Java Plugin no Firefox (Ubuntu)</title>
		<link>http://tomasmuller.com.br/2010/07/26/instalacao-manual-do-java-plugin-no-firefox-ubuntu/</link>
		<comments>http://tomasmuller.com.br/2010/07/26/instalacao-manual-do-java-plugin-no-firefox-ubuntu/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 01:56:50 +0000</pubDate>
		<dc:creator>Tomás Augusto Müller</dc:creator>
				<category><![CDATA[firefox]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pt_BR]]></category>

		<guid isPermaLink="false">http://tomasmuller.com.br/?p=495</guid>
		<description><![CDATA[Localize o diretório de instalação do Firefox, mais precisamente a pasta &#8220;firefox-addons/plugins&#8221; (normalmente em: /usr/lib/firefox-addons/plugins). A JDK contém o plugin para o browser. Está localizado em: &#60;JDK&#62;/jre/lib/i386/libnpjp2.so Apenas um plugin do java pode ser utilizado pelo navegador. Portanto elimine qualquer link simbólico que aponte para javaplugin-oji.so e libnpjp2.so. Feito isso, crie um link simbólico para [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=495&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Localize o diretório de instalação do Firefox, mais precisamente a pasta &#8220;firefox-addons/plugins&#8221; (normalmente em: /usr/lib/firefox-addons/plugins).</p>
<p>A JDK  contém o plugin para o browser. Está localizado em:</p>
<pre style="padding-left:30px;">&lt;JDK&gt;/jre/lib/i386/<strong>libnpjp2.so</strong></pre>
<p>Apenas um plugin do java pode ser utilizado pelo navegador. Portanto elimine qualquer link simbólico que aponte para javaplugin-oji.so e libnpjp2.so.</p>
<p>Feito isso, crie um link simbólico para o plugin distribuído com a JDK, utilizando o comando abaixo:</p>
<pre style="padding-left:30px;">/usr/lib/firefox-addons/plugins$ sudo ln -s &lt;JDK&gt;/jre/lib/i386/libnpjp2.so</pre>
<p>Reinicie o Firefox, e digite <strong>about:plugins</strong> na barra de endereços. Localize o plugin do java, confirmando a instalação.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=495&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomasmuller.com.br/2010/07/26/instalacao-manual-do-java-plugin-no-firefox-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c80f7f96a7ef58e5c6da01620ba78ab?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tomasmuller</media:title>
		</media:content>
	</item>
		<item>
		<title>Instalando a Sun JDK 6 no Ubuntu</title>
		<link>http://tomasmuller.com.br/2010/07/26/instalando-a-sun-jdk-6-no-ubuntu/</link>
		<comments>http://tomasmuller.com.br/2010/07/26/instalando-a-sun-jdk-6-no-ubuntu/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 01:36:23 +0000</pubDate>
		<dc:creator>Tomás Augusto Müller</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pt_BR]]></category>

		<guid isPermaLink="false">http://tomasmuller.wordpress.com/?p=348</guid>
		<description><![CDATA[Registro aqui alguns passos para instalação da Sun JDK 6 no Ubuntu (10.04 &#8211; lucid), para fins de consulta pessoal. Se foi útil para você, deixe seu registro. Faça o download do .bin (jdk-6u&#60;version&#62;-linux-i586.bin) no site oficial da Oracle. Execute o seguinte comando sobre o arquivo: $ chmod a+x jdk-6u&#60;version&#62;-linux-i586.bin Agora com as devidas permissões [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=348&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Registro aqui alguns passos para instalação da Sun JDK 6 no Ubuntu (10.04 &#8211; lucid), para fins de consulta pessoal. Se foi útil para você, deixe seu registro.</p>
<ol>
<li>Faça o download do .bin (jdk-6u&lt;version&gt;-linux-i586.bin) no site oficial da Oracle.</li>
<li>Execute o seguinte comando sobre o arquivo: $ chmod a+x jdk-6u&lt;version&gt;-linux-i586.bin</li>
<li>Agora com as devidas permissões configuradas, execute o arquivo: $ ./jdk-6u&lt;version&gt;-linux-i586.bin</li>
<li>Utilizando o comando mv, altere o local dos arquivos extraídos para por exemplo: /usr/local/java/jdk&lt;version&gt;</li>
<li>Crie um link simbólico para este diretório. Ex: /usr/local/java$ ln -s jdk&lt;version&gt;/ jdk</li>
<li>Exclua o arquivo .bin</li>
</ol>
<h4>Configurar a variável de ambiente $JAVA_HOME:</h4>
<p>Abra o arquivo ~/.profile com o editor de sua preferência e adicione no final do arquivo:</p>
<pre>JAVA_HOME=/usr/local/java/jdk
export JAVA_HOME

PATH="$JAVA_HOME/bin:$PATH"</pre>
<p>obs.1: repare na utilização do link simbólico na variável de ambiente JAVA_HOME<br />
obs.2: para executar alguns dos comandos listados serão necessárias permissões de super usuário.</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomasmuller.com.br&#038;blog=4832129&#038;post=348&#038;subd=tomasmuller&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomasmuller.com.br/2010/07/26/instalando-a-sun-jdk-6-no-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c80f7f96a7ef58e5c6da01620ba78ab?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">tomasmuller</media:title>
		</media:content>
	</item>
	</channel>
</rss>
