<?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>Mjanja Tech</title>
	<atom:link href="http://mjanja.co.ke/feed/" rel="self" type="application/rss+xml" />
	<link>http://mjanja.co.ke</link>
	<description>Chini ya maji, just for the lulz</description>
	<lastBuildDate>Mon, 30 Apr 2012 09:04:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Resetting the flash counter on the Samsung Galaxy Tab 7 Plus</title>
		<link>http://mjanja.co.ke/2012/04/resetting-the-flash-counter-on-the-samsung-galaxy-tab-7-plus/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=resetting-the-flash-counter-on-the-samsung-galaxy-tab-7-plus</link>
		<comments>http://mjanja.co.ke/2012/04/resetting-the-flash-counter-on-the-samsung-galaxy-tab-7-plus/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 21:02:50 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[CyanogenMod]]></category>
		<category><![CDATA[Galaxy Tab 7.0 Plus]]></category>
		<category><![CDATA[Samsung]]></category>
		<category><![CDATA[TriangleAway]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1179</guid>
		<description><![CDATA[First, the exciting news: we can now reset the flash counter on the Galaxy Tab 7 Plus. Here&#8217;s mine, freshly reset: Background (moar info!) Starting with the Galaxy S2, Samsung began tracking the number of times you flashed custom kernels to your device. This includes the Samsung Galaxy Note, the Galaxy Tab 7 Plus, Galaxy [...]]]></description>
			<content:encoded><![CDATA[<p>First, the exciting news: we can now reset the flash counter on the Galaxy Tab 7 Plus.  Here&#8217;s mine, freshly reset:</p>

<a href='http://mjanja.co.ke/2012/04/resetting-the-flash-counter-on-the-samsung-galaxy-tab-7-plus/flash_counter_reset/' title='Flash counter reset'><img width="225" height="300" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/flash_counter_reset-225x300.jpg" class="attachment-medium" alt="Flash counter reset" title="Flash counter reset" /></a>

<h2>Background (moar info!)</h2>
<p>Starting with the Galaxy S2, Samsung began tracking the number of times you flashed custom kernels to your device.  This includes the Samsung Galaxy Note, the Galaxy Tab 7 Plus, Galaxy Tab 7.7, and probably many others.  If the flash count is greater than 0, your device is marred by some sort of mark to betray the fact that you&#8217;ve been tinkering; on the Galaxy S2 it&#8217;s a yellow triangle, on the Tab 7 Plus it&#8217;s a number displayed during download mode, etc.</p>
<p>After some research by teamhacksung and ChainfireXDA, it was found that the flash counter stored its count in one of the device&#8217;s boot partitions (<code>/sys/block/mmcblk0boot0</code>), and that it could be reset.  Chainfire even wrote a handy GUI tool called <a href="http://forum.xda-developers.com/showthread.php?t=1494114" title="TriangleAway on XDA forums">TriangleAway</a> for querying/resetting the counter.  The catch is that this partition is <em>only exposed on Ice Cream Sandwich kernels</em>.</p>
<h2>TriangeAway&#8230; before and after!</h2>
<p>As we recently got the Galaxy S2 Exynos 4210 kernel booting on our tablets, I had a hunch this would work.  Sure enough, it did!</p>

<a href='http://mjanja.co.ke/2012/04/resetting-the-flash-counter-on-the-samsung-galaxy-tab-7-plus/screenshot_2012-04-29-19-14-56/' title='Before... 72'><img width="300" height="175" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/Screenshot_2012-04-29-19-14-56-300x175.png" class="attachment-medium" alt="Before... 72" title="Before... 72" /></a>
<a href='http://mjanja.co.ke/2012/04/resetting-the-flash-counter-on-the-samsung-galaxy-tab-7-plus/screenshot_2012-04-29-19-15-18/' title='After... 0'><img width="300" height="175" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/Screenshot_2012-04-29-19-15-18-300x175.png" class="attachment-medium" alt="After... 0" title="After... 0" /></a>

<p>Thanks to teamhacksung and ChainfireXDA for discovering this ish.  Actually, I couldn&#8217;t give a flying hoot about the flash counter, but it&#8217;s nice to know it can be reset if we need it.</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/04/resetting-the-flash-counter-on-the-samsung-galaxy-tab-7-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wi-Fi working on Tab 7.0 Plus CyanogenMod 9</title>
		<link>http://mjanja.co.ke/2012/04/wi-fi-working-on-tab-7-0-plus-cyanogenmod-9/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wi-fi-working-on-tab-7-0-plus-cyanogenmod-9</link>
		<comments>http://mjanja.co.ke/2012/04/wi-fi-working-on-tab-7-0-plus-cyanogenmod-9/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 21:56:22 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[CM9]]></category>
		<category><![CDATA[CyanogenMod]]></category>
		<category><![CDATA[Galaxy Tab 7.0 Plus]]></category>
		<category><![CDATA[ICS]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1164</guid>
		<description><![CDATA[The Galaxy Tab 7.7s have had Wi-Fi for a week or so now, but I haven&#8217;t been able to get it working on the Tab 7.0 Plus. We use the exact same wireless chipset, hardware revision, kernel source, wireless driver, etc&#8230; but no go. Today, to my surprise, I turned on my tablet and then [...]]]></description>
			<content:encoded><![CDATA[<p>The Galaxy Tab 7.7s have had Wi-Fi for a week or so now, but I haven&#8217;t been able to get it working on the Tab 7.0 Plus.  We use the exact same wireless chipset, hardware revision, kernel source, wireless driver, etc&#8230; but no go.  Today, to my surprise, I turned on my tablet and then BAM, Wi-Fi!</p>

<a href='http://mjanja.co.ke/2012/04/wi-fi-working-on-tab-7-0-plus-cyanogenmod-9/screenshot_2012-04-24-20-18-31/' title='Wi-Fi settings (WPA2 ftw!)'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/Screenshot_2012-04-24-20-18-31-150x150.png" class="attachment-thumbnail" alt="Wi-Fi settings (WPA2 ftw!)" title="Wi-Fi settings (WPA2 ftw!)" /></a>
<a href='http://mjanja.co.ke/2012/04/wi-fi-working-on-tab-7-0-plus-cyanogenmod-9/screenshot_2012-04-24-20-26-16/' title='Google zipper doodle'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/Screenshot_2012-04-24-20-26-16-150x150.png" class="attachment-thumbnail" alt="Google zipper doodle" title="Google zipper doodle" /></a>

<p>Dunno why it finally decided to work today, but at least I&#8217;ve seen that it CAN work; we can only go up from here!</p>
<h2>The road ahead</h2>
<p>In other news, we&#8217;re learning that our Exynos 4210-based tabs have a lot of wireless stuff in common with the HP Touchpad (aka &#8220;Tenderloin&#8221; in the CyanogenMod world), so hopefully we can all work together to get stable Wi-Fi on these devices.</p>
<p>As far as the tools we&#8217;re using, <a href="http://linuxwireless.org/" title="Linux Wireless">compat-wireless</a> is proving to be a promising route for us, as they have an actively-maintained ath6kl driver (which supports our wireless chipset).  Also, the <a href="http://www.origenboard.org/" title="Origen development board">Samsung Origen development</a> board also uses an Atheros chipset and has a working compat-wireless implementation, and Linaro has some literature about this chipset.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/04/wi-fi-working-on-tab-7-0-plus-cyanogenmod-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile data tracking working on Tab 7 Plus CM9</title>
		<link>http://mjanja.co.ke/2012/04/mobile-data-tracking-working-on-tab-7-plus-cm9/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mobile-data-tracking-working-on-tab-7-plus-cm9</link>
		<comments>http://mjanja.co.ke/2012/04/mobile-data-tracking-working-on-tab-7-plus-cm9/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 13:33:49 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CM9]]></category>
		<category><![CDATA[CyanogenMod]]></category>
		<category><![CDATA[Galaxy Tab 7.0 Plus]]></category>
		<category><![CDATA[ICS]]></category>
		<category><![CDATA[Samsung]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1135</guid>
		<description><![CDATA[With Android 4.0 &#8220;Ice Cream Sandwich&#8221; came an interesting new feature: mobile data usage tracking. It tracks, graphs, and logs your data usage (and the applications which were responsible for using the data). I just got it working on my alpha CM9 port for the Galaxy Tab 7.0 Plus&#8230; I don&#8217;t know how accurate it [...]]]></description>
			<content:encoded><![CDATA[<p>With Android 4.0 &#8220;Ice Cream Sandwich&#8221; came an interesting new feature: mobile data usage tracking.  It tracks, graphs, and logs your data usage (and the applications which were responsible for using the data).</p>
<p>I just got it working on my <a href="http://forum.xda-developers.com/showthread.php?t=1576553" title="CyanogenMod 9 for GT-P6200 on XDA Forums">alpha CM9 port for the Galaxy Tab 7.0 Plus</a>&#8230;</p>

<a href='http://mjanja.co.ke/2012/04/mobile-data-tracking-working-on-tab-7-plus-cm9/ics_p6200_mobile_data_tracking/' title='ICS mobile data usage tracking'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/ics_p6200_mobile_data_tracking-150x150.png" class="attachment-thumbnail" alt="ICS mobile data usage tracking" title="ICS mobile data usage tracking" /></a>
<a href='http://mjanja.co.ke/2012/04/mobile-data-tracking-working-on-tab-7-plus-cm9/ics_p6200_mobile_data_tracking2/' title='Detailed data usage breakdown'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/ics_p6200_mobile_data_tracking2-150x150.png" class="attachment-thumbnail" alt="Detailed data usage breakdown" title="Detailed data usage breakdown" /></a>

<p>I don&#8217;t know how accurate it is, but it does appear to work; you can see it has named and shamed Google Play Store and Chrome.</p>
<h2>Background</h2>
<p>The Android platform apparently <a href="https://groups.google.com/forum/#!msg/android-platform/qBgLYSCGnD8/uNHHJc0W-YsJ">requires the kernel network data logging functionality</a>, but many pre-ICS devices using Linux kernels < 3.0 don't have it.  The Honeycomb-based Galaxy Tab 7.0 Plus and Tab 7.7, for example, are using Linux kernel 2.6.36.</p>
<p>Android is quite noisy about the missing stats when using a device without the appropriate kernel support:</p>
<pre><code>F/NetworkStats( 3434): problem reading network stats
F/NetworkStats( 3434): java.lang.IllegalStateException: problem parsing idx 1
F/NetworkStats( 3434):  at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
F/NetworkStats( 3434):  at com.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1284)
F/NetworkStats( 3434):  at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:831)
F/NetworkStats( 3434):  at com.android.server.net.NetworkStatsService.updateIfacesLocked(NetworkStatsService.java:743)
F/NetworkStats( 3434):  at com.android.server.net.NetworkStatsService.updateIfaces(NetworkStatsService.java:721)
F/NetworkStats( 3434):  at com.android.server.net.NetworkStatsService.access$000(NetworkStatsService.java:128)
F/NetworkStats( 3434):  at com.android.server.net.NetworkStatsService$8.handleMessage(NetworkStatsService.java:1633)
F/NetworkStats( 3434):  at android.os.Handler.dispatchMessage(Handler.java:95)
F/NetworkStats( 3434):  at android.os.Looper.loop(Looper.java:137)
F/NetworkStats( 3434):  at android.os.HandlerThread.run(HandlerThread.java:60)
<span style="color:red">F/NetworkStats( 3434): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)</span>
F/NetworkStats( 3434):  at libcore.io.IoBridge.open(IoBridge.java:406)
F/NetworkStats( 3434):  at java.io.FileInputStream.<init>(FileInputStream.java:78)
F/NetworkStats( 3434):  at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
F/NetworkStats( 3434):  ... 9 more
F/NetworkStats( 3434): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
F/NetworkStats( 3434):  at libcore.io.Posix.open(Native Method)
F/NetworkStats( 3434):  at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
F/NetworkStats( 3434):  at libcore.io.IoBridge.open(IoBridge.java:390)
F/NetworkStats( 3434):  ... 11 more</code></pre>
<h2>The fix(es)</h2>
<p>You need to patch your kernel to have the appropriate <code>"Quota, tag, owner" match and stats support</code> for netfilter.  If you're lucky you'll find someone who's already backported the support for your kernel version (or at least something close).  In our case, I found that Cyanogen himself had <a href="https://github.com/cyanogen/galaxy-2636/" title="Cyanogen's Tab 10.1 Linux kernel">already patched another 2.6.36 kernel</a> with this functionality and, much to my surprise, the patches applied cleanly to our kernel.</p>
<p>After that, you need to make sure <code>CONFIG_NETFILTER_XT_MATCH_QTAGUID=y</code> in your kernel config, and then you <strong>should</strong> be golden.</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/04/mobile-data-tracking-working-on-tab-7-plus-cm9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This server should be on fire</title>
		<link>http://mjanja.co.ke/2012/04/this-server-should-be-on-fire/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=this-server-should-be-on-fire</link>
		<comments>http://mjanja.co.ke/2012/04/this-server-should-be-on-fire/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 14:19:33 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bioinformatics]]></category>
		<category><![CDATA[HPC]]></category>
		<category><![CDATA[ILRI]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1118</guid>
		<description><![CDATA[Sometimes users run scripts without checking the parameters first, often recycling scripts they&#8217;ve used elsewhere, at former jobs or at other institutes. Sometimes this works out, sometimes it doesn&#8217;t&#8230; With a load of ~75 and 32 physical cores, the CPU usage on this server is oversubscribed 2.3 times a &#8220;normal&#8221; 100% load (where 100% of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes users run scripts without checking the parameters first, often recycling scripts they&#8217;ve used elsewhere, at former jobs or at other institutes.  Sometimes this works out, sometimes it doesn&#8217;t&#8230;</p>

<a href='http://mjanja.co.ke/2012/04/this-server-should-be-on-fire/hpc_oversubscribed/' title='HPC over subscribed'><img width="300" height="169" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/hpc_oversubscribed-300x169.png" class="attachment-medium" alt="HPC over subscribed" title="HPC over subscribed" /></a>

<p>With a load of ~75 and 32 physical cores, the CPU usage on this server is oversubscribed 2.3 times a &#8220;normal&#8221; 100% load (where 100% of 32 CPUs would be a load of 32.0).  Luckily nobody else is using it right now!</p>
<p>The job in question is the highly-parallelizable <a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&#038;PAGE_TYPE=BlastDocs&#038;DOC_TYPE=ProgSelectionGuide" title="BLAST help at NCBI">blastx</a>; a sequence search/alignment tool used by Bioinformaticians to determine if a given protein sequence matches proteins for a known nucleotide coding region.</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/04/this-server-should-be-on-fire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu GCC &gt; 4.4.x considered harmful!</title>
		<link>http://mjanja.co.ke/2012/04/ubuntu-gcc-4-4-considered-harmful/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-gcc-4-4-considered-harmful</link>
		<comments>http://mjanja.co.ke/2012/04/ubuntu-gcc-4-4-considered-harmful/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 12:40:10 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CyanogenMod]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1107</guid>
		<description><![CDATA[Note: I&#8217;ve since updated the build server in question to Ubuntu 12.04, where the default GCC is 4.6.3. It seems that at least some of these issues have been corrected in GCC. Your mileage may vary. &#8211;Alan, April 28, 2012 I&#8217;ve been having some problems with Ubuntu 11.10&#8242;s default GCC (4.6.2) for some time now. [...]]]></description>
			<content:encoded><![CDATA[<div class="note">Note: I&#8217;ve since updated the build server in question to Ubuntu 12.04, where the default GCC is 4.6.3.  It seems that at least some of these issues have been corrected in GCC.  Your mileage may vary.  &#8211;Alan, April 28, 2012</div>
<p>I&#8217;ve been having some problems with Ubuntu 11.10&#8242;s default GCC (4.6.2) for some time now.  First, I was having problems with self-kang CyanogenMod 9 builds on my Samsung Tab 7 Plus (specifically, <code>adb</code> wouldn&#8217;t work).  Second, I couldn&#8217;t boot Linux kernel 3.3 on my <a href="http://mjanja.co.ke/2011/12/new-mjanja-build-server/" title="New mjanja build server">Sandy Bridge Core i7-2600 build server</a>.</p>
<p>I didn&#8217;t <em>know</em> the problems were because of GCC until recently, but now that I&#8217;ve switched back to 4.4 both of those problems have gone away; I can only assume that something in Ubuntu&#8217;s GCC fork is broken.  The solution: set GCC 4.4 as the default compiler.</p>
<p>It&#8217;s pretty easy to do this in Debian-based distros using the <code>alternatives</code> system.  </p>
<h2>Install GCC 4.4</h2>
<p>First, install GCC 4.4 (and friends):</p>
<pre><code>apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib gcc-4.4-multilib</code></pre>
<h2>Set 4.4 to be the default</h2>
<p>Then set 4.4 to be higher priority than 4.6:</p>
<pre><code>update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 50
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 100
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 50
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.4 100
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 50</code></pre>
<p>Verify that it has worked:</p>
<pre><code>gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.6-11ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.6 (Ubuntu/Linaro 4.4.6-11ubuntu2)</code></pre>
<p>Done!</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/04/ubuntu-gcc-4-4-considered-harmful/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GSM working on Galaxy Tab 7 Plus CM9 alpha</title>
		<link>http://mjanja.co.ke/2012/04/gsm-working-on-galaxy-tab-7-plus-cm9-alpha/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gsm-working-on-galaxy-tab-7-plus-cm9-alpha</link>
		<comments>http://mjanja.co.ke/2012/04/gsm-working-on-galaxy-tab-7-plus-cm9-alpha/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 19:46:31 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[CM9]]></category>
		<category><![CDATA[CyanogenMod]]></category>
		<category><![CDATA[Galaxy Tab 7 Plus]]></category>
		<category><![CDATA[GT-P6200]]></category>
		<category><![CDATA[ICS]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1083</guid>
		<description><![CDATA[After much discussion with locerra and poisike on XDA and github, I&#8217;ve got GSM telephony and data working on the Galaxy Tab 7 Plus on my super-alpha CyanogenMod 9 port. Check out the thread on XDA forums for more info (and downloads!). Calls, SMS, and USSD requests all seem to be working reasonably well. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>After much discussion with locerra and poisike on XDA and github, I&#8217;ve got GSM telephony and data working on the Galaxy Tab 7 Plus on my super-alpha CyanogenMod 9 port.  Check out the <a href="http://forum.xda-developers.com/showthread.php?t=1576553" title="CM9 for GT-P6200 on XDA Developers">thread on XDA forums</a> for more info (and downloads!).</p>
<p>Calls, SMS, and USSD requests all seem to be working reasonably well.  Here&#8217;s a picture of me demonstrating how it works to my girlfriend:<br />

<a href='http://mjanja.co.ke/2012/04/gsm-working-on-galaxy-tab-7-plus-cm9-alpha/alan_telephony_p6200/' title='&quot;Can you hear me now?!&quot;'><img width="225" height="300" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/alan_telephony_p6200-225x300.jpg" class="attachment-medium" alt="&quot;Can you hear me now?!&quot;" title="&quot;Can you hear me now?!&quot;" /></a>
</p>
<p>Data seems to work too.  Here are a few screenshots from the web browser:<br />

<a href='http://mjanja.co.ke/2012/04/gsm-working-on-galaxy-tab-7-plus-cm9-alpha/screenshot_2012-04-13-17-55-49/' title='Our usually-evil-but-sometimes-good overlords'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/Screenshot_2012-04-13-17-55-49-150x150.png" class="attachment-thumbnail" alt="Our usually-evil-but-sometimes-good overlords" title="Our usually-evil-but-sometimes-good overlords" /></a>
<a href='http://mjanja.co.ke/2012/04/gsm-working-on-galaxy-tab-7-plus-cm9-alpha/screenshot_2012-04-13-18-21-25/' title='mjanja.co.ke (for the lulz)'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/Screenshot_2012-04-13-18-21-25-150x150.png" class="attachment-thumbnail" alt="mjanja.co.ke (for the lulz)" title="mjanja.co.ke (for the lulz)" /></a>
<a href='http://mjanja.co.ke/2012/04/gsm-working-on-galaxy-tab-7-plus-cm9-alpha/screenshot_2012-04-13-18-27-20/' title='Why not?'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/Screenshot_2012-04-13-18-27-20-150x150.png" class="attachment-thumbnail" alt="Why not?" title="Why not?" /></a>
</p>
<p>If you&#8217;re curious how I got it up and running (like maybe you&#8217;re starting a new CyanogenMod port for your device), check out these commits to my <a href="https://github.com/alanorth/android_device_samsung_p6200" title="GT-P6200 device tree for CM9">p6200 repo on github</a>:</p>
<ul>
<li><a href="https://github.com/alanorth/android_device_samsung_p6200/commit/d2f899835b3575fd22d095790d0e5ff73fbaa7c2" title="extract-files.sh: Add RIL stuff">extract-files.sh: Add RIL stuff</a>
<li><a href="https://github.com/alanorth/android_device_samsung_p6200/commit/775bdfc6505792e69fdd8b678acbd3565ca9f1f2" title="extract-files.sh: Add more RIL libraries">extract-files.sh: Add more RIL libraries</a>
<li><a href="https://github.com/alanorth/android_device_samsung_p6200/commit/d4bb795ec6a7e83e2a8fa496d14e52c43634637a" title="Add initial system.prop with RIL settings">Add initial system.prop with RIL settings</a>
<li><a href="https://github.com/alanorth/android_device_samsung_p6200/commit/3a05c4e484b7fbcdbfd670d936b0c9268a0261ba" title="Enable GSM functionality">Enable GSM functionality</a>
<li><a href="https://github.com/alanorth/android_device_samsung_p6200/commit/4acf1dd859a4ed76df2e0db5f8263cd44f352ab3" title="Add system properties required for mobile data">Add system properties required for mobile data</a>
</ul>
<h2>Going further&#8230;</h2>
<p>Basically, you need to make sure your device is inheriting AOSP and CyanogenMod components required for telephony, excerpt from <code>p6200.mk</code>:</p>
<pre><code>$(call inherit-product, vendor/cm/config/gsm.mk)

$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)</code></pre>
<p>Also, you&#8217;ll need to make sure you&#8217;ve extracted/copied proprietary RIL bits from your phone&#8217;s stock ROM, excerpt from <code>extract-files.sh</code>:</p>
<pre><code># RIL
adb pull /system/bin/rild ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/rild
adb pull /system/lib/libril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libril.so
adb pull /system/lib/libsec-ril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsec-ril.so
adb pull /system/lib/libsecril-client.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsecril-client.so</code>
...
# Prebuilt libraries that are needed to build open-source libraries
PRODUCT_COPY_FILES += \\
    vendor/__MANUFACTURER__/__DEVICE__/proprietary/libril.so:obj/lib/libril.so \\
    vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsecril-client.so:obj/lib/libsecril-client.so

# RIL
PRODUCT_COPY_FILES += \\
    vendor/__MANUFACTURER__/__DEVICE__/proprietary/rild:system/bin/rild \\
    vendor/__MANUFACTURER__/__DEVICE__/proprietary/libril.so:system/lib/libril.so \\
    vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsecril-client.so:system/lib/libsecril-client.so

EOF</pre>
<p>Lastly, make sure you&#8217;re specifying the correct RIL-related properties (hint: check your stock ROM), excerpt from <code>rild.libpath=/system/lib/libsec-ril.so</code>:</p>
<pre><code>rild.libargs=-d /dev/ttyS0
ro.telephony.ril_class=SamsungHCRIL
ro.telephony.sends_barcount=1
ro.telephony.ril.v3=signalstrength,usehcradio</code></pre>
<p>Hope that helps some future space time traveler looking to port AOSP/CM to his/her device. <img src='http://mjanja.co.ke/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/04/gsm-working-on-galaxy-tab-7-plus-cm9-alpha/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fastest mulika mwizi in Kenya</title>
		<link>http://mjanja.co.ke/2012/04/fastest-mulika-mwizi-in-kenya/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fastest-mulika-mwizi-in-kenya</link>
		<comments>http://mjanja.co.ke/2012/04/fastest-mulika-mwizi-in-kenya/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 16:46:14 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Nokia 1202]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1068</guid>
		<description><![CDATA[I upgraded my Nokia 1202 (known as the mulika mwizi in Kenya) to get some more performance out of it&#8230; before and after: I know it&#8217;s ONLY a Core i7-2600 (no overclocking!), but maybe I&#8217;ll throw an SSD in next&#8230; Or! Maybe a Beowulf cluster of mulika mwizis!]]></description>
			<content:encoded><![CDATA[<p>I upgraded my Nokia 1202 (known as the <em>mulika mwizi</em> in Kenya) to get some more performance out of it&#8230; before and after:</p>

<a href='http://mjanja.co.ke/2012/04/fastest-mulika-mwizi-in-kenya/samsung-3/' title='Boring, old, normal Nokia 1202'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/mulika_mwizi_before-150x150.jpg" class="attachment-thumbnail" alt="Boring, old, normal Nokia 1202" title="Boring, old, normal Nokia 1202" /></a>
<a href='http://mjanja.co.ke/2012/04/fastest-mulika-mwizi-in-kenya/samsung-2/' title='Mulika mwizi with Intel inside!'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/mulika_mwizi_after-150x150.jpg" class="attachment-thumbnail" alt="Mulika mwizi with Intel inside!" title="Mulika mwizi with Intel inside!" /></a>

<p>I know it&#8217;s ONLY a Core i7-2600 (no overclocking!), but maybe I&#8217;ll throw an SSD in next&#8230;  Or!  Maybe a Beowulf cluster of mulika mwizis!</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/04/fastest-mulika-mwizi-in-kenya/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CyanogenMod 9 alpha for Galaxy Tab 7 Plus (GT-P6200)</title>
		<link>http://mjanja.co.ke/2012/04/cyanogenmod-9-alpha-for-galaxy-tab-7-plus-gt-p6200/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cyanogenmod-9-alpha-for-galaxy-tab-7-plus-gt-p6200</link>
		<comments>http://mjanja.co.ke/2012/04/cyanogenmod-9-alpha-for-galaxy-tab-7-plus-gt-p6200/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 19:52:43 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[CM9]]></category>
		<category><![CDATA[CyanogenMod]]></category>
		<category><![CDATA[Galaxy Tab 7.0 Plus]]></category>
		<category><![CDATA[GT-P6200]]></category>
		<category><![CDATA[ICS]]></category>
		<category><![CDATA[P6200]]></category>
		<category><![CDATA[Samsung]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1052</guid>
		<description><![CDATA[A few weeks ago I started porting CyanogenMod 9 (Ice Cream Sandwich) to the Galaxy Tab 7 Plus. It was a slow start, but after fixing up the touchscreen driver for ICS things started moving much quicker. It has finally reached a state where I feel that it would benefit from public testing (as well [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I started porting CyanogenMod 9 (Ice Cream Sandwich) to the Galaxy Tab 7 Plus.  It was a slow start, but after <a href="http://mjanja.co.ke/2012/03/fixed-melfas-touch-screen-on-android-4-0-ics/" title="Fixed Tab 7 Plus melfas touchscreen on Android 4.0 ICS">fixing up the touchscreen driver for ICS</a> things started moving much quicker.  It has finally reached a state where I feel that it would benefit from public testing (as well as help from other people).</p>
<p>As you can see, it is based on Android 4.0.4:<br />

<a href='http://mjanja.co.ke/2012/04/cyanogenmod-9-alpha-for-galaxy-tab-7-plus-gt-p6200/cm9_p6200_about/' title='&quot;About this tablet&quot;'><img width="300" height="175" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/cm9_p6200_about-300x175.png" class="attachment-medium" alt="&quot;About this tablet&quot;" title="&quot;About this tablet&quot;" /></a>
</p>
<h2>What works</h2>
<p>The device is properly recognized as a tablet, so tablet-mode stuff (like the bottom bar) work properly.  It&#8217;s incredibly fast; most transitions are buttery smooth, applications launch fast, etc. Hardware buttons (power and volume) work properly, and trigger appropriate Android OS functionality.</p>
<h2>What doesn&#8217;t work</h2>
<p>Lots of stuff is still broken.  The list is very long!</p>
<ul>
<li>Audio
<li>Bluetooth
<li>Hardware-accelerated video decoding
<li>Telephony (voice, sms, data)
<li>Wifi
<li>Camera
<li>GPS
<li>Ambient light sensor
</ul>
<p>Here are a few more screenshots to tide you over&#8230;</p>

<a href='http://mjanja.co.ke/2012/04/cyanogenmod-9-alpha-for-galaxy-tab-7-plus-gt-p6200/cm9_p6200_lockscreen/' title='Lock screen'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/cm9_p6200_lockscreen-150x150.png" class="attachment-thumbnail" alt="Lock screen" title="Lock screen" /></a>
<a href='http://mjanja.co.ke/2012/04/cyanogenmod-9-alpha-for-galaxy-tab-7-plus-gt-p6200/cm9_p6200_apps_drawer/' title='Apps drawer'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/cm9_p6200_apps_drawer-150x150.png" class="attachment-thumbnail" alt="Apps drawer" title="Apps drawer" /></a>
<a href='http://mjanja.co.ke/2012/04/cyanogenmod-9-alpha-for-galaxy-tab-7-plus-gt-p6200/cm9_p6200_homescreen_transition/' title='Homescreen transition'><img width="150" height="150" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/04/cm9_p6200_homescreen_transition-150x150.png" class="attachment-thumbnail" alt="Homescreen transition" title="Homescreen transition" /></a>

<p>Anyone interested in more details (developers or curious users), should head over to the <a href="http://forum.xda-developers.com/showthread.php?t=1576553" title="Galaxy Tab 7 Plus CyanogenMod 9 alpha on XDA Developers">XDA thread</a>.  Sources are available at <a href="http://github.com/alanorth" title="alanorth on Github">my github account</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/04/cyanogenmod-9-alpha-for-galaxy-tab-7-plus-gt-p6200/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixed Tab 7 Plus melfas touchscreen on Android 4.0 ICS</title>
		<link>http://mjanja.co.ke/2012/03/fixed-melfas-touch-screen-on-android-4-0-ics/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fixed-melfas-touch-screen-on-android-4-0-ics</link>
		<comments>http://mjanja.co.ke/2012/03/fixed-melfas-touch-screen-on-android-4-0-ics/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 00:10:01 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Galaxy Tab 7.0 Plus]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[GT-P6200]]></category>
		<category><![CDATA[ICS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[Samsung]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=1033</guid>
		<description><![CDATA[A few weeks ago I started working on a port of CyanogenMod 9 (Android 4.0) for the Galaxy Tab 7 Plus (GT-P6200). It took quite a while to get the device tree up and running, and then when I finally got it to boot, the touch screen was a pain in the ass to use. [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I started working on a port of CyanogenMod 9 (Android 4.0) for the Galaxy Tab 7 Plus (GT-P6200).  It took quite a while to get the device tree up and running, and then when I finally got it to boot, the touch screen was a pain in the ass to use.  As it turns out, Android 4.0 requires updated touch screen drivers, which explains why <em>everyone</em> porting Ice Cream Sandwich using pre-ICS kernel sources has to walk this road.</p>
<p>After a few hours of staring at Linux kernel code, reading documentation, and cross referencing fixes for other touch screen drivers, I finally figured out what to do.  It&#8217;s all in <a href="https://github.com/alanorth/samsung-kernel-p6200/commit/9571ea442a39976a79c471d650b625c8b26a0460" title="melfas_ts: Fix for ICS touchscreen issues">this commit</a>, diff here:</p>
<pre><code>diff --git a/drivers/input/touchscreen/melfas_ts.c b/drivers/input/touchscreen/melfas_ts.c
index 2bb5b95..3b6e9c1 100755
--- a/drivers/input/touchscreen/melfas_ts.c
+++ b/drivers/input/touchscreen/melfas_ts.c
@@ -144,7 +144,8 @@
 	input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x);             \
 	input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y);             \
 	input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, amplitude);         \
-	input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, width); \
+	input_report_abs(ts->input_dev, ABS_MT_PRESSURE, amplitude); \
+	input_report_key(ts->input_dev, BTN_TOUCH, 1); \
 	input_mt_sync(ts->input_dev);                                      \
 } while (0)

@@ -2100,7 +2101,7 @@ static int melfas_ts_probe(struct i2c_client *client, const struct i2c_device_id
 	input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y, 0, TS_MAX_Y_COORD, 0, 0);
 	input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, TS_MAX_Z_TOUCH, 0, 0);
 	input_set_abs_params(ts->input_dev, ABS_MT_TRACKING_ID, 0, MELFAS_MAX_TOUCH - 1, 0, 0);
-	input_set_abs_params(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0, TS_MAX_W_TOUCH, 0, 0);
+	input_set_abs_params(ts->input_dev, ABS_MT_PRESSURE, 0, 255, 0, 0);

 //	__set_bit(EV_SYN, ts->input_dev->evbit);
 //	__set_bit(EV_KEY, ts->input_dev->evbit);</code></pre>
<p>Basically, Ice Cream Sandwich expects <code>ABS_MT_PRESSURE</code> data and <code>BTN_TOUCH</code> events to be sent from the touch screen driver.  Without a properly-patched driver, you have to do funny things to get touch events to work (like using two fingers and mashing icons repeatedly on the screen).  Very annoying!</p>
<p>Now that we&#8217;re back in business&#8230; here&#8217;s a picture to prove that it&#8217;s up:</p>

<a href='http://mjanja.co.ke/2012/03/fixed-melfas-touch-screen-on-android-4-0-ics/p6200_cm9_alpha/' title='Alpha CM9 running on Galaxy Tab 7 Plus'><img width="300" height="175" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/03/p6200_cm9_alpha-300x175.png" class="attachment-medium" alt="Alpha CM9 running on Galaxy Tab 7 Plus" title="Alpha CM9 running on Galaxy Tab 7 Plus" /></a>

<p>Great progress, but still a lot more to do!  btw, technically I got ICS on this device before Samsung <img src='http://mjanja.co.ke/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . w00t.</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/03/fixed-melfas-touch-screen-on-android-4-0-ics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux pro tip: learn to read `top` and `free` correctly</title>
		<link>http://mjanja.co.ke/2012/03/linux-pro-tip-learn-to-read-top-and-free-correctly/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=linux-pro-tip-learn-to-read-top-and-free-correctly</link>
		<comments>http://mjanja.co.ke/2012/03/linux-pro-tip-learn-to-read-top-and-free-correctly/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 19:13:43 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[pro tip]]></category>
		<category><![CDATA[RAM]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://mjanja.co.ke/?p=991</guid>
		<description><![CDATA[People look at tools like free and top to see how much RAM their system is using, but they almost always fail to read the output properly. Learn to interpret this properly so you don&#8217;t freak out whenever you see something like this: At first glance it appears I only have 310 megabytes of RAM [...]]]></description>
			<content:encoded><![CDATA[<p>People look at tools like <code>free</code> and <code>top</code> to see how much RAM their system is using, but they almost always fail to read the output properly.  Learn to interpret this properly so you don&#8217;t freak out whenever you see something like this:</p>

<a href='http://mjanja.co.ke/2012/03/linux-pro-tip-learn-to-read-top-and-free-correctly/free_memory/' title='&lt;code&gt;free -m&lt;/code&gt; before dropping caches'><img width="661" height="92" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/03/free_memory.png" class="attachment-full" alt="free -m before dropping caches" title="free -m before dropping caches" /></a>

<p>At first glance it appears I only have 310 megabytes of RAM free.  <strong>Wrong!</strong>  The devil is in the details:</p>

<a href='http://mjanja.co.ke/2012/03/linux-pro-tip-learn-to-read-top-and-free-correctly/free_memory2/' title='Actual amount of free memory (minus caches)'><img width="662" height="91" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/03/free_memory2.png" class="attachment-full" alt="Actual amount of free memory (minus caches)" title="Actual amount of free memory (minus caches)" /></a>

<p>If you want to know how much RAM your computer <em>really</em> has free, this is a much better indicator; it&#8217;s the amount of RAM which is free if file caches are not counted (notice the &#8220;<em>-/+ buffers/cache</em>&#8221; row heading on the left side).</p>
<h2>Oh noes!!  Where is all my RAM?</h2>
<p>Computers use memory for both running programs (like Firefox, Rhythmbox, <code>ls</code>, <code>cp</code>, etc), as well as for caching recently-used files.  When you unzip <code>linux-3.2.tar.bz2</code>, for example, the file is read into RAM and every single file inside the archive passes through RAM as it is extracted (generally speaking, CPUs can only access data which is in RAM!).  The same goes for when you <a href="http://mjanja.co.ke/2011/11/building-android-4-0-on-ubuntu-11-10/" title="Building Android 4.0 on Ubuntu 11.10">compile Android from source</a>, or when your late-night cron jobs run through the file system cleaning log files and indexing things.</p>
<p>Caches save you boat loads time when accessing files which you&#8217;ve recently accessed.  It&#8217;s by design that the kernel does this, and it&#8217;s a good thing.</p>
<h2>Waaa! I want `top` to show me all my RAM!</h2>
<p>Calm down, br0, it&#8217;s not the end of the world.  If you so desire, you can instruct the kernel to <a href="http://linux-mm.org/Drop_Caches" title="Drop Caches">drop caches immediately</a>:</p>
<p><code>
<pre>root@ndechu:~# echo 3 > /proc/sys/vm/drop_caches</code></pre>
<p>Now you see numbers which are probably more like what you were expecting in the first place:<br />

<a href='http://mjanja.co.ke/2012/03/linux-pro-tip-learn-to-read-top-and-free-correctly/dropped_caches/' title='&lt;code&gt;free -m&lt;/code&gt; after dropping caches'><img width="663" height="90" src="http://mjanja.co.ke/wordpress/wp-content/uploads/2012/03/dropped_caches.png" class="attachment-full" alt="free -m after dropping caches" title="free -m after dropping caches" /></a>
</p>
<p>If you're interested, there are various knobs you can tweak to modify the kernel's memory management, caching, swapping, etc; <code>vfs_cache_pressure</code> and <code>swappiness</code> are two good places to start.  Also, I just stumbled upon this hilarious site which should help quite a bit: <a href="http://www.linuxatemyram.com/" title="Linux Ate My RAM">Help! Linux Ate My RAM!</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mjanja.co.ke/2012/03/linux-pro-tip-learn-to-read-top-and-free-correctly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

