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).

Archive for December, 2009

How to join Xvid files (Microsoft Windows)?

Some movies may be distributed in more than one file (e.g. more than one CD). Recently, I purchased a movie in Xvid format which consisted of two parts (two Xvid files). So, here’s how I joined the files to generate one Xvid file and viewed the entire movie in one go:

STEP 1: Download and install an Xvid codec

Xvid is a video codec library for the MPEG-4 standard. I downloaded an Xvid codec here.

 

STEP 2: Download and install (extract) VirtualDub

VirtualDub is a free video capture/processing software for Microsoft Windows. You may download VirtualDub here.

 

STEP 3: Start VirtualDub and load the video files

Start VirtualDub ( VirtualDub  ) and load the video files as follows:

To load the first video file, click File –> Open video file on the Menu bar or type CTRL + O.

To load the remaining files, add them one at a time by clicking File –> Append AVI segment on the Menu bar.

 

STEP 4: Configure Audio and Video settings

For video, click Video –> Direct stream copy on the Menu bar.

For audio, click Audio –> Direct stream copy on the Menu bar.

 

STEP 5: Save the joined video file

To save all video files as one joined file, click File –> Save as AVI on the Menu bar, choose a filename and save.

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

Problem:

HPjmeter 4.0 console does not launch after installation on Windows. When trying to launch it, the Command window briefly appears and then disappears without launching the console.

 

Background:

HPjmeter 4.0 console, a component of HPjmeter 4.0, is used to view performance data and analyze profiling and GC log files for a JVM. HPjmeter 4.0 console, being developed in java, can be executed on any platform supporting Java. However, the console is currently compatible with only JDK 5 and JDK 6. When you launch the installer (hpjmeter_console_4.0.00_windows_setup.exe), it will first scan your HDDs for installed JDKs and I guess it will pick up the first JDK it finds (see screenshot below).

hpjmeter_installer

I have both JDK 1.4.2_11 and JDK 6u17 on my HDD. Although only JDK 6u17 meets HPjmeter 4.0 console’s requirements, the installer selected JDK 1.4.2_11 (must have found this JDK first!) and completed the installation. Well, the installer will not even tell you which JDK it has found and used for the installation. You can determine this information only by checking the hpjmeter.bat file in the bin directory within the installation directory. The JDK used by the installer will be the value of the variable JM_JAVA_HOME in the hpjmeter.bat file. So, for my installation, JM_JAVA_HOME indicated that HPjmeter 4.0 console was using JDK 1.4.2_11, thereby not meeting the software requirements.

 

The HPjmeter 4.0 console installer should either search and select only a compatible JDK or prompt you for the location of a compatible JDK if it cannot find one. Although the installer isn’t too smart, the product (HPjmeter 4.0) is a very good and robust performance analysis tool for JVMs.

 Solution:

Ensure you have a working JDK 5 or JDK 6 installation. Ensure that the value of JM_JAVA_HOME in the hpjmeter.bat file is the location of the JDK 5 or JDK 6 installation.

 

Root Cause:

HPjmeter 4.0 console installer detected and used an incompatible JDK during installation. Currently, the HPjmeter 4.0 console is compatible with only JDK 5 and JDK 6.

 

NOTE:

(1) The solution above describes a successful problem-solving experience and may not be applicable to all problems with similar symptoms.

(2) Your rating of this post will be much appreciated. Also, feel free to leave comments.

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

Problem:

Solaris hosts indicate high cpu utilization caused by Sun’s CST (cstd.agt) and Net Connect (srsproxy) processes.

 

Background:

Configuration and Service Tracker (CST) and Net Connect are tools provided by Sun Microsystems for proactive system management at a customer site. The software processes launched by these tools run on SOlaris hosts and regularly send data to Sun Microsystems to enable Sun to track system availability and performance and continually improve Sun’s products and services. cstd.agt and srsproxy are processes belonging to CST and Net Connect respectively. While there have been problems/patches for CST and  problems/patches for Net Connect related to high cpu utilization, note that both these tools have reached their EOL and Sun no longer supports them. Instead, Sun has replaced these tools with the Services Tools Bundle (STB).

 

 Solution:

Remove CST and Net Connect software from your Solaris host(s) or replace CST and Net Connect with STB.

 

Root Cause:

CST and Net Connect have reached their EOL and are no longer supported. Hence, using them could lead to high CPU utilization problems.

 

NOTE:

(1) The solution above describes a successful problem-solving experience and may not be applicable to all problems with similar symptoms.

(2) Your rating of this post will be much appreciated. Also, feel free to leave comments.

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

The MaxTenuringThreshold for a Hotspot JVM

What is MaxTenuringThreshold?:

In a Sun Hotspot JVM, objects that survive Garbage Collection in the Young Generation are copied multiple times between Survivor Spaces before being moved into the Tenured (Old) Generation. The JVM flag that governs how many times the objects are copied between the Survivor Spaces is MaxTenuringThreshold (MTT) and is passed to a JVM as –XX:MaxTenuringThreshold=n , where n is the number of times the objects are copied. The default value of ‘n’ is (or actually was) 31.

Setting the MaxTenuringThreshold:

A few years ago, while my colleagues and I were tuning a 1.4.2_11 Hotspot JVM using flags like PrintTenuringDistribution and tools like  visualgc, we found that setting MTT=10 along with other flags gave us the best results (JVM throughput, pause time, footprint). However, recently when tuning a 1.4.2_11 Hotspot JVM for another application that had mostly short-lived objects, I suggested testing a value of MTT=80 (I still have no idea how the value 80 came to my mind) which is ridiculous as you’ll soon know. My objective was to retain the short-lived objects for as long as possible in the Young Generation to allow them to be collected by Minor GCs as opposed to the Full GCs in the tenured generation. Anyway, all our performance tests of the application on JVM 1.4.2_11 with MTT=80 and other JVM flags showed significant improvement in JVM performance than before (when it was untuned).

Last week, I came across some interesting proposals discussed among Sun engineers last year, regarding modifying the way MTT is handled by the JVM. I don’t know whether the proposals have been implemented, but they give some good insight into how MTT works. To quote those discussions,

Each object has an "age" field in its header which is incremented every time an object is copied within the young generation. When the age field reaches the value of MTT, the object is promoted to the old generation (I’ve left out some detail here…). The parameter -XX:+NeverTenure tells the GC never to tenure objects willingly (they will be promoted only when the target survivor space is full). (out of curiosity: does anyone actually use -XX:+NeverTenure?) Originally, in the HotSpot JVM, we had 5 bits per object for the age field (for a max value of 31, so values of MTT would make sense if they were <= 31). A couple of years ago (since 5u6 IIRC), the age field "lost" one bit and it now only has 4 (for a max value of 15).

Refer http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2008-May/000309.html for more details. So, basically , when I set MTT=80, the JVM would have actually “never tenured” the objects in the Young Generation until the Survivor Spaces were full. Hope Sun have fixed that problem as per the proposal or at least provide proper documentation (similar to the referenced article) for their JVMs which explains how MTT works. Well, MTT=80 did not have an adverse impact on our application, but we eventually switched to MTT=8 (the value 8 was a guess and didn’t provide very different results). I suggest that MTT is not set at first and be used only if your analysis of GC logs and your requirements indicate that you need to retain short-lived objects in the Young Generation for longer. As a matter of fact, when tuning a JVM, always start with basic flags for Heap Size and nothing else. Then, based on load tests, customer experience metrics (e.g. response time, response errors) and analysis of GC logs, set JVM flags and retest. Tuning is iterative and apart from all the tools available, a must-have quality (especially for complex applications) is patience.

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

Last weekend, I upgraded Windows Vista Ultimate to Windows 7 Ultimate on my Dell Studio xps laptop. I chose to upgrade, rather than perform a complete installation because I have too many programs and a lot of data on my laptop and I didn’t want any overhead in dealing with them. It’s just around seven months since I purchased my laptop and already my DVD drive isn’t working (will need to contact Dell Support and use the warranty). This is 2nd time I’m using the warranty on a Dell laptop to replace a DVD drive (the first time was with my Dell Inspiron 8500), but I still chose to buy Dell, only because Dell provided the most customization options when purchasing the laptop (now running out of patience with Dell).

So, with my DVD drive bust, I needed to perform the upgrade from a USB flash drive. I’ve been using USB flash drives for a few years and since the last couple of years, I’ve stuck with the retractable SanDisk Cruzer Titanium USB flash drives. I like the retractability and the solid build of these drives. I have the 2 GB and 8 GB capacities of the SanDisk flash drive and had to use the 8 GB  flash drive for the upgrade. The upgrade steps I performed are given below:

STEP 1: Choose the correct upgrade edition of Windows 7 Ultimate.

I first obtained the Windows 7 Ultimate N edition and then during installation, a window popped up telling me that I cannot upgrade from Windows Vista Ultimate to Windows 7 Ultimate N and need to do a complete install.

Refer to the Windows 7 upgrade paths to ensure you obtain the correct Windows 7 edition for your upgrade.

STEP 2: Download/Copy the Windows 7 Ultimate ISO image to your hard drive (use SSD if you have one for faster copying).

I downloaded the Windows 7 Ultimate ISO image (en_windows_7_ultimate_x64_dvd_x15-65922.iso – around 3 GB) to my laptop’s HDD.

If you’re downloading the ISO image, ensure that you have sufficient free space in your download location and you turn off your computer’s power saving feature so that your computer does not sleep.

Downloading the ISO frustrated me – my first attempt failed because Google Chrome simply balked after downloading 2.8 GB, my second attempt (using Mozilla Firefox) failed because my laptop went to sleep and I finally downloaded the entire ISO image successfully on my third attempt.

STEP 3: Create a Windows 7 Ultimate bootable USB flash drive

You cannot install/upgrade Windows 7 directly from the ISO. You first need to create Windows 7 bootable media. Popular media are DVDs and USB flash drives (USB 2.0 flash drives are faster than current DVDs for data reading/writing operations and this advantage will significantly increase with USB 3.0). Microsoft provides a free Windows 7 USB/DVD Download tool. If Microsoft removes this tool from their website (I believe there was an issue with using some open source code in the software), then you can get it from other websites or let me know and I can provide you with the tool. Screenshots of the tool are given below:

windows7 USB/DVD Download Tool - STEP 1

Windows 7 USB/DVD Download Tool - STEP 2

Windows 7 USB/DVD Download Tool - STEP 3 

Windows 7 USB/DVD Download Tool - STEP 4 

STEP 4: Prepare for Upgrade

Use the Windows 7 Upgrade Advisor to ensure you meet all the requirements for the upgrade. I had to install Windows Vista Ultimate updates and SP1 to meet the requirements.

 

STEP 5: Upgrade

Click the “setup” file on your Windows 7 Ultimate bootable flash drive and proceed with the upgrade. You will be required to reboot your computer a few times. I don’t remember how long this process took as I was doing it while half asleep at night. All I know, come dawn, I woke up to Windows 7 Ultimate on my laptop.

My first impressions of Windows 7 Ultimate:

So, I’ve used Windows 7 Ultimate only for a week and haven’t really explored much, but some of the good features that impressed me straight away:

(1) Very fast: Windows 7 Ultimate is the fastest Windows OS I have ever used. Perhaps, running the 64-bit version on a dual-core chip with 4 GB plays a major role, but I can perform routine operations quickly.

(2) Jump Lists: No more looking for “Recent Documents” and thinking about where you stored a specific resource. Just use the “jump list” on the appropriate program and you can jump right away to what you want. Given below is a screenshot of my Adobe Reader jump list displaying the recent pdf files I used.

AcrobatReader_JumpList

(3) Snap: Drag windows to screen edges and they resize appropriately. I found this especially useful when using programs that required me to “drag and drop” files from an explorer window into the program’s window (an example of such a program is the Samurai Thread Dump Analyzer).

Well, there is a lot more for me to explore in Windows 7 and I’m specifically interested in Windows 7 Ultimate features like SUA.

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