Friday, March 19, 2010 eating memory

Scenario: Linux Desktop is very slow or lethargic.

Step 1: run top

localhost:~$ top
top - 13:41:13 up 4:24, 3 users, load average: 1.06, 1.61, 1.42
Tasks: 194 total, 4 running, 190 sleeping, 0 stopped, 0 zombie
Cpu(s): 30.6%us, 38.0%sy, 0.0%ni, 31.2%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3985164k total, 3945144k used, 40020k free, 3168k buffers
Swap: 8193140k total, 725012k used, 7468128k free, 220940k cached

1820 root 20 0 191m 28m 5760 R 77.7 0.7 93:39.78 Xorg
9030 anil 20 0 2722m 2.2g 1044 R 35.5 57.3 57:44.48
10521 anil 20 0 1045m 866m 1108 S 19.9 22.3 12:09.73

Step 2: In my case, I see that is eating a lot of memory.

Step 3:
$> ps -f -C

anil 9030 1 41 11:24 ? 00:58:48 /lib/ /opt/Adobe/Reader8/Reader/intellinux/bin/acroread --display :0.0 -progressPipe 3 -exitPipe 4
anil 10521 10501 27 12:58 ? 00:12:51 /lib/ /opt/Adobe/Reader8/Reader/intellinux/bin/acroread --display :0.0 -progressPipe 3 -exitPipe 4

Step 4: So Adobe Acrobat Reader is the problem.
Adobe Blog:

Step 5: Kill the PIDs for the usage

Wednesday, March 17, 2010

To buy a new Apple Mac Book Pro

Q. Should I buy it at the Apple Store or Amazon?

It is better to buy it via Amazon for the following reasons:
* Amazon typically gives $50-150 discount on the MBP at checkout.
* Amazon does not charge taxes which depending on your US state of residence can mean $100-300.

What are the shipping costs from Amazon for Apple Macbook Pro?
* 1 day expedited is around $35
* 2 day expedited is around $20
* A week is free.

What are the downsides of buying it at Amazon?
You cannot get the laptop right when you buy it. You have to wait at least a day, as it has to be shipped to you.

Monday, March 15, 2010

skype crashes on fedora 12

1) Check which skype package is installed.

$> sudo rpm -qa | grep skype

2) Go to skype website and download the rpm for the latest skype

3) Uninstall the old version
$> sudo rpm -e skype-

4) Install the new version
$> sudo rpm -i skype-

After this, skype should be stable.

Sunday, March 14, 2010

Google App Engine Not Enabled In Eclipse

If you installed the Google Plugin for eclipse and you do not get the icons for GAE etc, then it is better to start with a clean resinstall of eclipse.

Step 1: Go to your home directory.

cd ~/.eclipse

Step 2: Delete all the folders here.

Step 3: Now you do not have any plugins etc. Start fresh by updating Galileo ( and then GAE.

Wednesday, March 10, 2010

OpenJDK on Fedora

Now, you are not sure if OpenJDK is installed on fedora or not. So you can try to install it. If it is already installed, nothing.

Step 1: We will try to install OpenJDK6 on fedora

If you are root, then do this:
$> yum install java-1.6.0-openjdk

else, if you have sudo rights, then

home $> sudo yum install java-1.6.0-openjdk

Step 2: Where is OpenJDK installed on fedora?

If you do not know the rpm name, try to do step 1 above to install. That will give you the rpm name.

$> sudo rpm -ql java-1.6.0-openjdk-


Friday, March 05, 2010

Android Development 101

Assume you have Eclipse 3.5 installed.

Step 1: Download the Android SDK. It is usually tgz for linux.
Step 2: Install the Android plugin for eclipse.

Step 3: Open Eclipse and Create a AVD (Android Virtual Device)
To create an AVD with the AVD Manager:

1. Select Window > Android SDK and AVD Manager, or click the Android SDK and AVD Manager icon (a black device) in the Eclipse toolbar.
2. In the Virtual Devices panel, you'll see a list of existing AVDs. Click New to create a new AVD.
3. Fill in the details for the AVD.
Give it a name, a platform target, an SD card image (optional), and a skin (HVGA is default).
4. Click Create AVD.

Step 4: Now create a new Android project. File -> New -> Android - >Android Project. Choose a target.

Testing on your phone :-
Best is to have the Android Development Phone 2 (ADP2).

Then to debug your application from Eclipse onto the phone.
1) Set up your ADP2 or your device to USB connect with your computer.
2) Make your application "debuggable". You need to do this in the android manifest.
3) Eclipe Run -> Run As -> Android Application

Note: To set up ADP2 on Fedora/Ubuntu, do the following:

$> sudo vi /etc/udev/rules.d/51-android.rules.
UBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

$> $ sudo chmod a+r /etc/udev/rules.d/51-android.rules.