<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.kai-mai.com">
<channel>
 <title>Kai Mai&#039;s Blog - Take Back the Web - Nodes for utility</title>
 <link>http://www.kai-mai.com/tags/utility</link>
 <description>Nodes containing the tag utility</description>
 <language>en</language>
<item>
 <title>How to Check Disk Space and Directory Space in Linux</title>
 <link>http://www.kai-mai.com/node/168</link>
 <description>&lt;p&gt;
Surprisingly, I often run into the problem of running out of disk space in Linux.
&lt;/p&gt;
&lt;p&gt;
Here are some simple commands to check what consumes the most space:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; &amp;quot;df -k&amp;quot; shows the percentage of disk consumption for each partition 
&lt;li&gt; &amp;quot;du --max-depth 1 -h /&amp;quot; shows how much space each directory under &amp;quot;/&amp;quot; consumes in megabytes 
&lt;li&gt; &amp;quot;du -sm * | sort -n&amp;quot; does the same thing as the previous command
&lt;/ul&gt;
&lt;p&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/32230/tracking-down-where-disk-space-has-gone-on-linux&quot;&gt;stackoverflow&lt;/a&gt; has a good discussion as well.
&lt;/p&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/259&quot;&gt;utility&lt;/a&gt; &lt;a href=&quot;tags/348&quot;&gt;disk&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">utility</category>
 <category domain="http://www.technorati.com/tag">disk</category>
 <pubDate>Thu, 26 Mar 2009 10:21:50 -0700</pubDate>
</item>
<item>
 <title>Get Rid of Duplicated Entries/Processes in htop Display</title>
 <link>http://www.kai-mai.com/node/164</link>
 <description>&lt;p&gt;
&lt;a href=&quot;http://htop.sourceforge.net/&quot;&gt;htop&lt;/a&gt; is a &amp;quot;top&amp;quot; on steroid Linux utility for interactively viewing processes.
&lt;/p&gt;
&lt;p&gt;
What puzzled me was that some of the process counts seem to be doubled.
&lt;/p&gt;
&lt;p&gt;
I know for a fact that I run two &lt;a href=&quot;http://code.macournoyer.com/thin/&quot;&gt;Thin&lt;/a&gt; servers(BTW, Thin seems to use less memory than Mongrel). But htop shows 4 processes
&lt;/p&gt;
&lt;pre&gt;

3895 root      20   0  187M 95484  3732 S  0.0  9.1  0:55.42 thin server (/tmp/site.1.sock)                                                                               
3899 root      20   0  187M 95484  3732 S  0.0  9.1  0:03.26 thin server (/tmp/site.1.sock)

&lt;/pre&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/259&quot;&gt;utility&lt;/a&gt; &lt;a href=&quot;tags/336&quot;&gt;htop&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">utility</category>
 <category domain="http://www.technorati.com/tag">htop</category>
 <pubDate>Wed, 18 Feb 2009 23:28:50 -0800</pubDate>
</item>
<item>
 <title>Linux/Unix Console Tricks:  Multiple Screens within One Console,  Tailling Multiple Files with multitail</title>
 <link>http://www.kai-mai.com/node/144</link>
 <description>&lt;p&gt;
I find the following Linux/Unix console tricks really handy:
&lt;/p&gt;
&lt;h3&gt;
 Multiple screens within one console
&lt;/h3&gt;
&lt;p&gt;
You need to SSH into a Linux server and work with multiple screens(eg: tailing a log, vi a source file, etc).  Instead of opening multiple SSH sessions(multiple putty in Windows, or terminal windows in Mac), you can open multiple screens within one console window by using &amp;quot;screen&amp;quot; command.
&lt;/p&gt;
&lt;pre&gt;

yum install screen
screen
&lt;/pre&gt;
&lt;p&gt;
Here are the shortcuts:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; ctrl+a + ctrl+c to add a new screens
&lt;li&gt; ctrl+a + ctrl+a to switch between screens
&lt;li&gt; ctrl+a + &amp;quot; to see a list of screens
&lt;li&gt; ctrl+a + (a number) to switch to the &amp;quot;numbered&amp;quot; screen
&lt;/ul&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/2&quot;&gt;linux&lt;/a&gt; &lt;a href=&quot;tags/258&quot;&gt;console&lt;/a&gt; &lt;a href=&quot;tags/259&quot;&gt;utility&lt;/a&gt; &lt;a href=&quot;tags/260&quot;&gt;screen&lt;/a&gt; &lt;a href=&quot;tags/261&quot;&gt;trick&lt;/a&gt; &lt;a href=&quot;tags/262&quot;&gt;logging&lt;/a&gt; &lt;a href=&quot;tags/263&quot;&gt;shell&lt;/a&gt; &lt;a href=&quot;tags/264&quot;&gt;command&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">linux</category>
 <category domain="http://www.technorati.com/tag">console</category>
 <category domain="http://www.technorati.com/tag">utility</category>
 <category domain="http://www.technorati.com/tag">screen</category>
 <category domain="http://www.technorati.com/tag">trick</category>
 <category domain="http://www.technorati.com/tag">logging</category>
 <category domain="http://www.technorati.com/tag">shell</category>
 <category domain="http://www.technorati.com/tag">command</category>
 <pubDate>Tue, 23 Sep 2008 23:46:50 -0700</pubDate>
</item>
</channel>
</rss>

