Sun Acquired MySQL

For those who have been busy or simply missed the news, MySQL has been acquired by Sun Microsystems (last month). There are many speculations on the effect of this acquisition, some good and some bad.

I just hope Sun will preserve MySQL as an open source project and keeps the dual-licensing option. According to Kaj Arnâ (MySQL VP of Community Relations) nothing bad will come. However Solaris users will definitely have an advantage as “Solaris has a special position in MySQL’s heart”. πŸ˜‰ I never really knew that MySQL was initially developed on Solaris!

The thing I remember the most is that when David Axmark (co-founder) was in Malaysia for Fosscon 2003 he mentioned that MySQL is named after Michael “Monty” Widenius’s (co-founder/CTO) daughter My (pronounced “me”) in 1983.

MySQL certainly have a very bright future, and I am actually happy that David and Monty decided not to sell to Oracle when offered in 2006. MΓƒΒ₯rten Mickos (CEO) said, “We will be part of a larger company, but it will be called MySQL”. MySQL is here to stay.

This is the press release on MySQL acquisition.

Related:

Oracle Buys Sleepycat Software

Checking Limits on OpenVZ / Virtuozzo

Do you use virtual server hosting for your websites? It’s commonly known as VPS. Most hosting companies now uses Virtuozzo, a proprietary operating system virtualization product produced by SWsoft, Inc.

The OpenVZ project is an open source community project supported by SWsoft and is intended to provide access to the code and ultimately for the open source community to test, develop and further the OS virtualization effort.

A couple of months ago when I have not tried OpenVZ, a friend asked me about a problem he is facing with his VPS which is hosting streaming videos and receiving millions of hits per day. He received errors such as:

  • cannot fork
  • Error running script: not enough memory
  • Fork failed

Now that I have deep knowledge in OpenVZ I know what causes the problem. The problem is that his running software and services were using resources more than allocated by the hosting company. If you are using such service, one good way to check is by executing this command:

# cat /proc/user_beancounters

The output would look like this:

   uid  resource           held    maxheld    barrier      limit    failcnt
  101:  kmemsize         473318     927071    2752512    2936012          0
        lockedpages           0          0         32         32          0
        privvmpages        1611      62436       4915       5357         40
        shmpages              1         31       8192       8192          0
        dummy                 0          0          0          0          0
        numproc               9         15         65         65          0
        physpages           887      32985          0 2147483647          0
        vmguarpages           0          0       6144 2147483647          0
        oomguarpages        888      32985       6144 2147483647          0
        numtcpsock            0          4         80         80          0
        numflock              1          3        100        110          0
        numpty                1          1         16         16          0
        numsiginfo            0          3        256        256          0
        tcpsndbuf             0       7856     319488     524288          0
        tcprcvbuf             0      95460     319488     524288          0
        othersockbuf       6660       8880     132096     336896          0
        dgramrcvbuf           0       8364     132096     132096          0
        numothersock          5          8         80         80          0
        dcachesize            0          0    1048576    1097728          0
        numfile             168        399       2048       2048          0
        dummy                 0          0          0          0          0
        dummy                 0          0          0          0          0
        dummy                 0          0          0          0          0
        numiptent            10         10        128        128          0

These info are important because it is most likely that you can’t see what configurations your VPS is running with.

Simple meanings of the columns:

  • resource – name of the resource
  • held – current usage
  • maxheld – max ever used
  • barrier – soft limit of the resource
  • limit – hard limit where the VPS will never use more
  • failcnt – fail count

The most important thing to see is the failcnt column, where in an ideal situation you should see only zeros. In this case, you see that privvmpages have failed 40 times because I on purposely lowered the memory allocated for the VPS and run some programs.

You will never be able to change the resource allocation from within the VPS but at least you know what your problem is and is a good point of discussion with the hosting company.

And oh yes, the values are in 4k blocks which means that if the setting is 4915 the actual value is 19660k (4915 * 4k). Of course this is only applicable for some, and not for countable values such as numpty.

Good luck!

Pidgin 2.1.1 Released

The official Pidgin 2.1.1 has been released, and the official Pidgin Portable 2.1.0 Released.

So since John T. Haller of PortableApps has packaged this, I will stop packaging Pidgin Portable for the public. This is the end of My Version of Pidgin Portable. Hope all who have used it found it useful. I guess the guy who have always accused me of embedding keyloggers will be extremely happy now. LOL.

Nikon Capture NX on Linux

I am feeling a little bit slow today, because my notebook is slow. LOL. I think this relates directly to the fact that everyday at work I am using a new Lenovo T60 notebook which is much faster than my 2 years old personal notebook. I used to dual-boot the notebook with Debian where the speed is acceptable but since I acquired a DSLR it is a hassle to switch OS. And I am not supposed to install non-approved software on the company computers.

My main issue not to run 100% Linux is that most of the graphics editor will not run properly, and most of the time fail to run on Wine. One of the software I use a lot is Adobe Photoshop. A couple of month ago I tried running CS2 on Wine and it didn’t work. I gave up on that. Recently, CS3 was released but I didn’t bother to try at all to avoid any disappointment.

Nikon Capture NX

Since I take all of my photos as RAW, or to be more precise in NEF (Nikon Electronic Format) I need either Photoshop or Nikon software to process the pictures I took. I’ve tried using dcraw and other open sourced RAW programs but the results just ain’t the same. Too bad. Or perhaps I am the one being not an expert in using those tools because some people do get better output. Quote from dcraw: “when used skillfully, produces better quality output than the tools provided by the camera vendor“.

Anyone have ever tried running CS3 or Nikon Capture on Linux (and succeeded)?

Google Desktop for Linux

Hooray! Google Desktop has finally reached Linux users. It is the first release, and contains a subset of features from the Windows version.

Obviously no source is provided, but two package types is ready to be downloaded – .rpm for Red Hat/Fedora/Suse/Mandriva x86, and .deb for Debian/Ubuntu x86

No 64 bit version yet, though.

However I do think that it is useful if Google provide a binary archive (.tgz or .tar.gz or .tar.bz2) for those who like to extract the software instead of installing them.

After installation, Google desktop lives in /opt/google/desktop and user data is all stored in ~/.google/desktop. It requires / utilizes GTK engine for rendering.

One interesting thing I just found is that Google also have its own Linux repository for users of these distributions:

  • APT (Debian, Ubuntu, etc.)
  • YUM (Fedora)
  • urpmi (Mandriva)
  • YaST2 (SUSE)
  • RPM (Red Hat)

Click here for instructions. Now you can use your favorite packaging tools to retrieve Google Linux software.

Cool eh?

Clipperz: Online Password Manager

In my previous post about passwords, I wrote about why you should not use shared passwords. One thing after another, in the comments section password storage became a topic and I suggested KeePass and at all cost avoid online password managers. I had a reason in mind, and you have guessed it right – security.

While it is possible to have a secure online password manager, it is not possible to see any source code for such system if it is implemented using server-side programming (processing done on server, e.g. PHP). Why see the source code? Well, that is the base of all security system – so that people who knows how to read the source code to figure out what a particular piece of software does, and if it is really secure and contains no malicious code.

As a matter of fact, someone just told me that I should include the source code of the Portable Pidgin I packaged so that he can be sure that I didn’t put anything malicious in there. I did, and the source has always been there since the very beginning.

Back to online password storage, one of the guys at Clipperz contacted me and asked me to look closely at the system and to analyze the source code of the JavaScript. And I did just that. I am not going into detail on what features Clipperz have, as you can always read it on their site. I am going to focus on the security side, while trying to stay as not technical as possible.

Please click on Continue Reading if you are interested to read the rest of the article.

Continue reading Clipperz: Online Password Manager

Pidgin 2.0.1 Released

Have you heard? Pidgin 2.0.1 has just been released two hours ago (as of the time of writing – 25 May 2007 20:10 GMT). This release fixed various bugs, where 112 tickets were closed. Go here to see the Milestone page and here to download Pidgin.

However my most waited enhancement is not in this release. Maybe some day.

I shall be building and testing my version of Pidgin Portable soon.

I have updated my version of Pidgin Portable to use Pidgin 2.0.1 πŸ™‚

My Version of Pidgin Portable

Latest Update click here.
I am a curious programmer, and was all the way wondering on how apps on PortableApps were made. Since Pidgin, the replacement for Gaim was released I was waiting for a while for Portable Apps but I guess they must be busy with the number off apps they have to handle.

So I went and analyze the Gaim Portable sources, read some info on Pidgin official site, downloaded NSIS and I managed to make it work! I was planning just to use it personally but as always I feel like sharing it.

You can download it here:

PidginPortable.zip md5sum: f4ea8c532f43166b7ef61ee915c1218e

Pidgin Portable in the Launcher

And if you want spell checking support, extract this to PidginPortable\App\aspell

aspell.zip md5sum: 19a0d7cf3a384e17b642825220121462

They are zip archives since I have not learned about the install files from Portable Apps yet.

The Pidgin files were copied from my local installation, by guidance from the Pidgin FAQ: Running Windows Pidgin From a USB Drive.

The installed size is around 8.48MB. Like Gaim Portable, I’ve utilized UPX to compress the EXE and DLL files.

Modifications were done mainly to the NSIS script, to use new Pidgin variables and names. Many references to the original site http://PortableApps.com/GaimPortable were not changed, even in the quick splash image I made. In addition I just added my name in the source and version πŸ™‚

There maybe some problems that I have not encountered, so you might want to use the official release from Portable Apps once it is released. They are the experts.

10 May 2007: Updated with GTK Theme Selector:

PidginPortable.zip md5sum: dabbfc11b03512e01d79fda935be8bb1 Updated below

Pidgin Portable and Theme Selector

*The GTK Theme Selector will override the settings by the Pidgin GTK Theme Control if used. If you don’t need the selector, simply delete the executable and it will disappear from the menu. The overwriting problem exists as I have to ask the Theme Selector to copy its settings written in settings/.purple/.gtkrc-2.0 to what Pidgin looks for: settings/.purple/gtkrc-2.0 (notice the dot before the filename).

I still can’t figure out how to enable aspell support so as you can see I have disabled the aspell download.

Continue reading My Version of Pidgin Portable

Imation Disk Manager II

A funny story. I just bought myself a 4GB flash drive to substitute my old 128MB Imation flash drive. So I was trying to format the Imation drive when I found a big loophole to the software.

The Imation flash drive comes with a firmware that automatically creates an executable to run the Imation Disk Manager II software. You can make the whole disk public, separate the disk to 2 partitions (public & secured), and the whole disk secured.

imation1.jpg

For the secure partition you’ll need to run the software and enter a password if you want to access the files in it. I am not in the hacking business so I have no idea how secure it actually is. But this is another story, not about the secure partition.

After I have copied the files to the new location, I simply execute the software and it let me reformat the entire disk without asking for a password. Easy, but dangerous. If the drive falls into the hands of somebody clueless (say your 4 year old brother) or someone with bad intentions, you can say goodbye to your data πŸ˜‰

imation2.jpg

I was actually looking for looking for the Imation Swivel Pro flash drive but no shop in Low Yat have the 4GB version. They only have the 2GB version. I surely don’t think that the Imation Clip Flash Drive is available over there!

In the end I got myself a Sandisk Cruzer Micro 4GB drive which is a U3 compatible drive. Now I have Portable Apps and U3 in one drive πŸ™‚

Portable Application – A Reality

Not everything that you dream of can become reality. But one of my oldest dream has come true. I really wanted that my frequently used applications can be brought along anywhere I need them, and be used in any computer I want to.

I found PortableApps. It can be used as a suite, and can be used individually. And the software list is great, comprising of most important software you’ll ever need. Well, almost. Obviously huge software such as graphic design software is not in the list (yet).

Coupled with my Maxtor OneTouch III Mini, it’s going to be a portable powerhouse. Here’s a screenshot of PortableApps running from my 128MB USB thumb drive.

PortableApps

JavaScripts getElementsByName – IE Vs Firefox

A little coding story. I spent quite some time to figure out what’s wrong with my code. Consider the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html>
	<head>
	<script type="text/javascript">
	function getElements()
	{
		var x=document.getElementsByName("myInput");
		alert("First Element value is: " + x[0].value);
	}
	</script>
	</head>
 
	<body>
		<div id="myInput"></div>
		<input name="myInput" type="text" size="20" value="1" /><br />
		<input name="myInput" type="text" size="20" value="2" /><br />
		<input name="myInput" type="text" size="20" value="3" /><br />
 
		<input type="button" onclick="getElements()" value="How many elements named 'myInput'?" />
	</body>
</html>


Firefox will correctly alert you with “First Element value is: 1
IE in the other hand will alert you with “First Element value is: undefined

Why is that so? Because there exists a div with the same id myInput. In this case the JavaScript clearly uses getElementsByName. Can’t IE differentiate between Id and name?

Working With Dynamic Select Inside an Ajax Container

I spent like half an hour on this, got tired, went out to The Curve Damansara, and tonight when I came back, tried a simple trick and it all worked.

I had a code similar to this (shortened for understanding):

1
2
3
4
5
<select id="distDst">
	<option value="1">Name of the option</option>
</select>
 
<input type="button" value="getSelected" onClick="getData()"/>

The JavaScript:

1
2
3
4
5
6
7
8
9
10
11
12
<script type="text/javascript">
< ![CDATA[
 
function getData()
{
	distDst = document.getElementById('distDst');
	if(distDst.selectedIndex == -1) { alert('Please select an option.'); return; }
	else alert('Selected value: ' + distDst.options[distDst.selectedIndex].value);
}
 
// ]]>
</script>

All three browsers: IE 6, Firefox 2.0, and Opera 9.02 gave me an undefined value for the selected element (focused, of course).

When I came back, I added name="distDst" to line 01 of the first part, so Firefox and Opera agreed while IE is still stubborn. Next I enclosed the select object within form tags and IE yielded and gave me the results I want.

I don’t understand about IE’s problem, but why does Firefox and Opera requires the name= attribute to be added when I used getElementById not getElementByName? Still a mystery to me. If you put those code inside a single HTML file it would work. In my case those two would end up on the same page but the JavaScript would load first inside a container, and the HTML loads within another container. They are nested.

Well hope this helps anyone trying to implement select objects with JavaScripts inside AJAX containers.

Sorry for the technicality. I am now implementing AJAX front-ends for my PHP codes, after I got bored with conventional PHP programming.

I forgot to mention: The problem only occurs when the dynamic select object have 1 item in the list.

Where Did My Disk Space Go?

Although I am a Linux user, I do enjoy from time to time strolling around Windows. Especially since my Windows XP price was included with my notebook πŸ˜‰

For the last few weeks I have been puzzled why my free space on drive C: keep decreasing eventhough I have not installed anything. Yeah I know, temp files, cache, etc. are in drive C: but the decrease was big!

After ransacking my notebook for a while, I finally found the culprit. It’s Google Desktop data!!! Anyway it’s OK I still love it, just that I have to free up some space. Google Desktop is a great utility for you to find stuff hidden away inside your computer. Oh well. Prove? Here you are:

googledesktop.png 

As fragmentation is becoming worst and worst, I later tried to format a partition, (actually I was saving up this partition for Solaris 10, just didn’t have the time to install it) and I was so lazy that I decided to use Windows’ Disk Manager. The next day back from work I was planning to uninstall and install software to the newly formatted partition but… my Linux partitions were all corrupted (and grub wouldn’t boot)! At that moment I immediately regretted my decision of using Window’s Disk Manager. Oh anyway lucky that my /home partition is still safe, and a knoppix CD lying around.

I booted up knoppix and used qtparted to reformat the corrupted drive. All is safe. However this has brought into attention this matters, which I have discussed in my previous posts here: Debian unstable immediately install Xorg so no need to manually update packages to make use of dri anymore! Cool.

So now I have my notebook all healthy again. As for Google Desktop, it’s still there, serving me when I am using my Windows XP πŸ˜€