Debian http://blog.samat.org/taxonomy/term/11/0 en Increase file descriptors for Transmission on Linux http://blog.samat.org/2011/04/05/Increase-file-descriptors-for-Transmission-on-Linux <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Have you run out of file descriptors for <a href="http://www.transmissionbt.com/">Transmission</a>? The torrent will be stopped (for no apparent reason), and when you examine it, you&#8217;ll see an error similar&nbsp;to:</p> <p><pre><samp><span class="prompt">$</span> <kbd>transmission-remote -t 1 -i | grep -i 'open files'</kbd> Unable to save resume file. Too many open files. </samp></pre></p> <p>Time to increase the number of file descriptors available. This article is tailored towards Debian and&nbsp;Ubuntu.</p> <p>It&#8217;s unlikely you&#8217;ll need to raise your system&#8217;s global limit. Check&nbsp;with:</p> <p><pre><samp><span class="prompt">$</span> <kbd>cat /proc/sys/fs/file-max</kbd> 397460 </samp></pre></p> <p>The <span class="caps">OS</span> needs a couple thousand file descriptors for itself. Make sure to make space for them with whatever numbers to choose below. In my case, I&#8217;ve more than&nbsp;enough.</p> <p>If you still need to raise your system&#8217;s limit, you can easily; to set it to a million (which will be remembered across&nbsp;reboots):</p> <p><pre><samp><kbd>sudo sh -c "echo fs.file-max=$(dc -e '2 20 ^ p') > /etc/sysctl.d/file-descriptors-max.conf</kbd> <kbd>sudo service procps restart</kbd> </samp></pre></p> <p>While you may not need to change your system&#8217;s global limit, you probably will need to change the limit for your users. Check that limit&nbsp;with:</p> <p><pre><samp><span class="prompt">$</span> <kbd>ulimit -Sn</kbd> 1024 <span class="prompt">$</span> <kbd>ulimit -Hn</kbd> 1024 </samp></pre></p> <p>If you&#8217;re working with hundreds of torrents (each with dozens to hundreds of files) with Transmission, this isn&#8217;t enough. To let a user have a few thousand (in the below example, 16,384, with 128 more for the hard limit), create a new file&nbsp;/etc/security/limits.d/debian-transmission.conf:</p> <p><pre><samp><kbd>sudo sh -c "echo debian-transmission soft nofile $(dc -e '2 14 ^ p')" > /etc/security/limits.d/debian-transmission.conf</kbd> <kbd>sudo sh -c "echo debian-transmission hard nofile $(dc -e '2 14 ^ 2 7 ^ + p')" >> /etc/security/limits.d/debian-transmission.conf</kbd> </samp></pre></p> <p>Replace &#8220;debian-transmission&#8221; with the user that is running&nbsp;Transmission.</p> <p>For the changes to go into effect, you need to logout completely (e.g. close multiplexed <span class="caps">SSH</span> connections, etc), and log back in again. Or to be sure, just reboot to make sure changes kick in. You&#8217;ll see you have many more file descriptors&nbsp;available:</p> <p><pre><samp><span class="prompt">$</span> <kbd>ulimit -Sn</kbd> 16384 <span class="prompt">$</span> <kbd>ulimit -Hn</kbd> 16512 </samp></pre></p> <p>Now, we need to configure Transmission to use this many. In /etc/transmission-daemon/settings.json, find the open-file-limit option and set to a larger number (e.g. 16000 or so). When done, restart&nbsp;transmission-daemon:</p> <p><pre><samp><kbd>sudo service transmission-daemon restart</kbd> </samp></pre></p> <p>If you&#8217;re not running Transmission as a system user, edit the right settings.json and restart the daemon&nbsp;appropriately.</p> <p>That&#8217;s it. Have&nbsp;fun!</p> </div></div></div><div class="field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-inline clearfix"><div class="field-label">Topic:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/tag/Linux" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Linux</a></div><div class="field-item odd"><a href="/tag/Debian" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Debian</a></div><div class="field-item even"><a href="/tag/Ubuntu" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Ubuntu</a></div></div></div> Tue, 05 Apr 2011 23:31:11 +0000 Samat Jain 172 at http://blog.samat.org High-resolution text console with uvesafb and Debian http://blog.samat.org/2010/11/09/High-resolution-text-console-with-uvesafb-and-Debian <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>While you may rarely use the console on your server, it&#8217;s nice to have a high-resolution display just to see that many more columns and rows. Linux&#8217;s vesa module (via the vga= parameter) has been around for a while and made this possible, provided you kept up with what <span class="caps">VGA</span> mode number to use and don&#8217;t mind the spotty hardware&nbsp;compatibility.</p> <p>While <abbr title="Kernel Mode Setting"><span class="caps">KMS</span></abbr> is the way to do this in the future, it doesn&#8217;t help us with the drivers and hardware we have now. A new kernel module, <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/fb/uvesafb.txt;h=eefdd91d298a9c9ea45e1ab9d84cdbf8ea1f1908;hb=HEAD">uvesafb</a>, mainlined in 2.6.24, is another, new option. In addition to specifying modes in a more user-friendly way (e.g. 1280x1024-32 for 32-bit color, with a 1280x1024 resolution), hardware compatibility is better—in particular, you can now get a high-resolution text console with <span class="caps">NVIDIA</span> display&nbsp;adapters.</p> <p>In the following, I describe how to use uvesafb on Debian and derivative distributions (e.g. Ubuntu). The instructions assume kernel 2.6.27 or higher (Debian 6.0 (squeeze) and Ubuntu 8.10 (Intrepid Ibex), or later). </div></div></div><div class="field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-inline clearfix"><div class="field-label">Topic:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/tag/Linux" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Linux</a></div><div class="field-item odd"><a href="/tag/Debian" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Debian</a></div><div class="field-item even"><a href="/tag/Ubuntu" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Ubuntu</a></div><div class="field-item odd"><a href="/tag/NVIDIA" typeof="skos:Concept" property="rdfs:label skos:prefLabel">NVIDIA</a></div></div></div> Wed, 10 Nov 2010 00:08:29 +0000 Samat Jain 164 at http://blog.samat.org Speeding up SpamAssassin rule processing on Debian and Ubuntu http://blog.samat.org/pages/speeding-up-spamassassin-rule-processing-on-debian-and-ubuntu.html <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p><a href="http://spamassassin.apache.org/">SpamAssassin</a> is one of the most-used spam filtering systems in use today. Unfortunately, because there are so many different ways SpamAssassin can be used, SpamAssassin remains subject to many performance problems. Fortunately, there are several speed-ups and optimizations that can be applied to most SpamAssassin installations to speed up its rule processing, especially on Debian and Ubuntu <span class="caps">GNU</span>/Linux-based systems. These instructions can be adopted to other operating systems as&nbsp;well.</p> <p>This article does not discuss configuring your mail filtering system (i.e. procmail, maildrop). This depends completely on your setup, and more than likely there are plenty of other articles that describe the best way to setup what you want. </div></div></div><div class="field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Type:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/type/article" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Article</a></div></div></div><div class="field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Topic:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/tag/Linux" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Linux</a></div><div class="field-item odd"><a href="/tag/Debian" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Debian</a></div><div class="field-item even"><a href="/tag/Ubuntu" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Ubuntu</a></div><div class="field-item odd"><a href="/tag/E-mail" typeof="skos:Concept" property="rdfs:label skos:prefLabel">E-mail</a></div></div></div> Thu, 02 Oct 2008 19:01:57 +0000 Samat Jain 143 at http://blog.samat.org Installing Java 2 on Debian, The Debian Way http://blog.samat.org/2005/09/21/installing_java_2_on_debian_the_debian_way <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I can never remember how to install <a href="http://java.sun.com/">Java</a> on <a href="http://www.debian.org/">Debian</a>, so here&#8217;s my version on how to do it the Debian Way&nbsp;(<span class="caps">TM</span>).</p> <p>Download the Sun Java 2 Runtime environment or Development Kit from <a href="http://java.sun.com/">Sun&#8217;s Java site</a>. The file you download should have a &#8220;.bin&#8221; extension. Then&nbsp;install:</p> <p><code> apt-get install java-package fakeroot </code></p> <p><tt>java-package</tt> is a set of Debian scripts for creating your own Debian-ized Java package. <tt>fakeroot</tt> lets you run certain programs as root, such as the Debian package creation process. After these are installed,&nbsp;run:</p> <p><code> fakeroot make-jpkg jdk-<em>.bin sudo dpkg -i sun-j2sdk</em>.deb </code></p> <p>The first creates a Debian package from the Sun binary installer, while the second installs the created Debian&nbsp;package.</p> <p>This will fulfill all Java dependencies in Debian, something you would not get if you installed Java via some other method. It&#8217;s also the &#8220;official&#8221; Java, as opposed to using something like Blackdown, and makes you less reliant on having to rely on other people for packaging. For example, I used this to create my own <span class="caps">AMD64</span> 64-bit Java&nbsp;package.</p> </div></div></div><div class="field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-inline clearfix"><div class="field-label">Topic:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/tag/Linux" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Linux</a></div><div class="field-item odd"><a href="/tag/Debian" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Debian</a></div><div class="field-item even"><a href="/tag/Software" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Software</a></div><div class="field-item odd"><a href="/tag/Java" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Java</a></div></div></div> Thu, 22 Sep 2005 01:04:00 +0000 Samat Jain 60 at http://blog.samat.org Debian's mailing lists: a spammer's delight http://blog.samat.org/2005/08/01/debians_mailing_lists_a_spammers_delight <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Since e-mail aliases are basically free (it&#8217;s a line in a text file), I&#8217;ve started the habit of creating new e-mail aliases for what I think have a &#8220;high-risk&#8221; of getting harvested by&nbsp;spammers.</p> <p>I created one for <a href="http://lists.debian.org/">Debian&#8217;s mailing lists</a> a week ago, and today I received my first spam e-mail to that address. It was an eBay phishing&nbsp;scheme.</p> <p>Debian&#8217;s public mailing list archives make no attempt at address obfuscation&#8211;any web crawler is free to come and take as many valid e-mail addresses as they want. My attempts at complaining about this appear to have fallen on dead ears&#8211;no one appears to&nbsp;care.</p> <p>At least it&#8217;s nice to <em>definitely</em> know where your spam is coming&nbsp;from.</p> </div></div></div><div class="field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-inline clearfix"><div class="field-label">Topic:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/tag/Debian" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Debian</a></div></div></div> Mon, 01 Aug 2005 15:38:00 +0000 Samat Jain 48 at http://blog.samat.org Debian-based x86-64 Live CDs http://blog.samat.org/2005/07/14/debian-based_x86-64_live_cds <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>At the moment, there are only two semi up-to-date x86-64 (that is, for Athlon-64, Intel <span class="caps">EMT64</span>, and Opteron) Debian-based live&nbsp;CDs.</p> <ul> <li><a href="http://www.applia.fr/contents/knoppix64.html">Knoppix-64</a>, based on Knoppix 3.4 (somewhat out of date as Knoppix 4.0 is&nbsp;out)</li> <li><a href="http://www.ubuntulinux.org/">Ubuntu</a>, which is kept up to date and is available tucked away on their <span class="caps">FTP</span>&nbsp;site</li> </ul> <p>I&#8217;m getting Ubuntu now to try out on my new&nbsp;workstation.</p> </div></div></div><div class="field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-inline clearfix"><div class="field-label">Topic:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/tag/Linux" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Linux</a></div><div class="field-item odd"><a href="/tag/Debian" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Debian</a></div></div></div> Fri, 15 Jul 2005 02:53:00 +0000 Samat Jain 42 at http://blog.samat.org