Wednesday, September 26, 2007

Good and Bad Reasons to Open Source Your Software @ ENTERPRISE OPEN SOURCE MAGAZINE

Good and Bad Reasons to Open Source Your Software @ ENTERPRISE OPEN SOURCE MAGAZINE

Look at this:
Three Worst Reasons
Open sourcing your software isn't always the best business strategy. This section reviews some of the worst reasons you can have to open source a particular technology or create a new open source project:
  1. You have obsolete software that you want to get rid of and you think that open sourcing it is a good way to get rid of it.
  2. You're looking to leverage free engineering from the open source community and by open sourcing you think open source developers will lineup to contribute to your project.
  3. You have software that you don't need anymore and instead of terminating the project or canceling it, you decide to open source it and then call it a win.

In my perspective, most of the companies have this kind of idea when they decided to open source their codes. IBM, Borland, Sun or some one else. And yes, they call it success.
A real funny thing.

SSH tunnel and vnc

Creating an SSH tunnel for secure authentication (Windows)

ssh -N -L 9090:remote-internal-system:80 root@gateway-hostname

and please keep the session on


and vnc to the remote-internal-system:
a. setup vncserver on remote-internal-system
b. vncviewer -via root@gateway-hostname remote-intenal-system
actually this step is the same as ssh tunnel: ssh -f -L 5599:remote-internal-system:5900 root@gateway-hostname

I google a lot, and this is the simplest solution.

create xen VM via xenguest-install.pyi

FC5Zimbra - Xen Wiki

Create And Boot The Initial Xen Guest

The initial Xen guest domain will be named xen0, and will be built on a logical volume. First, run a couple of checks to verify the Xen kernel booted and that xend is running OK.

  • uname -r
    2.6.15-1.2054_FC5xen0
  • xm list
    Name ID Mem(MiB) VCPUs State Time(s)
    Domain-0 0 2487 2 r----- 467.5

Next, remount the install disc, start the vsftpd server, and create a 2 GB logical volume named xen0 (for the first guest).

  • mount -o loop /dev/hda /var/ftp/pub
    service vsftpd start
    lvcreate -L 2G -n xen0 xen

Use the xenguest-install.py tool to create the first Xen guest image. If all goes well, a text-based install script will start. The various options to xenguest-install.py are shown

  • -n xen0 Name Of Xen Guest

  • -f xen0 Pathname To Logical Volume To Use For Guest

  • -r 256 Memory To Allocate For Guest

  • -l ftp://192.168.151.6/pub/ Location Of FC5 Install Disk. The IP address is to the vsftpd server. Since the guest won't know the DNS domain, use the raw IP address. The guest is connecting over a virtual IP network, so 127.0.0.1 won't work either.

    xenguest-install.py -n xen0 -f /dev/xen/xen0 -r 256 -l ftp://192.168.151.6/pub/

The xenguest-install.py script will start a text-based installation script almost identical to what you would see with a default FC5 installation. Early in the installation, the option to switch to a VNC-based GUI will be presented. Text-based is quicker, but VNC does a better job of package selection (and it's kind of cool), so take your pick.

  • To use the VNC method, connect to the provided IP address from a VNC client from elsewhere on the network. A GUI install script will appear in the VNC client window. Proceed through install process, setting parameters as necessary. The script creates a virtual hard disk, /dev/xvda. Unless you have specific needs, you should probably let the install script automatically partition the virtual disk. Do a custom package selection, deselecting everything but Yum and OpenSSH server/client packages. Complete the installation.
  • To use the text-based install process, everything will be functionally the same as the VNC method above, except for deselecting software packages. You won't be able to drill down into package groups, so just deselect everything. This will install a few unnecessary packages and services, which can be removed later if necessary.

After the guest installation script complete, control is returned to the xenguest-install.py script, which will hopefully indicate success and then exit. It is now (way past) time to start the first Xen guest. To start the guest, use the xm command. The xm command is used to manage all Xen clients. For a synopsis of availabe options, simply enter xm.

  • xm create -c xen0

The console window of the guest will appear, including a text-based GRUB screen, followed by normal boot/init messages, concluding with a login screen. To break from the console and return to the host, enter CTRL-] (control key plus the right-bracket key). To list the running Xen guests from the host (Dom0), use the "xm list" command as shown below.

  • xm list
    Name ID Mem(MiB) VCPUs State Time(s)
    Domain-0 0 2487 2 r----- 755.5
    xen0 18 256 1 -b---- 14.4

To return to the Xen guest's console, enter the following command from the host.

  • xm console xen0 


Monday, September 24, 2007

Solving too many open named pipes in a java process

Too many open named pipes in a java process...


Too many open named pipes in a java process..

In a java process (that uses JNI and socket communications), I get "Too
many open files" error.

When debugging further using lsof or pfiles, (with the process id), I
saw many named pipes (FIFO) in open state.

lsof:
jsvc 10805 userid 951w FIFO 0,6 2989015 pipe
jsvc 10805 userid 952w FIFO 0,6 2988104 pipe
jsvc 10805 userid 953w FIFO 0,6 2989588 pipe
jsvc 10805 userid 954w FIFO 0,6 2988290 pipe
jsvc 10805 userid 955w FIFO 0,6 2988626 pipe

there are more than 500 processes opened.

Obviously there might have some streams I didn't close.

And the usage of Runtime.exec() will also cause the pipe here. The inputstream, outstream, errorstream should be closed.

Thursday, September 20, 2007

Interwoven, Inc. - Enterprise Content Management Solutions for Business - CMS

Interwoven, Inc. - Enterprise Content Management Solutions for Business


a professional CMS vendor

Only Ubuntu Linux: Install Popular Applications in Ubuntu Feisty Fawn Using Automatix2

http://onlyubuntu.blogspot.com/2007/04/install-popular-applications-in-ubuntu.html

cool tool for ubuntu

References on Extreme Programming

http://www.math.grin.edu/~walker/talks/extreme-programming/exp-references.html

this is a cool references page for extreme programming.