Archive for October, 2006

WOTD: malaise

malaise
noun
1 : an indefinite feeling of debility or lack of health often indicative of or accompanying the onset of an illness
2 : a vague sense of mental or moral ill-being
Source: m-w.com

Leave a Comment

Check connection to a web server with telnet

If you just want a quick and sure way to check your connection to a web server without using a browser, you can use telnet. Here is how:

telnet host_name port

Then you should see output similar to the following

Trying host_name...

Connected to host_name.

Escape character is '^]'.

Then, you can type the following to retrieve a file in raw ASCII:

GET /index.html HTTP/1.0

For those of you who want to take this further, here is Best Viewed with telnet to port 80 initiative for you.

Leave a Comment

Notes on installing Fedora Core 6 over FTP/HTTP

Since Fedora’s web site was down during this past week, the installation guide was also unavailable. Here are my quick notes on using the network installation option. Why use the network installation option? You only need to download one ISO file instead of two, or all five. Unless you are installing on more than one machine, network install option could be a good option to consider. Here are my notes:

  1. Download the first ISO file from one of the mirrors. Run sha1sum check to make sure you downloaded correctly.
  2. Burn the ISO file to a CD
  3. Boot up the target machien with the CD. At the initial prompt, type “linux askmethod” and press enter. You might want to run through the check media step available with the installer.
  4. When the installer asks you what method you want to install, choose ftp or http depending on which mirror you want to use.
  5. Enter the host name and directory name for the mirror of your choice. For example: “mymirrorserver.com” and “/fedora/core/6/i386/os”
  6. If you get an error that complained about not able to read repomd.xml, you might want to try a different mirror.

During installation, you can press Ctrl-Alt-F3 to see rolling installation log, Ctrl-Alt-F4 to see rolling dmesg log. Ctrl-Alt-F6 to get back to the graphical installer.
Have fun!

Comments (20)

Google Map API Key annoyance

If you tried to get a key for your localhost, you might get the following error when you tried to load the map:

googlemaperror
In order for a key to work on your localhost, you need to register an unique host name. So, go back to the registration page and pick a really unique name. Pick anything you know will be unique. Then edit your /etc/hosts file and add your unique name to localhost. For example:

127.0.0.1    localhost    myrealuniquehostname

Assuming you did everything else correctly, you should be able to see the map display without the pop up error above.

Comments (4)

First Impression: Reverse engineering with NetBeans Enterprise Pack 5.5 beta

I was looking at a blob of code that I don’t know where to start to get a handle on what it does. The code also didn’t come with documentation. So, I turned to NetBeans Enterprise Pack 5.5 beta. The feature that I wanted to try was it’s UML reverse engineering features. I downloaded it, installed it on top of NetBeans 5.5 rc1, and started NetBeans. Then I followed this tutorial to generate UML model from source code. The tutorial has some screen-casts that shows you step-by-step on how to use UML modeling features in NetBeans Enterprise Pack 5.5 beta. Finally, I started to generate some class diagrams. The diagrams certainly helped me to better understand which classes are related to which and helped me to conceptualize the blob of java code that I am trying to understand. I was able to export smaller diagrams to image files. Diagrams with larger number of classes didn’t export successfully. I hope it will be fixed by FCS. All in all, it’s a handy feature to keep in your toolbox. Don’t expect to throw away your whiteboard and dry erase markers, you may find them useful too.

At end of the session, I also used Dia to draw a variation of finite state machine to map out the flow of a piece of code.

Leave a Comment

Timeout on Portal Server when using iFrame portlet?

If your users are getting timeout errors for interacting with a web app through an iFrame portlet on Sun Java System Portal Server, then you got two theoretical workarounds:

1. Increase session timeout to a larger number. This will increase resource footprint (mainly memory) on Portal Server and may cause inefficiencies. So, if you have plenty of RAM and you are not running into performance issues related to memory, you can consider this option.

2. Build a heart-beat or ping-back mechanism. This can be done in two ways.

2.1 One is to build a proxy servlet that run within the Portal Server instance. Instead of having user’s browser interact with the web app that live within the iFrame, have the browser talk to the proxy servlet that forward each request to the actual web app. The amount of extra network traffic will depends on how chatty your web app is. This will also require you to modify your application’s logic.

2.2. Another way is to write a simple html page/portlet containing a JavaScript/AJAX that would periodically ping back to a servlet/portlet running within the Portal Server instance as long as the browser is still running. You don’t need to alter the request/response flow or behavior of the application. You just need to add a hidden JavaScript/AJAX function somewhere within the Portal Desktop. The amount of extra network traffic generated will be constant for each active user. However, this could create an opportunity for another to gain access to an user’s account if she/he left the browser with the portal page open and unattended for an extended amount of time.

Let me know if you have a better idea.

Leave a Comment

Webhosting evaluation BBB style: Bluehost and Dreamhost

I was happy to see that bluehost has improved since my last post and realized that BBB’s report is very handy way to persuade positive changes and benchmark service providers such as web hosting companies. Bluehost went from having 100% unresolved issues (3) to 66% (2) resolved and 1 no response within one month. They even increased their space/traffic offering while keep the same low price. Kudos to folks at bluehost.

Since I was on BBB web site reviewing bluehost’s report, I also did a quick search on Dreamhost. Their report certainly raise concerns. By comparison, bluehost’s report doesn’t look as severe. The bottom line is that both companies respond to complaints, which is a quality that you can observe from their BBB reports.
Based on what I observed so far, both companies will most likly continue to increase their web space/traffic quota over time. Considering that their space/traffic offering are significantly larger than most average users, therefore most people do not need to worry about their space/traffic limits. Even one of my friends, who use his web space to store linux distribution binaries, only using about 15% of his quota. If you think that you might use all 50GB of space or 999GB of traffic in one or two years when your web site becomes so popular, the web hosting company either will increase the quota before you reach quota or you might already getting enough ad revenue from all that traffic to pay for a service upgrade. So, size what you need today rather than next year.

The only limiting factor in such shared hosting could be CPU resources. You probably don’t really have to worry about it until the service provider notifies you.

If you read Dreamhost’s offering, you will see a line that says “Automatically Increase Weekly By:” Some people really buys into such offer. They also allows their customers to generate coupon codes to attract more new customers. These certainly are cleaver marketing and seems generated enough demand that cause their service to suffer, which is also reflected in their BBB reports. I can understand these are only a few bad apples when comparing to the number of customers they service. However, bad publicity can have far more significant impact on their corporate brand/image than good publicity.

If you look from web hosting companies’ point of view, they have to increase their top-line, which is defined by number of subscribers and revenue per subscriber. They also have to manage their bottom-line, by matching their data center/staff capacity to the customer demands. If they have over capacity, then they are not acquiring customers fast enough. This means that they are loosing money on investments. If they have under capacity, then they are not meeting the demand fast enough. This can lead to bad user experiences and bad publicity mentioned above. They have to execute in a balanced way that will promote long-term growth.

One way that web hosting companies can do to meet spikes in customer demand before they build up their capacity is to tap into utility computing resources from third parties. This may require establishment of a business partnership.

From a customer point of view, the hosting provider that can best execute on meeting customer needs will have better competitive advantages. So, keep your eyes on BBB reports or any other similar reporting systems you can find.

Comments (1)

What to do with bad magic number errors?

Bad magic number error indicates the system is mostly likely having trouble accessing VTOC (Volumne Table of Contents) This just indicates that the partition is in a strange state.

What to do when you saw bad magic number errors in Solaris? If you know the alternate superblocks, then you can fsck the partition. If you don’t know the alternate superblocks and created the partition using newfs command, then you can use the “-N” option to print out the superblocks without actually recreate the file system. For example:

newfs -N /dev/rdsk/c0t0d0s0

“format” tool might be able to correctly label the disk with valid VTOC. Relabel your disks essentially repartition the disks and existing data will be lost. A recommended approach is to run analyze feature in format utility. Analyze will try to verify or repair a bad sector on a disk. Please note that bad magic number errors doesn’t always translate to bad sectors. The physical disk might be working perfectly without errors.

Comments (7)

An example on running truss

truss is a command that traces system calls and signals on Solaris. An equivalent tool on Linux is strace. You can also use Dtrace, which can be much lighter weight. If you ever wan to give truss a try, here is an example:

truss -aefltexec,fork,open,close,creat -o /tmp/truss.out my_command

This one-line command will produce a large ASCII file at /tmp/truss.out (-o) that shows the following:

  • The argument strings that are pased in each exec() call (-a)
  • Shows the environment strings passed in each exec() call (-e)
  • Follows all children process created by fork() or vfork() calls (-f)
  • Trace exec, fork, open, close, and create system calls (-t) (Note: Default is -tall. You can also add “!” in front of a system call to exclude tracing it. )

Comments (1)

WOTD: parsimonious

parsimonious
adj.
Exhibiting or marked by parsimony; especially : frugal to the point of stinginess
Source: www.m-w.com

Leave a Comment

Older Posts »