Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates

I wrote this script a few days ago to plot real-time / streaming data with gnuplot. The motivation was that I needed to test a piece of code for a touchscreen driver that I had written at work. The issue was that the UI wasn’t quite ready yet, so I wanted to test just the driver to be working fine. Now, the very first thought for the software to use that came to me was “gnuplot” but I found that it can’t really do this in an easy way. A colleague suggested me to use “replot” command with gnuplot. I whipped out my perl hat and a few hours later, voila!! my very own real time data plotter was ready. Now, I can stream data from any program to this script or provide the data on STDIN and can see the data being plotted continuously. BTW, it was awesome to see all the shapes that I drew on my target board’s  LCD touchscreen to come alive on my PC monitor almost instantaneously.

I call it “rtgnuplotter”. A weird name I know :P , but I just wanted to refer to it as a real time data plotter based on gnuplot. Please check it out at Home Page of RTGNUPlotter.

I’d love to hear from you if you found it useful. Please send in your bug reports and feature requests and I’d be glad if you could spread a word about it amongst your data-loving friends :)

Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates

If you can’t get tail command to continuously monitor a file, then read on. I was working on a script yesterday, a part of which depended on continuous monitoring of a text file. I had used our trusty old “tail” command for this but while testing by manually putting in some data into the file, it was failing but curiously it was working fine when used in actual scenario. Befuddled, I did a simple test. I created a simple text file “a.txt” with a few lines of data and then ran the following command.

tail -f a.txt

It showed the last few lines of the file and kept waiting. So far so good. Then I opened the file in vim editor, wrote a few more lines, saved the file and then waited but nothing in the window that was running the tail command. Thinking that the data might be buffered and not flushed to the disc yet, I ran the sync command but still nothing.


Continue reading Continuous Monitoring With Tail Fails

Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates

This is just to let you know that a few of my friends have started Overclocked, a haven for PC enthusiasts in India. Overclocked is an online store for the people who like to stretch the performance of their machines to the maximum. They store a lot of high end computer stuff that isn’t easy to find in India and that too for a reasonable price. They also assemble mean gaming machines while giving you quite a bang for your buck with gauranteed satisfaction, shipped anywhere in India, and that’s not all, they can personalize it too with a variety of custom modifications (I really like their laser engravings).

Apart from the computer hardware, they also sell a lot of games (Primarily PC but consoles as well, and that too for a cool discount from the MRP, again shipped anywhere in India). They also have a forum where people can hang out and discuss how to eek out that last bit from their PCs.

Do check them out. I’m sure you will like the stuff they have on offer and if you have any comments/suggestions or queries, don’t hesitate to contact them via their contact page or the forums. I’m sure they will be glad to listen to you. I’d say that a word of kudos will be great as these guys are doing this along with their full time professions and such places are hard to find in India :)

Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates

I generally move from LTS to LTS releases of Ubuntu but reluctantly had to update my system to Karmic when my old HDD gave in. I also thought of trying out Kubuntu (KDE based) this time as I had heard that its doing a lot of interesting things (Akonadi/Nepomuk etc) and that with 4.3.1 it is stable as well. The installation went fine, all over within less than half an hour and then the problems started. Here are the 2 main issues that I faced along with their solutions, in the hope that if someone else runs into same issues does not have to waste time (and hair) on it :)

1. Bootloader Issue: I dual boot my system along with Win XP (Needed for some office work) and generally install the bootloader onto a separate boot partition instead of overwriting the MBR. But this time when I did the same, I couldn’t boot (not even the grub menu). When I did this, the very helpful message that I got on restarting after installing kubuntu was “Error loading operating system”. I could still go back to my good windows install by setting the boot flag onto its partition. I mucked around with it a lot, trying to install grub2 again and found that actually it fails when I try to do the above (install on a partition). I also tried copying the boot sector from my /boot partition to C: and use ntldr to boot into linux but that also didn’t work. This lead me to believe that the same thing happened during my main installation and the installer failed to tell me anything about it. I tried then to install it on MBR but that also mucked up things and I couldn’t even get the error message, a cursor just kept blinking. Finally, the solution. I had to install kubuntu again and this time selected to overwrite MBR (this is default, BTW).

2. Wi-Fi Connection Issue: Second immediate issue was with knetworkmanager. It failed to start my wi-fi module (even after installing restricted drivers). I disabled and enabled wi-fi, so that brought some life to it (wi-fi led started glowing) but it still couldn’t scan for any access points. I could do the scan through command line and see my AP but my AP is WPA2 secured and I didn’t want to mess around with wpa-supplicant stuff. Solution: Installed Wicd. And it worked automagically.

Hope this helps someone else who faces the same issue. Looks like my idea of moving to kubuntu wasn’t a good one (especially because I had 2 lockups during the 1 hour I used it for in the wee hours of this morning). I’ll probably give it another week or so before taking the decision whether to move back to ubuntu or not.

One good thing to take away from this though: For the first time I could really appreciate the live CD installer that these linux distros give. As I could search about the various issues I had without having a second computer. But then again, it’s not that good as well because it means that so far I never had any installation issues at all…

I recently got hold of a Guitar Hero controller for my PS3 but the game still had some time to come so I tried it out on my laptop with Frets on Fire (rather FoFix). But when I started it, it was crashing with some weird error about not being able to open mixer devices. [...]

Killzone 2 (KZ2) is one of my most favourite games for the Playstation 3. Killzone 2 is a very different game as compared to the other run-of-the-mill FPS’s out there. Now, I might not be the best player out there but I’ve played my fair share of it. So, I thought of jotting down some [...]

If you are a proud owner of an Asus WL-500W wireless router (or maybe another one of the same series like wl-500g, wl-500gp, etc), then you know that this router has a very useful USB port with which you might have attached your external hard disk and have already offloaded all your downloding tasks to [...]

A few days ago, I had to install Windows XP as a guest OS on my Ubuntu Hardy machine as I needed to carry out some Visual Studio work. What I noticed was that my CPU usage went through the roof (constantly at 100%) even if the guest was completely idle. Result: My laptop was [...]