Showing posts with label Computer Science. Show all posts
Showing posts with label Computer Science. Show all posts

Saturday, June 09, 2007

First Successful Kernel Compilation

During the past four years in college made many unsuccessful attempts in compiling the Linux kernel. May be i did not make any serious attempts till now. Anyway at last compiled the Linux kernel successfully today. A server in college was fitted with QLA2312 fibre optic card and the kernel being old did not have the driver. So we started with the job of compiling the latest linux kernel 2.6.21.3 and it helped in finding where i went wrong during the past. I have seen seniors compiling kernel without initrd or initial RAM disk. So i was trying to do the same. initrd is not required as long as the kernel contains support for the hard disk and other devices inbuilt and not as a module. This time we tried with creating initrd, and we were successful. Still the task of compiling the kernel without creating initrd, remains. That would be the next task.

Tuesday, May 22, 2007

Dtracing to kill time

After a nice weekend with much shopping and roaming around main places of pune, i was virtually locked in my sister's home on monday without much to do. If not for the computer i would have found it difficult to kill time. Tested the opensolaris starter's kit and tried a bit of Dtrace. Though i dont know how to write even a single line of Dtrace script, the Dtrace toolkit in Belenix provided me a option. No wonder why there is a lot of rustle about Dtrace. Dtrace is awesome. Found the following script to be interesting. The script finds the total number of system calls made by each process.

dtrace -n 'syscall:::entry { @num[execname] = count(); }'

Found that init was making 61 system calls, fam made 4251, dtrace 7948 and xfce-panel process made 27163 system calls in a span of pproximately five minutes. Thought of installing opensolaris express but since the installer required around 704MB RAM, silently  removed the CD and sealed it for future use. Finally my mind drifted to gaming and started playing super tux in Belenix. Sometime later found Harrypotter and Warcraft games in windoze and from then haven't touched those Solaris DVDs at all. Dtrace is like a drug, it takes you to a different world and it is difficult to stay away from it for a long time.  Dont know when i will be Dtracing again but will surely do.

Sunday, May 13, 2007

Opensolaris starter Kit

Yesterday got a fully sealed pack with US seals and custom verifications etc. It was none other than the Opensolaris starter kit. The kit contained two DVDs, the first one contains several live solaris distributions and the second one the solaris express. All that is fine but while ordering i forgot two things about my system and opensolaris. One is that my system still doesnot have a DVD reader and solaris does not run in 128MB RAM. So sealed the pack again and left it for future use. After Ananth's session on DTrace and ZFS i was eager to test them. But i would be stress testing my system if i try installing or running any distribution of solaris. Waiting for the first month salary to upgrade my system. Till then no other go should continue with the existing system. Grrrrrrrr....

Tuesday, March 27, 2007

LaTex - The mighty typesetter

The documentation work for our final year project came to and today. It turned out to be one of the most boring jobs ever performed. The only interesting part of the documentation process was LaTeX. Exploring LaTeX provided more fun than expected. Should say LaTeX made the job more easier. We started learning LaTeX long time back and were using it for small documents that hardly exceeded ten pages. This is the first time we are using it for full fledged documentation. Still there is a lot to be explored and  found in LaTeX. The next step would be to create my resume using LaTeX.  In btw, i was eager to know the list of bullets available in LaTeX and created this file which contains the list of bullets available in LaTeX.

Monday, February 19, 2007

Something about vista...

Though vista was released few weeks back there is very little noise about it in this part of the state. I am yet to catch a glimpse of the operating system. Not many are talking about vista here and still college has not purchased one i think. Except for the reviews posted by some users in the internet, nothing is known about its performance. Some called vista a memory bloat and it requires around 2 GB of memory for good performance. A post in slashdot claimed vista suffers from serious UAC bugs. Heard that vista has failed to clear some antivirus security certificate the name of which i dont remember, so it may still require a third party antivirus to protect it. Looks like what i have read till now seems to be against the operating system.

M$ is heavily advertising the operating system and the advertisement in tv focusses mainly on the GUI aspects. Looks like the cafe coffee day shop has gone into some sort of agreement with M$. Their menu card is designed with windows logo and looks more like a vista advertisement card than a menu card. You will have to open the windows logo to get the list of items. There is also a new cool drink named after vista. Dont remember the name now but it went on like "windows wow ...." and costs around Rs.50. Cafe coffee day created some noise before by using gnu/linux for their billing system. Now they are doing it with vista.Should wait to see how far these advertisements are effective. After entry into the college windows has not attracted me at all and still it continues to be the same.

Thursday, November 16, 2006

Reading .lit files in GNU/Linux

With the start of holidays thought of starting the long forgotten habit of reading novels and story books again. lit files are confined to the windoze platform and are readable using MSReader. Searched for something in GNU/Linux to read lit files. There is no direct software to read lit files but there is something called convert lit which can be used to convert the lit file into html and opf and can be read on any platform. Convertlit can be downloaded as a single zip file from convertlit.com and is released under GPL. Installation is not a difficult task if u have libtomcrypt installed. libtomcrypt is a library that provides a rich set of integer functions that can be used for many crytpgraphic applications. libtommath can be downloaded from math.libtomcrypt.com. Once that is installed convertlit (clit) can be installed by using the following step.

 1) Download the clit18src.zip file from convertlit.com and unzip it. Unziping it will produce a Readme file and two folders, lib and clit18.

2)  $cd lib

3)  make

4)  $cd ../clit18

5)  Change the Makefile and set the correct path of libtommath.a

6) $ make

That would install the clit in the system. The lit file can be converted using "clit filename.lit dirname/". To know more about the three mode of operations and about the command line options follow the unix tradition of "clit --help".

Saturday, November 04, 2006

Daemon in Python

A daemon to download xml file and to parse it and extract some links from it. That is not something difficult or something new but it happens to be my first script in Python. Programming in python turned out to be really interesting. Amazed to see the availablity of packages in python. I have heard people saying that Python is far more better than java. I dont have enough expertise in both the languages but python looks easy to me when compared to java. Looking forward to do something good in python. So for those who want to create a daemon in python, it is simple. Everything is available in the os package. It is similar to C, a fork and a exit.

try:
pid = os.fork()
except OSError, e:
"""raise exception"""

if (pid == 0):
"""operations"""
else:
os._exit(0)

That is all u need to create a daemon. I used the sched package to schedule the download of rss file repeatedly after some time interval and xml.dom.minidom to parse the file after it is downloaded. All took just some ten lines of code. Python rocks :)