Ahoy there! This is my blog in which I jot down some of my experiences in IT (stuff related to my job and other random IT stuff). Hope you find something useful. My primary fields of interest in IT are Korn/Bash Shell Scripting, web/middleware/database technologies (ZXTM, Apache, WebLogic Server, Oracle, etc.), IT Operations Management, ITIL and UNIX (any flavour/distribution).

Software Archives

Disposable email – Use and forget

Have you provided your personal email account when registering on websites using email confirmation? Have you hesitated to provide comments on blogs, forums, etc. because of fear of having to provide your personal email address? Of course, you always have the option of registering a free email account just for this purpose, but this means you have yet another username/password pair to remember or require some time to create a fictional identity. Instead, how about using a temporary email address that requires no registration? That’s exactly what 10 Minute Mail offers!! It provides you with a temporary email address that is valid for 10 minutes (more than enough time to respond to email registrations). Beat the spam caused by various online registrations!

Well, I’ve now found that Disposable Email Addressing (DEA) has been around for some time and there are several DEA services on the web. Refer this blog post for 20 such disposable email services (Mailinator, MyTrashMail, etc.). Website admins are nowadays blocking registrations with temporary email addresses. Well, you can always try!

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

First and foremost, if feasible, please consider a Hotspot JVM upgrade. The 1.4.2 JVM is outdated and there have been several significant improvements to GC ergonomics in later Hotspot JVMs. The JDK 1.4.2 Standard edition reached its EOL in late 2008. However, you can purchase support for later updates of JDK 1.4.2 (later than 1.4.2_19) that are branded under Java For Business (JFB) v1.4.2, to receive security updates and critical fixes until 2013. With regards to CMS, Sun engineers were finding their feet with CMS in JVM 1.4.2, enhanced CMS and made it the default collector in JVMs 5 and 6 and are about to replace CMS with G1 (Generation First) in JVM 7.

For those of you still using the Concurrent Mark Sweep (CMS) garbage collector with Hotspot JVM 1.4.2, here’s some information which I hope you will find useful.

What is CMS garbage collector?

The Concurrent (actually mostly concurrent) Mark Sweep (CMS) garbage collector is a non-default old (tenured) generation garbage collector introduced in JVM 1.4 that manages a JVM’s heap by collecting garbage in the old (tenured) generation in a few phases, some of which are concurrent and the others which are stop-the-world. As a consequence of the concurrent phases, this collector minimizes GC pauses and hence is also referred to as the low pause collector.

When would you use the CMS Collector?

When you want to minimize GC pauses (frequent requirement for websites and interactive applications)

Does CMS require more cpu and memory than the default collectors?

Yes. You need adequate CPU resources (multiple processors) as CMS adds CPU overhead by using a background thread for the concurrent phases. You need adequate memory to allocate slightly larger heaps than you would for the default collectors, as objects will continue to enter the old generation during the mostly concurrent phases.

How do you enable the CMS Collector?

Use the JVM flag -XX:+UseConcMarkSweepGC. When you do this, -XX:+UseParNewGC is implicitly used. However, you may explicitly specify -XX:+UseParNewGC if you wish (but it’s just redundant).

Note: You cannot use the default collector or the parallel scavenge collector (-XX:+UseParallelGC) in the Young Generation when using CMS in the old generation. CMS is tightly coupled with ParNewGC in the young generation. ParNewGC is an enhanced version of the parallel scavenge collector that enables GC to be done in the young generation while CMS is in progress in the old generation.

 Does the CMS Collector require tuning?

You’re lucky if the CMS collector gives you optimal performance by just enabling it with -XX:+UseConcMarkSweepGC. Every Hotspot 1.4.2 JVM I’ve come across (enterprise systems), has required some CMS tuning for optimal performance. Of course, this requirement entirely depends on your application’s object profile. But, if tuning your Hotspot 1.4.2 is required, then tuning CMS requires more effort than tuning the default collectors and CMS has a bunch of JVM flags to play around with. Some important JVM flags to consider when tuning CMS are given below:

What do you need to watch out for when using CMS (problems/gotchas)?

  • The dreaded concurrent mode failure – a failure which occurs when CMS’ concurrent GC phases are interrupted for certain reasons and a Serial, Mark-Sweep-Compact GC is required.
  • Default SurvivorRatio=1024 and Default MaxTenuringThreshold=0. Note that these are default values only when using CMS with JVM 1.4.2 and can trouble you if you’re tuning your JVM for short-lived objects. If your application creates mostly short-lived objects and you wish to use the Young Generation as a filter to retain these objects as long as possible and clean them up with minor GCs (parallel scavenges) to reduce the pressure on the CMS collector, then you must change these default values as these default values ensure that the survivor spaces are not used. Refer this article to understand the peculiarities of MaxTenuringThreshold.
  • The value set by –XX:CMSInitiatingOccupancyFraction is used as same threshold for both old and permanent generation occupancies. i.e. CMS GC will be initiated in the old and permanent generations when either one of or both the old and permanent generation occupancy exceeds the value of CMSInitiatingOccupancyFraction. This is inconvenient and it implies that you must pay close attention to permanent generation occupancy also and size the permanent generation appropriately.
  • The -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled JVM flags could increase remark pauses, but can contain permanent generation growth (prevent OutOfMemory errors caused by a full permanent generation) and protect against poor GC in old generation (objects in the old generation that are referenced by classes in the permanent generation will not be collected until the classes in the permanent generation are collected).

What tools are available to assist you with JVM tuning?

First and foremost, before tuning your 1.4.2 JVM, ensure you profile your application and resolve application issues (e.g. memory leak). To tune your JVM, you have tools which broadly fall under two categories:

Runtime Monitoring: These tools attach to your JVM to provide loads of runtime data. These tools are useful, when you’re monitoring your JVM in runtime and using these tools interactively. An excellent tool is VisualVM and its VisualGC plugin. A screenshot of the VisualGC plugin is given below:

VisualVM_VisualGC

GC Log File Analysis: These tools enable you to do offline analysis of GC log files and prepare reports for trend analysis. If you wish to run a load test for a couple of hours and measure performance after the test, then you will need to capture GC logfiles and analyze them with such tools. Now, in this area, Sun has been lacking good tools. HP chose a wise strategy of defining a specific format for GC logfiles generated by HP JDKs and developing the excellent HPjmeter to parse the logfiles and create fancy charts along with several metrics. Well, the Sun forums indicate that a GCHisto plugin is being developed to analyze Hotspot GC log files. I have tried out this plugin (beta) and found it to be nowhere as comprehensive and sophisticated as HPjmeter. Well, will wait for GCHisto to be completed and plugged into VisualVM before trying it out again.

In order to assist my colleagues and me with Hotspot JVM 1.4.2 GC log file analysis when using CMS, I’ve developed a quick-and-dirty korn shell script to provide a summary of some key GC metrics for a specific GC logfile. You may download the script CMSGCStats.ksh and execute it without arguments (ksh CMSGCStats.ksh) for usage tips. Refer a sample screenshot of the script’s output below:

 

CMSGCStats

References:

(1) JVM 1.4.2 Garbage Collectors

 

COLLECTOR GENERATION JVM FLAGS TO TURN ON DESCRIPTION
Serial Young None. Default. Single-threaded, stop-the-world, copying collector
Parallel Scavenge Young -XX:+UseParallelGC Multi-threaded, stop-the-world, copying collector (not to be used with CMS)
ParNew Young -XX:+UseParNewGC

Multi-threaded, stop-the-world, copying collector to be used along with CMS. This option is automatically turned on when using CMS and doesn’t have to be explicitly specified.

Serial Old Old None. Default.

Single-threaded, stop-the-world, mark-sweep-compact collector

CMS Old -XX:+UseConcMarkSweepGC

Mostly concurrent low-pause collector that uses a background thread for the concurrent phases.

VN:F [1.6.5_908]
Rating: 0 (from 0 votes)

sconn : Socket Connectivity Monitoring

Today, most enterprise systems are complex, requiring several systems to implement services, thereby creating several system interfaces. A basic monitoring requirement is to check if the system stack is broken. i.e. whether system interfaces are broken. Although almost all software products have some sort of "health monitor" to test connectivity with an interfacing system, it can be handy to have a standard utility to test all interfaces. Well, there is the wonderful "netcat" utility which can easily meet this requirement. Unfortunately, netcat is not standard on all UNIX systems (e.g. Solaris) and you may have constraints (e.g. company policy) which prevent you from installing netcat.

sconn is a simple korn shell script which helps you monitor socket connectivity for system interfaces. It’s basically a wrapper around a perl script which tests the connectivity. A simple script in perl alone would have sufficed, but as I’m not familiar with perl, I used the korn shell to meet my requirements. More people will be familiar with shell scripting than with perl and so if others have similar requirements, sconn could be used as-is or tweaked.

How sconn works:

sconn.png

 

Screenshots:

(1) Configuration

Configuring sconn

(2) Execution

Executing sconn 

(3) Output

sconn output files

Recommendations:

  • Execute sconn regularly as a cron job for continual monitoring.
  • Feed sconn data and/or statusnow files to a dashboard or graphing program.

 

Version 1: Last updated – 22:56 GMT, 24th November 2009

Download sconn v1.0

 

NOTE:

(1) sconn has been scanned and is safe to download.

(2) sconn has been tested. If you wish to use sconn, I recommend you also test it before deploying it on a Production system.

(3) Your rating of this post/software will be greatly appreciated. Also, feel free to leave comments.

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

Shmon : Basic Solaris Host Monitoring

Shmon is a bash script (which uses a teeny weeny bit of perl) that monitors a Solaris (versions 8,9 and 10) host. When executed as a cron job, Shmon provides basic, but vital monitoring of key system parameters.

 

How Shmon works:

 Shmon.png

 

Version 1: Last updated – 6:44 PM GMT, 2nd December 2009

Download Shmon v1.0 Download Shmon v1.0 User Guide

 

NOTE:

(1) Shmon is a basic bespoke software developed to meet my specific requirements.

(2) Shmon has been scanned and is safe to download.

(3) Shmon has been tested. If you wish to use Shmon, I recommend you also test it before deploying it on a Production system.

(4) Your rating of this post/software will be greatly appreciated. Also, feel free to leave comments.

VN:F [1.6.5_908]
Rating: 0 (from 0 votes)

If you’re familiar with the UNIX touch command to modify the access and modification times of a file or directory and are looking for an easy equivalent on Windows, you can use Stefan Küng’s SKTimeStamp. Stefan Küng is the lead developer of TortoiseSVN

Check out some screenshots of SKTimeStamp below:

Installation (note the Tortoise watermark)

SKTimeStampSetup

Timestamps on file before modification (note the TimeStamps tab)

SKTimeStamp adds a TimeStamps tab

 

Timestamps on file after modification

SKTimeStampAfterTime

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

Virtualization with Sun VirtualBox

With virtualization so popular, gone are the days when you would need to partition your hard drive and configure dual-boot to give you the option of running more than one OS on your computer.

Sun VirtualBox is a free, open source x86 virtualization software which allows you to create virtual machines (VMs) on your computer’s Operating System (host OS) and run other Operating Systems (guest OS) within the VMs. Sun VirtualBox is easy and intuitive to use and will enable you to quickly test an OS. Well, many OSes nowadays come with LIVE CDs/DVDs to enable you have a test run, but running these OSes in a virtualization software like Sun VirtualBox works better and faster.

Given below is a screenshot of my Sun VirtualBox console. As you can see, I use Sun VirtualBox to run three 64-bit guest OSes (Fedora 11, Solaris 10, Ubuntu 9.04). I have run 2 guest OSes simultaneously, each with 1 GB of allocated memory, without any issues (on my 4 GB Dell Studio XPS 16 laptop).

sun_virtualbox

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

Scanning jars with JarScan

JarScan is a handy utility (available as a client and online tool) which can help locate a java class or package within jars and zip files (libraries). This is especially useful when debugging java.lang.ClassNotFoundException and java.lang.NoClassDefFoundError exceptions.

For more details about JarScan (developed by Geoff Yaworski), click here. In case Geoff’s JarScan-hosting website (inetfeedback.com) isn’t available, you may download JarScan version 2.1 from here.

A screenshot of JarScan usage is given below:

jarscan_help

Refer this example which shows how JarScan was used to find the location of the MulticastTest class.

A while ago, when I had a requirement to locate a Java class file, I simply used jar –tvf and grep. Although that worked, I would henceforth prefer to use JarScan, as it provides a good output, it is fast and it is platform independent.

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

WLhc : WebLogic CLI-based monitoring

WebLogic health checker is a basic CLI monitoring software that provides a quick and easy option to check the health of a WebLogic domain. It’s just a bunch of korn shell scripts which I developed, to wrap around the popular wlshell.

 

Download WLhc v1.2      Download WLhc v1.2 User Guide         

Earlier Versions:

Download WLhc v1.1      Download WLhc v1.1 User Guide         

 

Salient Features:

  • Monitors WebLogic Server versions 7.0, 8.1, 9.x and 10.x
  • Interactive and non-interactive modes of execution
  • Unintrusive, external monitoring: No application is required to be deployed on the WebLogic Server being monitored and no server restart required.
  • Interactive execution provides a well-formatted dashboard of current runtime values of monitored parameters
  • Non-interactive execution (e.g. cron) generates data files in csv format, thereby allowing graphing programs to generate graphs from the data. The data files are retained for 30 days by default and can be used for troubleshooting and trend analysis.
  • Quick and easy Re-configuration: An auxiliary script controlled by a template, facilitates rebuilding the configuration file for a monitored server. This script will come in handy when changes are made to a WebLogic Server and/or when you wish to monitor new parameters.
  • Auxiliary scripts obtain data on all runtime MBeans and their attributes for a specified WebLogic Server.
  • Traps can be easily configured using simple rules in configuration files
  • Traps may be enabled/disabled globally for one or more WebLogic Servers or for individual parameters
  • Clear and structured logging for alarms and errors, thereby facilitating the use of log scanners

 

System Requirements:

  • Korn Shell (/bin/ksh)
  • Perl
  • nawk/gawk or equivalent
  • /usr/ucb/ps (Solaris) or ps (Linux)

 

Screenshots:

(1) Installation

WLhc_v1.1_installation.png

 

(2) Interactive Execution

WLhc_v1.1_interactive.png

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

DVD Flick – Burn your videos onto DVDs

DVD Flick is an easy-to-use free DVD Authoring software that can burn videos in several formats onto a DVD for playback on your hardware and software DVD players.

I used DVD Flick to create a DVD video of some of my favourite music videos (mp4 and flv formats). My first attempt failed because the audio and video were out of sync when I played the DVD video using Windows Media Player or VLC Media Player. I presumed this sync problem occurred because the video files I burned onto the DVD were being read from a USB 2.0 memory stick. So, when I moved these video files to my HDD and burned them onto a DVD using DVD Flick, the DVD video played just fine in the software media players without any sync issues. When I played the burned DVD video on my DVD player, the sync problems returned to haunt me. However, until I test my DVD video with another DVD player, I will assume this issue is caused by my cheap DVD player (an Alba player which I bought for £20 a half a dozen years ago).

Overall, DVD Flick is very simple to use and makes DVD authoring a very straightforward task. It took 1.5 hours to burn 4.3 GB of music videos onto a 4.7 GB DVD at a speed of 4x (~5.28 MB/s).

VN:F [1.6.5_908]
Rating: 0 (from 0 votes)

Orbit Downloader – Web 2.0 download manager

Orbit Downloader is a free download manager software aimed at managing streaming media downloads from social networking websites such as MySpace, YouTube, etc. In fact, you can use it as a download manager for downloading any resource from the web.

I use Orbit downloader to download YouTube videos and it works like a charm!

VN:F [1.6.5_908]
Rating: 0 (from 0 votes)

Favicon.cc – Online favicon creation

A favicon is a 16 X 16 pixel square icon that serves as an identifier for your website (browser window, browser tab, bookmarks). So, it is important to create and install a suitable favicon for your website.

While searching for free software that helps you create favicons, I found that there were quite a few to choose from, but finally, I decided to use the free, online favicon generator at favicon.cc. This online tool is more than enough to create good basic favicons.

The features of favicon.cc which impress me are:

  • Free and web-based. No client to download and install.
  • Very simple and intuitive to use.
  • You can preview the created favicon before downloading it.
  • You can create animated favicons.
  • If registered, you can save your favicon online and even publish it under an open Creative Commons license.
  • You get useful tips on how to use the favicon within your HTML.

I used favicon.cc to create the favicon for this blog as well as an animated TrafficLight favicon published under the Creative Commons license.

Note: Different browsers handle favicons differently and website developers will be all too familiar with the frustration caused by browser compatability. For example, as of today, Microsoft IE does not support animated favicons.

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

WLjvm will display details comprising the JVM version and options for a specified WebLogic Server. The displayed details are well-formatted and easy to read. The only parameter that needs to be passed to WLjvm is the name of the WebLogic Server whose JVM details you wish to obtain.

Why WLjvm?: At times, it’s required to know a few details about the WebLogic Server JVMs, like their versions and startup options. Well, you could use "ps" on Linux or "/usr/ucb/ps" or "pargs" on Solaris to give you this information. However, these UNIX utilities display information in a format which isn’t too pleasing to the eye (although "pargs" displays well-formatted details, you still need to use "ps" to determine the PID to use "pargs"). My intention is not to make WLjvm an overkill or make people lazy. It’s just that I observed many folks wanting to access JVM details quite regularly and so used a very simple script (and an alias to call it) to automate this task.

System Requirements:  Solaris/Linux, Korn Shell (/bin/ksh), WebLogic Server (all versions to date)

Download WLjvm v1.0     Download WLjvm v1.0 ReadMe

VN:F [1.6.5_908]
Rating: 0 (from 0 votes)

WLfdmon is a simple korn shell script that will enable you monitor open file descriptors used by WebLogic Servers. The salient features of WLfdmon are given below:

  • Can be run in interactive and non-interactive modes
  • Configuration-driven
  • Generates statistics on open fd usage of WebLogic Servers. These Statistics can be used for trend analysis.
  • Logs alarms when open fd threshold is breached. Alarms can notify Support Staff of abnormal application/server behaviour.
  • Logs lsof output when open fd threshold is breached. This output will be useful for root cause analysis of excessive open fd usage.
  • Housekeeping for data and lsof output files

 

System Requirements:  Solaris/Linux, Korn Shell (/bin/ksh), lsof

 

Download WLfdmon v1.0     Download WLfdmon v1.0 ReadMe

 

NOTE:

(1) WLfdmon has been scanned and is safe to download.

(2) WLfdmon has been tested. If you wish to use WLfdmon, I recommend you also test it before deploying it on a Production system.

(3) Your rating of this post/software will be greatly appreciated. Also, feel free to leave comments.

VN:F [1.6.5_908]
Rating: 0 (from 0 votes)

When I started this blog in March 2009, I used the editor on the Wordpress Admin console to create and publish posts. Soon, I heard about Windows Live Writer, tried it out and never looked at another blogging tool since then. Windows Live Writer (WLW) is an offline desktop application with rich editing features, which you can use to create posts and publish them to your blog (all popular blogs are supported). A screenshot of WLW taken while creating this post is shown below:

 

WindowsLiveWriter

 

WLW provides the standard features available with good text editors along with blog-specific features like managing different blog accounts, opening and retrieving recently published posts, scheduling publishing of posts and extension via plug-ins. For example, I’ve used a text template plug-in to create a template for certain types of posts, so that whenever I wish to create such a post, I simply use the template and fill in the blanks.

So, WLW makes blogging easy, but I still had the problem of blogging being tied to the laptop on which I had WLW installed. I use 2 laptops, one at office and one at home. Sometimes, I get some ideas for a post at office and wish to just make some quick notes for continuation later. How nice it would be if I can carry the same WLW installation with me wherever I go. i.e. use a portable WLW. Searched online and found a Portable launcher for WLW here. Thanks to Scott Kingery, blogging has been made even easier by becoming portable. I use portable WLW on my USB drive so that all my blog work is saved to the USB drive. Instructions for installing WLW and making it portable are given below:

Installation Of Windows Live Writer:

(1) If you do not already have Windows Live Writer on your computer, download Windows Live Writer from here and install it.

     NOTE: Windows Live is a software suite provided by Microsoft. So, when you launch the installer downloaded in step (1), you will be provide with options to install one or more Windows Live applications. If you’re only interested in WLW, then select only WLW and proceed with the installation.

 

Making Windows Live Writer Portable:

(2) downloadWLWPortablev3.png  or visit TechLifeWeb for the latest update on this software.

 

(3) Extract the downloaded ZIP file for WLW Portable into your USB drive. For example, my USB drive is assigned drive letter P: and I extracted WLWPortablev3.0 into P:, thereby creating a directory P:\WLWPortable3 with sub-directories and files within.

 

(4) Assuming you installed WLW in step (1) into the default location, copy all the files from C:\Program Files\Windows Live\Writer to the following location within the extracted WLWPortable3 on your USB drive:  WLWPortable3\WindowsLiveWriterPortable\App\WindowsLiveWriter

(5) You can now launch WLW Portable v3.0, by clicking on WLWPortable3\WindowsLiveWriterPortable\WindowsLiveWriterPortable.exe. I dragged this WLWPortable executable file onto my RocketDock so that I can easily launch WLWPortable as soon as my USB drive is inserted into my laptop. A screenshot of my set up (WLWPortable Launcher in RocketDock) is shown below:

 

WLWPortable_RocketDock

 

As the above steps make WLW portable, you may even uninstall WLW from your computer and you will still be able to use WLW from your USB drive (remember you copied a bunch of installation files to your USB drive in step(4)).

VN:F [1.6.5_908]
Rating: 0 (from 0 votes)

I required to create some “download buttons” for this blog. I didn’t have any appropriate Image creation/editing tool to create buttons and when searching the www, came across a good website called Da Button Factory which allows you to create buttons online. Salient features of Da Button Factory are:

  • The website is very clean, intuitive and simple to use.
  • Allows creation of 3 types of button : Rectangular, Rounded, Round
  • Allows creation of single colour and dual colour buttons.
  • Allows button to be integrated into your website as CSS code or an image (gif/png/jpg).
  • Allows customization of text, font, shadow, size, border, text padding and colour.

Using two colour gradient, you could create a button that is quite close to, if not like, the Web 2.0 buttons out there (colourful, glossy, shaded buttons).

A screenshot of Da Button Factory, taken while creating my download button is given below. It shows you the various options mentioned above. I opted for a PNG image, as it’s the optimal choice for small images with text (like buttons).

 

dabuttonfactory

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

 Page 1 of 2  1  2 »