<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>loopkid: Category English</title>
    <link>http://loopkid.net/articles/category/english</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>finding large directories</title>
      <description>&lt;p&gt;Every once in a while there is the need to clear out the system. The question that inevitably pops up is: Where has all the disk space gone ? The solution of course lies in locating the largest directories. With &lt;a href="http://www.id-design.com/software/whatsize/"&gt;WhatSize&lt;/a&gt; and &lt;a href="http://www.omnigroup.com/applications/omnidisksweeper/"&gt;OmniDiskSweeper&lt;/a&gt; there are two great tools on Mac OS X. There are also feasible Tools on Linux like &lt;a href="http://www.methylblue.com/filelight/"&gt;Filelight&lt;/a&gt;, but if you&amp;#8217;re administering a remote server and you don&amp;#8217;t want to use remote x11 access you need a solution that can be controlled either on the command line or via browser. Of course you could use sturdy old du.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
# Find all directories with the largest directories on top
$ sudo du -Sx / | sort -nr | less
# Find directories over 100MB with the largest directories on top
$ sudo du -Sh / | grep ^[1-9][0-9][0-9][0-9\.]*M | sort -nr
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or you could hack together some fancy &lt;a href="http://www.macosxhints.com/article.php?story=20070912091217207"&gt;perl&lt;/a&gt; &lt;a href="http://www.itworld.com/Comp/3380/nls_unixscrounge102104/index.html"&gt;script&lt;/a&gt;, but wouldn&amp;#8217;t it be nice to have an interactive graphical visualisation through which you could comfortably navigate ? This is where &lt;a href="http://zevv.nl/code/philesight/"&gt;Philesight&lt;/a&gt; pops in, which offers both command line and browserbased control. Putting it up on Debian is a breeze. Just install cairo and berkley db and their ruby bindings and then get rolling.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
$ wget http://zevv.nl/code/philesight/philesight-2035.tgz
$ tar xvfz philesight-2035.tgz
$ sudo apt-get install libcairo2 libcairo-ruby
$ sudo apt-get install libdb4.2 libdb4.2-ruby1.8
# Generate index
$ sudo ./philesight --db base.db --index /
# Check if image is correctly generated
$ ./philesight --db base.db --path / --draw base.png
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Firing up the web interface is just three small steps further. First configure the CGI-File.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
# philelight.cgi
db = "./base.db"
default_path = "/"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then create a reasonably named subdomain and after that just add a few lines to your lighttpd configuration file (or the corresponding lines to the webserver of your choice).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
$HTTP["host"] =~ "philesight.yourdomain.net" {
  cgi.assign = ( ".cgi" =&gt; "/usr/bin/ruby" )
  alias.url = ( "/" =&gt; "/path/to/philesight/philesight.cgi")
  server.document-root = "/path/to/philesight"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&amp;#8217;s all there&amp;#8217;s to it. Have fun.&lt;/p&gt;</description>
      <pubDate>Tue, 30 Oct 2007 23:49:25 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:90409df3-5f23-456d-a411-726536c84683</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2007/10/30/finding-large-directories</link>
      <category>English</category>
      <category>Software</category>
      <category>Mac OS X</category>
      <category>Linux</category>
    </item>
    <item>
      <title>bittorrent is a resource hog !</title>
      <description>&lt;p&gt;After upgrading the memory of my Powerbook to a more reasonable amount, I did some testing with heavy weight applications to see how much more free memory there would actually be available when working with real life documents. The results were quite satisfying, but during testing I noticed something else. The Bittorrent Client I had running in the background consumed more than 20(!) percent of my cpu resources even though it was only handling two downloads at that time. Even for a greedy filesharing application this seemed like an awful lot of cpu usage to me.&lt;/p&gt;

&lt;p&gt;I did some evaluation of Bittorrent clients a while ago, but only in terms of user interface and not in terms of cpu usage. I decided this might be a good moment to catch up on that. As my partner in crime I chose &lt;a href="http://www.clarkwood.com/peekaboo/"&gt;Peek-a-Boo&lt;/a&gt;, a very useful monitoring application. The competitors in my evaluation where the original &lt;a href="http://www.bittorrent.com/"&gt;Bittorrent Client&lt;/a&gt;, &lt;a href="http://transmission.m0k.org/"&gt;Transmission&lt;/a&gt;, &lt;a href="http://www.bitrocket.org/"&gt;BitRocket&lt;/a&gt; and &lt;a href="http://www.bitsonwheels.com/"&gt;Bits on Wheels&lt;/a&gt;. The task was simply to handle a dozen downloads simultaneously with the user interface minimized to the dock.&lt;/p&gt;

&lt;p&gt;After initializing the downloads I waited a few minutes for the applications to connect to their peers and then opened a usage history window for each of them. The results where quite interesting and proved me right in my suspiciousness concerning the Bittorrent Client being a little too wasteful with cpu resources.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/torrent-cpu-usage.png" alt="CPU usage graphs of torrent clients"/&gt;&lt;/p&gt;

&lt;p&gt;Due to the dynamic scaling of the graphs you can see that these applications actually play in different leagues concerning their cpu usage. The Bittorrent Client operated in the 20% scale, BitRocket and Bits on Wheels were both located in the 10% scale and Transmission was in the 5% scale. They all seemed to perform around equally well in terms of their download rate. These graphs are of course by no means scientific, but from my observation they do show representative values.&lt;/p&gt;

&lt;p&gt;&lt;img src="/files/torrent-cpu-usage-shape.png" alt="CPU usage graphs of Bittorrent clients"/&gt;&lt;/p&gt;

&lt;p&gt;An interesting thing to note besides that, is that each application seems to generate a distinct shape when utilizing the cpu. The Bittorrent Client produces a very regular sawtooth-like pattern and Bits on Wheels shows a similar shape, but has a little more spikes. BitRocket has the most irregular shape of all applications and Transmission has the smoothest curve. After having observed these curves for a while - beware, now it&amp;#8217;s getting really nerdy - I felt like it probably wouldn&amp;#8217;t be too hard to identify the application by its cpu usage curve. Before I start getting carried though let me wrap this up by stating that my new default application for downloading torrents on Mac OS X is of course the wonderful &lt;a href="http://transmission.m0k.org/"&gt;Transmission&lt;/a&gt;, which also happens to have a quite polished minimalistic interface and very intuitive preferences. Congratulations to &lt;a href="http://m0k.org/"&gt;Eric Petit&lt;/a&gt; and his collaborators!&lt;/p&gt;</description>
      <pubDate>Tue, 07 Nov 2006 21:42:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:cb77f6f2-f281-49d1-9f9f-697cbd02ebbe</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2006/11/07/bittorrent-is-a-resource-hog</link>
      <category>English</category>
      <category>Software</category>
      <category>Apple</category>
      <category>Internet</category>
      <trackback:ping>http://loopkid.net/articles/trackback/2865</trackback:ping>
    </item>
    <item>
      <title>donationware as a business model ?</title>
      <description>&lt;blockquote&gt;
    &lt;p&gt;More generally thinking I asked myself how many people actually do Paypal donations on &amp;#8220;donationware&amp;#8221;? Would these little applications make a better profit if they sell for $10 instead of $25? &amp;#8212; &lt;a href="http://wrede.interfacedesign.org/archives/1196.html"&gt;Oliver Wrede&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Actually I really do like the concept of donationware and have bought several little Mac apps this way, mostly between $5 and $20. I think this a really great small scale business model because it involves &lt;em&gt;trust&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Another nice option for programmers of small applications in my opinion is the selling of devotional objects via some online retailer. One of my favorite investments from this category has been the &lt;a href="http://www.cafepress.com/cyberduck"&gt;Cyberduck Mug&lt;/a&gt; from &lt;a href="http://sudo.ch/~dkocher/"&gt;David Kocher&amp;#8217;s&lt;/a&gt; Cafepress store. Talking about great ftp clients, this strategy of course isn&amp;#8217;t solely an option for donationware, a purchase at &lt;a href="http://www.panic.com/goods/"&gt;Panic Goods&lt;/a&gt; in addition to buying a license for Transmit or Unison sure won&amp;#8217;t hurt those guys neither.&lt;/p&gt;</description>
      <pubDate>Tue, 05 Sep 2006 11:25:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:b39dc8ba-f528-4a00-968a-fb7e9e0981e3</guid>
      <author>Stefan</author>
      <link>http://loopkid.net/articles/2006/09/05/donationware-as-a-business-model</link>
      <category>English</category>
      <category>Software</category>
      <category>Vertrauen</category>
      <trackback:ping>http://loopkid.net/articles/trackback/2773</trackback:ping>
    </item>
  </channel>
</rss>
