Friday, June 02, 2006

Fixing stuff

How much difficult it is to fix some stuff in life? can you not undo some mistakes. I have come across one of these incidents recently and realized that people can not fix certain things without hurting any one's ego/respect or feelings.

So, I realized that if I made some one do something for my sake, it will certainly won't look good. But if some one is really realizing that mistake has happened then the best way is to understand the mistake. And keep it to yourself. At least its good that some one at least realized the mistake.

But on the other hand - keeping that to your self does not fix the problem. You yourself understand that its okay  to leave the matter as it is. But the way it looks to other you have not done anything about fixing the stuff. So they expect you to fix the stuff and actually its impossible for you to go and talk to everyone on this matter and let them understand that it was mistake and this is why it happened (give each one of them individual explaination!)

So explaining that to everyone is not again a solution.. So what I am wondering is - what is the real solution for this? .... thinking...

Wednesday, February 15, 2006

Webspher Saga

So recently(ummm been two months now), I have been asked to install/configure websphere application server on one of server over here in Bangalore.

Our app is kind of complex, because it talks to many other applications using JMS and dumps data on queues! Rest of it is pretty straight forward.

But - here is what happened

  1. We got Java VM hanging with thread core dump
  2. We got duplicate class error when there was duplicate class
  3. We could talk to MQSeries
  4. We got database problems

Here is what we did - we searched google, it helped alot, but crux of the whole issue is that you can not even think that there can be duplicate class error because of a bug in Websphere - and on top of that, you have to give permissions for queue manager even if you have security turned off.

Basically - we had to patch websphere + java again and again to resolve these issues.

I am frustated!

Tuesday, February 07, 2006

Load - in Linux / Unix

Yesterday I was working on one server. Server was very very slow, and when I looked at Top command I got load average of 0.0, 0.15, 0.27 which was not what I expected. Generally load average should be higher than this. But curiously I looked at man page of Top. But somehow "man page of top" did not give me proper answer to this Load Average number. Surprizingly uptime and w commands also give you same kind of output. So what are these load average numbers? And how kernel or any command computes these number?

I started searching about it and finally came across this article

Which clearly says something like this :

Those three little numbers tucked away innocently in certain UNIX commands are not so trivial after all. The first point is that load in this context refers to run-queue length (i.e., the sum of the number of processes waiting in the run-queue plus the number currently executing). Therefore, the number is absolute (not relative) and thus it can be unbounded; unlike utilization (AKA ``load'' in queueing theory parlence). Moreover, they have to be calculated in the kernel and therefore they must be calculated efficiently. Hence, the use of fixed-point arithmetic and that gives rise to those very strange looking constants in the kernel code.

Tuesday, January 10, 2006

Keep Making Notes

So whats the best way to keep making notes? There is no way you can stick yellow sticky in your brain.

There are few! keep creating files in your home/notes directory and keep putting notes over there or "INSTALL a WIKI in your comp" this is really cool.

So what I did was to install a MediaWiki with LightWeight Tuned Mysql Server on my machine. And now I keep everything in that wiki. Media wiki is good because i can write stupid text with wiki markup and it gives me the properly formatted text.

Its indexed, nice and good!

So now on, I will keep everything I want to make a quick note of in wiki.

its good and usable


Monday, January 09, 2006

FreeBSD is really cool

When I talk about Linux - its just three flavours - Gentoo, Redhat (RHEL or Fedora) or Debian. And sometime I think about Ubuntu too. But there is jungle out there. Linux is really something to play around and work on - day in and day out. And there is no dispute about nice things in Linux.

But as I said there is jungle out there - and I like something in this distro and do not like something in that distro. More over - I was getting really really confused and irritated with the kind of foot print (3 disks, 2 gb or some other crap) these distros comes with. Some of them favour sendmail, some of them favour postfix. Some one will tell you how cool it is to work with Gnome and there is something called KDE too.

More over - for each of the linux flavours, these guys have done something crappy, about changing the file location, even renaming the files and what not.

So I thought - why don't I write my specifications, talk to ten people and see what I want? So I talked to few of my friends, and put my requirements. I got few suggestions, Here is what I feel is the best

  1. Corporate Internal Firewall + Router -> Fedora Core + Iptables + ip2
  2. Corporate External Fireall + Router -> OpenBSD + PF
  3. Corporate External VPN, Site to Site -> OpenBSD + PF + ISAKMPD
  4. Network Monitoring Tools -> Any Linux + MRTG + nMap
  5. IDS - NetBSD(because it can run on very old hardware too) + Snort
  6. Personal Computing Novice user -> Ubuntu + KDE or Gnome
  7. Personal Computer more fun -> FreeBSD

And thats the exact reason I chose FreeBSD, Now I would like to tell you why do I like in this OS?

  • Simple package add and delete
  • Simple ports system
  • Well structured layout
  • Well documented apps and functions
  • Ease of use!

/usr/ports rocks, any things you want just locate the port and start using it. Or just do pkg_add !

That was praise! this is not the only unique feature I liked about FreeBSD. but there is tons of information available, in user readable form! So after must hesitation, I booted my system with FreeBSD, the install is simple but too confusing (as it appears first time) but later on if you read things twice, you are all set to go.

So, after setting it up there are only few things which I faced!

I wanted eclipse (ide), firefox with anti aliasing and eye-candy wm.

For eclipse - I had to download JDKs from Sun's site and put that in /usr/ports/distfiles and everything was cool.

Then for FireFox - to get anti aliasing work you need to do something like this

  • update to gtk+ 2.0 or just rung update and it will update all apps
  • type about:config in firefox
  • filter on font keyword
  • then enable antialiasing, choose Bitstream Vera font instead of helvetica and times new roman. Choose Bitstream Vera Mono instead of Courier
  • And use version instead of 6

Thats all! and you have firefox running with AntiAliasing

Next task was to run Notes 6.5 in FreeBSD with Wine Ver 0.9.5 (In Linux you can use Cross Over Office) but things were too simple over here - I toook 30 minutes to figure out things but rest is as easy as I can be...

  • compile wine "cd /usr/ports/emulators/wine" and then "make install clean"
  • start wine without any parameters, it will do lots of things and will end up showing usage information
  • copy installed notes (you can not install notes in wine) dir and put it inside ~/.wine/drive_c/program files or where ever
  • copy MFC42ENU.DLL mfc42.dll msvcrt.dll netapi.dll
    mfc40.dll mfc42u.dll msvcrt20.dll netapi32.dll
    mfc40u.dll msvcp60.dll msvcrt40.dll usp10.dll from windows\system32 to ~/.wine/drive_c/windows/system
  • start "winecfg"
  • Choose OS Version - Windows XP
  • goto over rides and over ride all the above dlls and change the order to
  • type wine "c:\Program Files\Notes\nlnotes.exe" and your program starts if not then goto .wine/drive_c/program files/notes and then type "wine nlnotes.exe" and it should just work without any problems! it worked for me :-)

Once I got my apps running under WM, the time was to choose eye-candy - for my desktop, and the winner is ENLIGHTENMENT DR17 - you can build it in /usr/ports/x11-wm/enlightenment-devel port.

I compiled and installed enlightenment with Gulivert's Milky theme.

Now the only problem I had was, everything was looking cool, except eclipse and gaim. Both were GTK+ apps and i knew that there has to be some way to apply themes to them outside gnome. Because I was not running gnome and was trying to get same look and feel across apps in enlightenment.

So I used gtk-theme-switch to do required task. And now everything looks nice.

Now I have my FreeBSD desktop with option to remove and add program with pkg_add/pkg_delete or make install/make deinstall. And i do not have to bother about how to compile and clean this whole mess, instead of getting into Linux and trying to figure out dependencies and many more hell!

And as far as comfort is concerned. Really! Enlightenment is nice WM, and takes less memory than GNOME or KDE.

last thing - I use QEMU instead of VMWare to get my Virtual Machines working.

thanks OpenSource!