Sunday, November 04, 2012

Setting up wireless video surveillance with DVR

I setup video surveillance recently with the following gadgets:

  • Foscam FI8910W Wireless/Wired Pan & Tilt IP/Network Camera with IR-Cut Filter for True Color Images - 8 Meter Night Vision and 3.6mm Lens (67° Viewing Angle) – White = $89

  • Uniden UDW20055 7” LCD Indoor/Outdoor Wireless Video System, Remote, 500ft Encrypted = $250 (however I got refurb one at $150) – it comes with 2 wireless cameras and 1 LCD monitor

It comes with a Uniden Surveillance System software that can do continuous video recording and save to disk (DVR function, of course, you will need to have a PC and spare storage space to save the recordings). You can time the recordings to delete after n number of days.

  • Foscam Pro: Two Way Audio and Recording, v2.0 App for iPhone ($6) – this enables discovering

One interesting experience I had was I learned the hard way that if your router is behind a VOIP phone adapter then port forwarding cannot work and I wasted quite sometime before I realized this fact and put the phone adapter (from Vonage) behind the router (so now modem line goes to router and then phone adapter connects to the router on one of its wired ports).

Saturday, October 27, 2012

Upgraded to Windows 8 Pro

Microsoft has taken a bold step towards removing the start menu from Windows 8. However that is not a big deal as it was made out to be by the media prior to the launch. The upgrade process from Windows 7 home premium to Windows 8 Pro for mere $40 was awesome. The upgrade goes through very smoothly and Windows 8 is quite fluid and fast. The metro look and feel is very effective and looks good. The tiles on the screen could be better utilized on a touch screen tablet or touch sensitive monitors. For a regular desktop use you may not feel much of a hassle in getting used to the tiled start screen. On the bottom left there is a tile to take you to desktop mode and that's it - ones there it is as usual. I used to use launchy (which continues to work even after the upgrade) for accessing any program in the start menu and rarely had the need to go to the start menu so for me it is much the same as before. So did you like Windows 8 Pro - feel free to leave your comments.

Tuesday, October 02, 2012

Installing VMware Tools on Ubuntu Guest OS

VMware Tools are binaries that are guest OS dependent and need to be installed on the VM after the guest OS has been installed. The tools are required to see the IP addresses assigned for the network interfaces of the VM (among other things).

Following are the steps:

  1. Power on the VM.
  2. Once the guest OS has booted up, go to the VM > Guest > Install/Upgrade VMware Tools menu.
  3. This will put the VMware Tools directory under /media directory in Ubuntu.
  4. cd /media/VMware Tools
  5. cp /media/VMware Tools/VMware*tar.gz /tmp
  6. cd /tmp
  7. tar xvzf VMware*.tar.gz
  8. cd vmware-tools-distrib/
  9. sudo ./vmware-install.pl
  10. When the installation scripts promps for answers, just hit Enter since defaults are OK.

The above is based on: http://www.ubuntugeek.com/how-to-install-vmware-tools-in-ubuntu-10-04-lucid-lynx.html

Me in Java One 2012 Video

We shot for this video during the Meetup at Oracle Santa Clara where we met James Gosling. I am seen at duration 0:49 sec of the video.

Monday, October 01, 2012

PRO pack development for SCOM + SCVMM 2012

Over and above what is found in the documentation Building PRO Pack for SC2012, we also need to set the following property of the PRO.Base class during the PRO target instance creation:

objInst.AddProperty("$MPElement[Name='PRO!Microsoft.SystemCenter.VirtualMachineManager.PRO.Base']/Name$", <target hostname>)

Only then will the PRO tips targeted to instances of the PRO target object be fetched into SCVMM 2012.

Also one important change in SC2012 is the MP Authoring toolkit has been replaced by Visual Studio 2010 Authoring Extensions for System Center 2012 – Operations Manager.

Thursday, September 20, 2012

Using IOMeter

Excerpted from http://4sysops.com/archives/iometer-measure-disk-performance/

The IOMeter tool can be used to test disk performance, IO transfer rate and IO response time. I used it to pump some traffic (read, write or both) in the network and measure the performance of the ports utilized and trigger threshold crossing events.

Some important points about using this tool are mentioned below:

1. Run this tool as an administrator user.

2. Select the disk targets which are generally in my case remote SAN/LAN disks presented to the host or VM on the hypervisor. You should specify the number of sectors Iometer can use for the performance test otherwise it will use all available disk space and if the disk is huge then the tool just appears to have stuck in “preparing disk”. So set the “Maximum Disk Size” to 1000 sectors as shown below.

iometer-sectors[1]

3. You should configure the “Access Specifications”. Any pre-configured specification (like “512B; 100% Read; 0% random”) can be used for basic traffic related tests.

4. Start the performance test by clicking the green flag button on the toolbar.

5. IOMeter will prompt for specifying the results.csv file where it will log the test results.

6. Now go to the “Result Display” tab as shown below to watch the result. You can set the update frequency to 3 or 5 secs to watch the updates in real time.

iometer-results[1]

7. To end the test, click the Stop button on the tool bar.

Wednesday, September 12, 2012

A simple chrome web app

To create a chrome web app follow the below steps:

1. Create a new folder.

2. Have an icon from findicons.com and save the icon (PNG format one in the above folder).

3. Create a new text file and copy paste the below (the below sample creates a chrome web app to launch this blog):

{
"name": "Watsh's Blog",
"version": "1.0",
"manifest_version": 2,
"description": "Launcher for Watsh Rajneesh's blog",
"icons": { "128": "gnome_blog.png" },
"app": {
"urls": [
"http://rwatsh.blogspot.com"
],
"launch": {
"web_url": "http://rwatsh.blogspot.com"
}
}
}



The highlighted parts above can be changed to create your own chrome web app.



4. Save the above file with the name “manifest.json” in the same folder we created above. The complete manifest file info is found here.



5. Now to install it in chrome browser, select the settings icon “wrench” on the top right hand corner of your chrome browser and select Tools > Settings > Extensions and check the “Develolper mode” check box. Then click on the “Load unpacked extension” and select the folder we created above which contains the icon and the manifest files.



6. That’s it. Your web app is installed and available in chrome.





The above tutorial is based on this nice tutorial. The only change I have done above is to port the manifest.json to comply with manifest file version 2.

Friday, August 24, 2012

Using NPIV port for RDM disk access in VMware vSphere

Following are the steps to create NPIV port on an adapter (only tested with Brocade HBAs) on a host with VMware vSphere ESX/ESXi hypervisor:
  1. Generate NPIV port(s) WWNs for VM
  2. Use the generated NPIV port WWN, the physical port WWN and the storage port WWN in one Zone (don’t put any other WWNs in the zone). There could be other zones in the final active zone config but the zone which is to let the vSphere create NPIV port should only have those 3 WWNs (physical port, NPIV port and storage port)
    • Note: It is important to note that for RDM access through NPIV port to work we also need to have the base port in the zone. We cannot remove the base port from the zone after the NPIV port is created. Doing so results in making the RDM disk inaccessible.
  3. Confirm that the SAN storage is visible in the Host > Configuration > Storage under Devices.
  4. Power off the VM.
  5. Add a hard disk to the VM (VM > Edit Settings > Add > Hard Disk). Choose the option “Raw Device Mappings” to create an RDM disk and select the SAN LUN. See this for step by step instructions on setting up an RDM disk for a VM.
  6. Now power ON the VM. When the VM is powered on at that time the hypervisor will know that there is an NPIV port generated for the VM and it could be used to see the same disk which is presented to the VM though a physical port currently. So it will create an NPIV port under the physical port and thus the RDM SAN disk will continue to be accessible from the NPIV port.
  7. To confirm if the NPIV port is really created, check through the SAN fabric manager if the fabric shows the new NPIV port WWN as logged in to the same fabric port as the physical port.
  8. Also you can run some traffic in the VM on the RDM disk and check the stats on the NPIV port if they show the usage of the NPIV port. The stats on the NPIV port can be checked from CLI or management client for the adapter.

Wednesday, July 25, 2012

Agile Software Development Training

I recently attended a 2 days training on Agile methodologies for software development. Following are some of the salient points that i took a note of (may not be in order):

  • Agile software development emphasizes on more frequent releases (at least once per month). At the end of every sprint the product should be in releasable quality.
  • In order to keep the software in a release-ready state we need to build automated test suites and run the tests upon every check-in (continuous integration).
  • Plan only for short term (at max 2 sprint worth of duration) so that we can always re-prioritize the requirements (grooming the backlog) to accommodate any changes to the requirements.
  • We need to focus on driving down the fixed cost of development (like the cost to run the regression tests by running the regression tests through automated test suites) as much as possible.
  • Break down the dependencies on the hardware device by employing simulation tools or mock testing whenever cost to do so is acceptable.
  • To start with test automation, build a safety net of unit/acceptance tests around the legacy code.
  • TDD - Test driven development - emphasizes more rigorous unit testing (tests written prior to coding) - which makes it easy to catch regression issues from occurring going forward
  • Separate GUI event handler logic from the actionPerformed() method into a separate wrapper method which can be tested without invoking GUI.
  • Validations should be done on both client and server side preferably in common code being invoked from both client and server
  • SCRUM - is an agile project management process as represented with the screenshot below:

    • Product Owner (not shown) - same as product management team
    • Product backlog - requirements gathered from customers or partners. It is comprised of Epics (a big story) or stories. A story is a requirement adding value by itself. 
    • A story can be split into one or more stories during the "User Story Workshop" meetings (similar to functional specification review meetings where development team, product management and testers meet to understand the requirements more clearly and the outcome of this meeting is: more new stories which can fed back to product backlog, acceptance tests document which is written to test all possible use cases and shared understanding between participants)
    • The length of a story should typically be small (roughly 2 days worth or so)
    • Multiple stories are then taken up in a sprint (roughly about a month long) phase in which those stories are implemented 
    • The progress of sprint is measured using a burndown chart (which is a chart of the work remaining to be done against time)
    • Size of team = 1 to 14 people
    • The team can be comprised of some developers who will write code and automated unit tests, testers who will create the acceptance test document and automate those acceptance tests and also do some exploratory testing towards the end of the sprint
    • A nice video of Ken Schwaber on SCRUM @ Google.
  • Tools:
    • Continuous integration : Hudson/ Cruise Control
    • Unit test: TestNG
    • Acceptance test: Squish/ QFTest
The above notes is mostly what i could glean from the training i attended though it may not still summarize the details well enough or may have captured some details inaccurately.

Friday, July 20, 2012

Meeting with James Gosling (father of Java)


(Myself with James Gosling)

(Having a beer at the event)

(James presenting his talk)

Yesterday (07/19/2012) i went to attend the “Bay area all JUG event at Oracle with James Gosling” where all the JUGs (Java User Groups) in the bay area had gathered for an evening of socializing and to hear to James Gosling speak at the Oracle campus in Santa Clara.


The evening started with a casual social gathering in the 4030 George Sellon Cir, Santa Clara, CA campus of Oracle (erstwhile Sun campus) where dinner was served and Java developers from all over bay area (around 200+) interacted with each other, talked about Java in general, heard James talking about his work in Liquid Robotics or posed for a Java Music Video which was in the making on site. The camper chairs with Java logo on them were souvenirs which people were asked to take with them if they wanted to – so almost everyone promptly got up from their chairs and folded them and put them in their cars :) – this was funny but i too picked mine – it was souvenir after all.


Then we went into the hall where the presentations were held. There were 2 presentations:



This presentation was on running Java SE embedded on Raspberry Pi (a small form factor computer, which can run Linux off of a SD card, has 126MB/256MB RAM, ARM7 processor and HDMI, USB, RJ45 slots). A demo was show of a small Java web server running on the RPi device which was serving the system information.

  • "Robots and Oceans and Whales, Oh My!" by James Gosling

This presentation by James Gosling was about the Wave Glider robot of Liquid Robotics company which is an unmanned maritime vehicle (UMV) that uses the up and down wave motion in the ocean to move forward. It is designed to support variety of sensors on-board. It can either be stationed at one place for say weather measurement or be mobile. It transmits data to shore stations via Iridium satellite communications. The satellite communication is very expensive ($1/1Kb of data) so the focus of James’ work is in optimizing the data communication between these nodes in the ocean and the shore stations. James showed the work he was doing using the NASA World Wind Java SDK to plot the path of these robotic nodes on the world globe (NASA world wind is a nice example of an advanced Java Swing application for displaying geographic data). He has built a JMS-ish style publish-subscribe asynchronous communication channel between the nodes which is also authenticated (using Open AM and Open DS directory service) so that only interested nodes which have subscribed for say data from the weather sensor and have successfully authenticated to the robot will be provided access to the data. The business model is less about selling the robots themselves and more about selling the data from the robots to the various interested parties (Commercial ships, Oil Rig etc).


In short, both the presentations were quite interesting to me and i ended up buying the Raspberry Pi kit to get my feet wet in Java SE embedded programming.

Monday, June 18, 2012

Eclipse cut, copy & paste key bindings not working

The key bindings for cut/copy and paste did not always work in Eclipse Java editor in my Eclipse Indigo installation.

The fix for this was to go to Window > Preferences > General > Keys and unbind the key bindings for Cut, Copy and Paste commands.

After this, it works fine.

I found this solution mentioned in https://bugs.eclipse.org/bugs/show_bug.cgi?id=368354.

Wednesday, April 11, 2012

vCenter Inventory Service Tune Up

I noticed that the wrapper.log file (typically found in C:/ProgramData/VMware/Infrastructure/Inventory Service/Logs/wrapper.log) for the VMware Inventory Service (which gets installed with the vCenter server) can keep growing by default and so if you are not interested in wrapper.log file to keep growing forever and thus impacting eventually the vCenter server itself (since it will fill up the entire disk space) then change the wrapper.conf to have a rolling file instead of a growing log file.

#********************************************************************
# Wrapper Logging Properties
#********************************************************************


# Log file to use for wrapper output logging.
wrapper.logfile=C:/ProgramData/VMware/Infrastructure/Inventory Service/Logs/wrapper.log

# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=100m

# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=2


Wednesday, April 04, 2012

Resolution for “No buffer space available (maximum connections reached?): JVM_Bind” issue

I hit this issue recently which occurred on only one windows 7 host. The error was caused by this hard to guess reason (http://support.microsoft.com/kb/196271). The default number of ephemeral TCP ports is 5000. Sometimes this number may become less if the server has too many active client connections due to which the ephemeral TCP ports are all used up and in this case no more can be allocated to a new client connection request resulting in the below issue (for a Java application):
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
    at java.net.Socket.bind(Socket.java:577)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:95)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:45)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:399)
    at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:123)
    at org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory.createSocket(EasySSLProtocolSocketFactory.java:183)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
 



The resolution is to open the registry editor and locate the registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters and add a new entry as shown below:

Value Name: MaxUserPort
Value Type: DWORD
Value data: 65534
That’s it! Thanks to Daniel Baktiar for his post.

Update 6/14/2012:
Microsoft has a hot fix to resolve this issue for Win2K8 R2 and Win7: http://support.microsoft.com/kb/2577795

Saturday, February 11, 2012

Clearcase code merge on Unix

Following are the steps to perform a merge from branch1 (for say release1.0) to branch 2 (for say release 2.0) in clearcase on a Linux system:
1. Create a view to branch 2 where you want to merge the code to and set to the view. Then launch clearcase merge manager GUI.
$ clearmrgman
2. The merge manager wizard will prompt for the following:
    • Step 1 - Specify the dynamic or path to snapshot view
    • Step 2 - Select the elements you want to consider for merge
    • Step 3 - Select where you want to merge from by branch name, label name or from another clearcase view.
    • Step 4 – merge options like:
      • auto merge for directories – default yes
      • auto merge files in the directories – default yes
      • follow VOB symbolic links – default no
3. Once the merge completes, if there are any merge errors requiring manual resolution then those files are shown and one by one you can resolve them.
4. Once the merge is completed, all files modified, added or unloaded due to merge are in checked out state and require check in. So check in the files.
For more details, please refer the following:

Tuesday, February 07, 2012

A clearcase pre-code delivery check script

The following script finds all hijacked or checked out files recursively in the directories starting from the current working directory and dumps the data in an output.txt file.
@echo off
set output=c:\output.txt
echo Pre Delivery script started @ %TIME%
if exist "%output%" del "%output%"
echo List of Hijacked files in %CD%.  >> "%output%"
echo _______________________ >> "%output%"
echo Finding hijacked files. Please wait...
cleartool ls -recurse | findstr "hijacked" >>c:\output.txt
echo List of View Private files in %CD%. >> "%output%"
echo Finding view private files. Please wait...
echo ___________________________ >> "%output%"
cleartool ls -r -s -view_only| findstr /V ".contrib \\dist\\ \\build\\ dist .keep .class" >> "%output%"
start notepad "%output%"
echo Pre Delivery script completed  @ %TIME%. Please refer c:\output.txt file for hijacked and view private files

Wednesday, February 01, 2012

Converting from RHEL 6 to Centos 6.2

I recently installed RHEL 6 (workstation) but had not yet purchased an RedHat Network subscription when i learned that i can change it to Centos very easily and then updates will work off of Centos repository. So i upgraded RHEL 6 to Centos 6.2 with the following commands executed in order:


yum clean all
mkdir ~/centos
cd ~/centos
wget http://mirror.centos.org/centos/6.2/os/x86_64/RPM-GPG-KEY-CentOS-6
wget http://mirror.centos.org/centos/6.2/os/x86_64/Packages/centos-release-6-2.el6.centos.7.x86_64.rpm
wget http://mirror.centos.org/centos/6.2/os/x86_64/Packages/yum-3.2.29-22.el6.centos.noarch.rpm
wget http://mirror.centos.org/centos/6.2/os/x86_64/Packages/yum-utils-1.1.30-10.el6.noarch.rpm
wget http://mirror.centos.org/centos/6.2/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm
rpm --import RPM-GPG-KEY-CentOS-6
rpm -e --nodeps redhat-release-server
rpm -e yum-rhn-plugin rhn-check rhnsd rhn-gnome-setup rhn-setup
rpm -Uhv --force *.rpm
yum upgrade
reboot
 This above is based on http://yo61.com/upgrading-rhel-6-2-to-centos-6-2.html blog post.

Wednesday, January 04, 2012

foobar2000 - A pretty nice music player for windows

foobar2000: I discovered today foobar2000 and have used it for almost the whole day today and i must say that its very light and fast (you really can feel it is so). Highly recommended - go check it out.


Tuesday, January 03, 2012

Batch script to change Java Home between different JDKs

I recently happened to be working on multiple releases with some of them requiring the code to be compiled with JDK 6 whereas the more recent releases requiring code to compile with JDK 7. So i wrote up the following batch script to make the job of switching between the 2 JDKs easier. Before i run my ant build script i run the below script to set to ‘7’ for JDK 7 or ‘6’ for JDK 6.

@ECHO OFF
echo %1%
 
if "%1"== "" ( 
    echo "Syntax: javahome 7 or 6" 
    Goto :end
) 
if "%1" == "7" (
    echo "Setting JDK 7"
    
    set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_01
    GOTO :printver
) 
 
if "%1" == "6" (
    echo "Setting JDK 6"
    
    set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23
    GOTO :printver
)
 
:printver
echo %JAVA_HOME%
 
set NEW_PATH=%PATH%
FOR /F "delims=;" %%P IN ("%PATH%") DO (
    @ECHO path = %%~P
 
)
 
 
set PATH=%JAVA_HOME%\bin;%NEW_PATH%
echo %PATH%
 
java -version
:end

Sunday, December 25, 2011

Some new movie reviews

My family has been away for last 2 weeks in which i had the free-time to catch up on some of the new movie releases. Here are the ones i watched this holiday season, in order:

  1. Hugo (3D) -  Throughout his extraordinary career, Academy Award-wining director Martin Scorsese has brought his unique vision and dazzling gifts to life in a series of unforgettable films. This holiday season the legendary storyteller invites you to join him on a thrilling journey to a magical world with his first-ever 3-D film, based on Brian Selznick's award-winning, imaginative New York Times best-seller, "The Invention of Hugo Cabret." Hugo is the astonishing adventure of a wily and resourceful boy whose quest to unlock a secret left to him by his father will transform Hugo and all those around him, and reveal a safe and loving place he can call home.
  2. Sherlock Holmes 2 - A game of shadows -  Sherlock Holmes (Robert Downey Jr.) has always been the smartest man in the room...until now. There is a new criminal mastermind at large-Professor Moriarty (Jared Harris)-and not only is he Holmes' intellectual equal, but his capacity for evil, coupled with a complete lack of conscience, may actually give him an advantage over the renowned detective. When the Crown Prince of Austria is found dead, the evidence, as construed by Inspector Lestrade (Eddie Marsan), points to suicide. But Sherlock Holmes deduces that the prince has been the victim of murder-a murder that is only one piece of a larger and much more portentous puzzle, designed by Professor Moriarty. The cunning Moriarty is always one step ahead of Holmes as he spins a web of death and destruction-all part of a greater plan that, if he succeeds, will change the course of history. 
  3. The girl with the dragon tattoo -  The Girl with the Dragon Tattoo is the first film in Columbia Pictures' three-picture adaptation of Stieg Larsson's literary blockbuster The Millennium Trilogy. Directed by David Fincher and starring Daniel Craig and Rooney Mara, the film is based on the first novel in the trilogy, which altogether have sold 50 million copies in 46 countries and become a worldwide phenomenon.
  4. Adventures of Tintin -  Paramount Pictures and Columbia Pictures Present a 3D Motion Capture Film The Adventures of Tintin directed by Steven Spielberg from a screenplay by Steven Moffat and Edgar Wright & Joe Cornish. Starring Jamie Bell as Tintin, the intrepid young reporter whose relentless pursuit of a good story thrusts him into a world of high adventure, and Daniel Craig as the nefarious Red Rackham.
  5. Mission Impossible 4 - Ghost Protocol -  This is not just another mission. The IMF is shut down when it's implicated in a global terrorist bombing plot. Ghost Protocol is initiated and Ethan Hunt and his rogue new team must go undercover to clear their organization's name. No help, no contact, off the grid. You have never seen a mission grittier and more intense than this.
All were nice movies (or else i would not have gone to watch them :)) but i liked the "Adventures of Tintin" the most, followed by MI4 and Sherlock holmes, followed by Hugo and then Girl with the dragon tattoo. The problem with the GWTDT is it is not as well made as the sweedish version of the same movie (which i had watched before the english one).

Monday, December 19, 2011

VMware vSphere Performance Manager APIs

PerfCounterInfo

Figure 1 – PerfCounterInfo

PerfInterval

Figure 2 - PerfInterval

Performance Provider

1. A "performance provider" (PerfProviderSummary) is any managed object that generates utilization or other performance metrics.

2. Performance providers include managed entities, such as hosts, virtual machines, compute resources, resource pools, datastores, and networks. Performance providers also include physical or virtual devices associated with these objects, such as virtual host-bus adapters and network-interface controllers (NICs)

3. Each performance provider—the instrumented device or entity—has its own set of counters that provides metadata about its available metrics. Each counter has a uniquekey, referred to as the counterId.

Performance Counter

4. Counters are organized by groups of finite system resources, such as memory, CPU, disk, and so on.

5. PerfCounterInfo data object, shown in Figure 1, represents a performance counter.

Name

Type

Description

groupInfo

ElementDescription

The group of the performance counter with its label and summary details.

Key

Int

A system-generated number that uniquely identifies the counter in the context of the system. The performance counter ID.

Level

int

1..4, 1 is default. Higher the setting more data is collected by vCenter. See below for details. Note this is only applicable for vCenter and not ESX host.

nameInfo

ElementDescription

Counter name

perDeviceLevel

Int (since 4.1)

>= level.

rollupType

PerfSummaryType

One of average, latest, max, min, none, summation

statsType

PerfStatsType

One of absolute, delta or rate

unitInfo

ElementDescription

Unit for values of performance counter.

6. The performance counter can be represented by the following dotted string notation:

[group].[counter].[rollupType]

Example, disk.usage.average

7. Here are a list of four levels and what counters are included:

a. Level 1:  includes basic metrics: average usage for CPU, memory, disk, and network; system uptime, system heartbeat, and DRS metrics. It does not include statistics for any device.

b. Level 2: includes all counters with rollup types of average, summation, and latest for CPU, memory, disk, and network; system uptime, system Heartbeat, and DRS metrics. It does not include any statistics for device either.

c. Level 3: includes all metrics (including device metrics) for all counter groups except these with rollup types of maximum and minimum rollup types.

d. Level 4: includes all metrics supported by VirtualCenter, including maximum and minimum rollup types.

Performance Metric

8. The cpu.usage.average is a performance counter for average CPU utilization. When the counter is collected on CPU No. 1 of a host, a performance metric is formed. The performance metric is represented by PerfMetricId data object which consists of two parts:

a. counterId: The integer that identifies the performance counter.

b. instanceId: The name of the instance such as “vmnic1” or “vmhba0:0:0”.

Performance Interval

9. The interval has to be longer than the sampling interval, which can be found as refreshRate in the PerfProviderSummary data object returned by queryPerfProviderSummary() method, normally 20 second. For VirtualCenter Server systems, instances of this data object are referred to as “historical intervals” because they control how data collected from the ESX systems will be aggregated and stored in the database.

10. vCenter default setting is level 1 and it retains sampled stats data as follows:

· 5-minute samples for the past day

· 30-minute samples for the past week

· 2-hour samples for the past month

· 1-day samples for the past year

11. PerfInterval is explained below:

Name

Type

Description

Enabled

Boolean

If disabled vCenter will not collect performance data for that interval or higher intervals. For example, disabling the "Past Month" interval disables both "Past Month" and "Past Year" intervals. The system will aggregate and retain performance data using the "Past Day" and "Past Week" intervals only.

Key

Int

Id for interval

Length

Int

Seconds that the stats corresponding to this interval are kept on system

Level

Int

1..4. higher the level more data is collected.

Name

String

Name of historical interval. Example, “Past Day”, “Past Week” etc.

samplingPeriod

Int

Number of seconds that data is sampled for this interval. The real-time samplingPeriod is 20 seconds.

Default properties for the four built-in historical intervals include:

KEY

SAMPLINGPERIOD

LENGTH

NAME

LEVEL

ENABLED

1

300

86400

Past day

1

true

2

1800

604800

Past week

1

true

3

7200

2592000

Past month

1

true

4

66400

31536000

Past year

1

true

12. In general, you should avoid changing the intervals as much as possible except the levels.

Real time vs historical performance statistics:

a. Real time stats collected at 20 secs sampling interval and kept for a length of 1 hour.

b. These real time samples are then processed to generate historical performance stats.

c. ESX only maintains 5 mins interval historical stats for one day length. vCenter does more aggregation and maintains stats for longer durations.

Important references:

1. vSphere SDK 5.0 reference on Performance Manager - http://vijava.sourceforge.net/vSphereAPIDoc/ver5/ReferenceGuide/vim.PerformanceManager.html

2. A decent introduction to performance manager APIs: http://www.doublecloud.org/2010/03/fundamentals-of-vsphere-performance-management/

Friday, September 23, 2011

Installing VMware vCenter Server 4.1

Installing VMware vCenter Server 4.1:

Very helpful instructions with screenshot to walk you through the entire vCenter server 4.1 installation with a SQL Server 2008 (not the express edition one).

'via Blog this'

Wednesday, June 29, 2011

VMware vSphere 4 Networking Essentials

1. vSwitch similarities to a physical L2 switch:

  • A vSwitch functions at Layer 2,
  • maintains MAC address tables,
  • forwards frames to other switch ports based on MAC address,
  • supports VLAN configuration,
  • is capable of trunking using IEEE 802.1q VLAN tags, and
  • is capable of establishing port channels.

2. vSwitches are configured with a specific number of ports: 8, 24, 56, 120, 248, 504, or 1016. VMKernel reserves 8 ports for its own use.

3. Changing the number of ports on a vSwitch requires a reboot of ESX/ESXi host.

4. vSwitch dissimilarities to physical L2 switch:

  • Does not support dynamic negotiation protocols for establishing 802.1q trunks or port channels like DTP (Dynamic Trunking Protocol) or PAgP (Port Aggregation Protocol).
  • A vSwitch cannot be connected to another vSwitch thereby eliminating a potential looping configuration. Because there is no possibility of looping, the vSwitches do not run Spanning Tree Protocol (STP).
  • A vSwitch authoritatively knows the MAC addresses of the virtual machines connected to that vSwitch so there is no need to learn MAC addresses from the network.
  • Traffic received by a vSwitch on one uplink is never forwarded out another uplink. So a vSwitch cannot be used as a transit path between 2 physical switches for example, because traffic on one uplink won’t be forwarded out another uplink.

5. Following 3 types of ports and port groups can be configured on a vSwitch:

  • Service console port
  • VMKernel port
  • Virtual Machine port group

All of the above types can be represented by one table/type:

std_vswitch_portgroup - model's VMKernel Ports, Service Console Ports and VM Port groups

  • · network_label
  • · vlan_id
  • · type - one of vmportgroup (0), vmkernel(1), serviceconsole(2)
  • · vmkernel_port_operations (bitmask - values) - only applicable for VMKernel ports

000 - Use this portgroup for iSCSI/NAS traffic

001 - Use this portgroup for VMotion

010 - Use this portgroup for fault tolerance logging

100 - Use this portgroup for management traffic - only applicable for ESXi

6. vSphere client combines the creation of vSwitch with creation of new ports or port groups. vSphere client does not ask about creating a new vSwitch, but rather what type of port or port group to create (connection types – Virtual Machine, VMKernel or Service Console are the options).

7. Unlike ports or port groups, uplinks are not necessarily required in order for a vSwitch to function. VMs connected to a vSwitch without any uplinks can communicate with each other but cannot communicate with VMs on other vSwitches or physical systems. Such a configuration is known as an “Internal-only vSwitch”. Communication between VMs connected to an internal-only vSwitch takes place entirely in software and happens at whatever speed the VMKernel can perform the task.

8. VMs connected to an internal-only vSwitch are not VMotion capable. But if the VM is disconnected from the internal-only vSwitch, VMotion will succeed if all other requirements have been met.

9. A vSwitch can also be bound to multiple physical NICs – this configuration is called NIC team. This takes advantage of load distribution and redundancy.

10. vSwitch associated with a physical NIC provides VMs with the amount of bandwidth the physical NIC is configured to support.

11. A single physical NIC cannot be associated with multiple vSwitches.

12. Max number of physical NICs on a ESX/ESXi host is 32 of which only 4 can be 10 Gbps adapters.

13. Service Console ports:

  • ESX supports up to 16 service console ports.
  • At least one service console port is required to exist on any one vSwitch on an ESX host.
  • We will discover but not perform any create/update/delete operations for this port type.

14. VMKernel ports:

  • Provide network access for the VMKernel’s TCP/IP stack (which is separate and independent from the Service Console TCP/IP stack).
  • VMKernel ports are used for VMotion process, iSCSI/NAS access and VMware FT.
  • With ESXi hosts, VMKernel ports are also used for management.
  • A VMKernel port comprises of 2 components:
    • A VMKernel port on a vSwitch
    • A VMKernel NIC – vmknic

e. The vmknic is configured with the interface IP address in the process of creating the VMKernel connection type in vSphere client. The IP address should be a valid IP for the network to which the physical NIC is connected to. One can optionally provide the default gateway if VMKernel NIC is required to reach remote subnets.

15. VLAN

  • a. IEEE 802.1Q Tagging – marking traffic as belonging to a particular VLAN. VLAN tag (aka VLAN ID) is value between 1 and 4094 which unique identifies the VLAN across the network.
  • b. VLANs are handled by configuring different port groups within a vSwitch. A port group can be associated to only 1 VLAN at a time, but multiple port groups can be associated with a single VLAN.
  • Figure 16 - Configuring VLAN on Port groups of a vSwitch
  • c. To make VLANs work properly with a port group, the uplinks for the vSwitch must be connected to a physical switch port configured as a trunk port. A trunk port understands how to pass traffic from multiple VLANs simultaneously while also preserving the VLAN IDs on the traffic. So the physical switch passes the VLAN tags up to the ESX server, where the vSwitch tries to direct the traffic to a port group with that VLAN ID configured.
  • d. The default native VLAN is VLAN ID 1. This is untagged VLAN ID meaning the switch port will strip this native VLAN id from the traffic as they pass. If you want to pass traffic on VLAN 1 to ESX server, then you need to maintain the tagging in the traffic and so you need to configure another VLAN id as native default VLAN. So an untagged VLAN (default native VLAN) can also be any id between 1 and 4094.
  • e. A good convention to follow while naming port group or port network label is: VLANXXX-Network Description. For example, VLAN11-IPStorage.
  • f. Although VLAN reduce the cost of constructing multiple logical subnets by separating the network segments logically but still all traffic runs on the same physical network underneath. For bandwidth-intensive network operations this disadvantage of shared physical network might outweigh the scalability and cost savings of a VLAN.

16. NIC Teaming

  • a. Uplink is a physical adapter bound to the vSwitch and connected to physical switch.
  • b. NIC teaming involves connecting multiple adapters to single vSwitch. It provides redundancy and load balancing of network communications to Service Console, VMKernel and virtual machines.
  • Figure 17 - NIC Teaming
  • c. As seen in figure above, both of the vSwitches have 2 uplinks and each uplink connects to a different physical switch.
  • d. ESX/ESXi can have a max of 32 uplinks and these uplinks can be spread across multiple vSwitches or all tossed into a NIC team on one vSwitch.
  • e. Building a functional NIC team requires that all uplinks be connected to physical switches in the same broadcast domain. If VLANs are used then all the switches should be configured for VLAN trunking and the appropriate subset of VLANs must be allowed across the VLAN trunk.
  • f. The load balancing feature of NIC teaming does not function like the load balancing feature of advanced routing protocol and hence is not a product of identifying the amount of traffic transmitted through a network adapter and shifting traffic to equalize data flow through all available adapters. Rather the load balancing algorithm for NIC teams in a vSwitch is a balance of the number of connections – not amount of traffic. NIC teams on a vSwitch can be configured with one of following 3 policies:
    • i. vSwitch port based load balancing (default)
    • This policy setting ensures that network adapter connected to a vSwitch port will consistently use the same physical network adapter. In the event one of the uplinks fails, the traffic from failed uplink will failover to another physical adapter.
    • This setting is best used when number of virtual network adapters is greater than number of physical network adapters. Link aggregation using 802.3ad teaming is not supported with this and MAC based load balancing policies.
    • ii. Source MAC based load balancing
    • It has same limitations as previous method – it’s also static mapping of vNIC MAC to a pNIC. Traffic originating from a vNIC will always go through the same physical NIC in this approach (Same as previous).
    • iii. IP hash based load balancing (out-IP policy)
    • It uses source and destination IP addresses to determine the physical network adapter for communication. This allows traffic originating from a single vNIC to go over multiple physical NICs when communicating with different destinations.
    • This policy setting requires all physical NICs be connected to same physical switch. Also the switch must be configured for link aggregation (which can increase the throughput by combining the bandwidth of multiple physical NICs for use by a single vNIC of a VM). ESX/ESXi supports standard 802.3ad teaming in static (manual) mode and does not support LACP or PAgP.
  • g. The load balancing feature on vSwitch applies only to the outbound traffic.
  • h. Failover detection with NIC teaming can be configured to use either a link status method or a beacon probing method.
    • i. Link status method – failure of an uplink is determined by link status provided by physical network adapter. But this can only identify the link status of pNIC to edge switch and not the link status between the edge switch to an upstream switch.
    • ii. Beacon probing failover detection – included link status as well as sends Ethernet broadcast frames across all physical network adapters in NIC team which help detect upstream network connection failures as well and will force failover when STP blocks ports, when ports are configured with wrong VLAN or when a switch to switch connection has failed. When a beacon is not returned on a pNIC the vswitch triggers failover.
  • i. Failback option controls how ESX will handle a failed network adapter when it recovers from failure. Default setting is yes which means the adapter will be returned to active duty immediately upon recovery and it will replace the standby adapter that may have taken its place during the failure. Setting it to No means the recovered adapter will remain inactive until another adapter fails.
  • j. One can even use the setting “Explicit failover order” in which case traffic will move to next available uplink in the list of active adapters. If no active adapters are available then traffic will move down the list to the standby adapters.

17. vNetwork Distributed Virtual Switches:

  • a. A dvSwitch spans multiple servers instead of each server having its own set of vSwitches.
  • b. First you create a dvSwitch and you add hosts to it during or after creation.
  • c. When an additional ESX host is added to a dvSwitch, all of the dvPortgroups will automatically be propagated to the new host with the correct configuration. This is the distributed nature of the dvSwitch – as configuration changes are made via the vSphere client a vSphere server pushes those changes out to all participating hosts in the dvSwitch.
  • d. A host cannot be removed from a dvSwitch if it still has VMs connected to a dvPortgroup on that dvSwitch.
  • e. Adding dvPortgroup:
    • i. Name of dvPortgroup – unique across member hosts of dvSwitch.
    • ii. Number of ports: 128 default, max configurable value is 8192.
    • iii. VLAN Type:
      • 1. None – dvPortgroup will receive only untagged traffic
      • 2. VLAN – dvPortgroup will receive tagged traffic and uplinks must connect to switch ports configured as VLAN trunks
      • 3. VLAN Trunking – dvPortgroup will pass VLAN tags up to guest OS on any connected VMs
      • 4. Private VLAN

18. FAQ:

  • a. Can we have vNIC created without portgroup association? NO - API requires you to specify an existing portgroup while creating vNIC.
  • b. You can assign any name to vswitch - for eg. 'ViMaster Switch'
  • c. Standard vSwitch Port group name is unique within a host
  • d. Hybrid deployments (vDS + vSS) is a supported deployment scenario. If vCenter fails then you won’t be able to manage your vDS so it is recommended that we use vSS for at least the VMKernel and Service Console connections. One can have the VM port groups on vDS though.
  • e. We can assign a virtual hard disk carved out of a VMFS datastore over an iSCSI LUN to a VM with no network card (vnics).
  • f. For software iSCSI initiator we can tell the vmknic interface being used by identifying which iscsi target is in the same subnet as the vmknic interface.
  • g. For hardware iSCSI initiator no vmkernel port needs to be configured and it will show up as a normal FCHBA (Storage adapters) in vSphere client. The ip address will be configured on the HBA directly.

Tuesday, June 14, 2011

Book Review: The Kite Runner


I listened to the audio book “The Kite Runner” read by the author Mr. Khaled Hosseini. This book has a very strong story line to keep the reader’s attention occupied. I liked the story and following are some thoughts on the book:
1. Relation between Amir and Hassan – the loyalty and unconditional devotion which Hassan has for Amir speaks for the mindset that society can impose on an individual of lower rank that such an individual can never come out of. In spite of Amir’s cowardly manners Hassan never blames him and even accepts the false charges of being a thief just so that Amir is not caught red handed was quite touching.
2. The way Hazara community was treated in Afghanistan or the Shudras were treated in India or the Jews were treated by Nazis is a fact that humanity should never forget just so that it never repeats those mistakes in the future. It is works like this book that remind us of our abhorrent mistakes of the past and reinforces into us the realization that we should never let this repeat itself.
3. Reader gets a feel of the Afghan culture – what a pushtun clan can value, respect for elders in the society and the values like this that parents teach their children.
4. How the Afghan people were scared of the Taliban and some mentions of the atrocities that Taliban militia men conducted on  people.
5. Amir adopts Hassan’s son Sohrab and brings him to US and the problems that he faces with the consulate even though he was a US Citizen was also quite believable and something any foreign national living in US can relate to.
Overall the story was well told – its not very big book and I could complete listening to it within 4 days. Now I will like to see the movie and will update this post with how I found that later.

Saturday, May 14, 2011

Rushil learning swimming


This is the picture of Rushil learning swimming at DACA Swim Center (www.daca.org). He is 3.5yrs old now. He is enjoying the experience of swimming this summer.

Friday, February 25, 2011

Book Review: The Fountainhead


I recently completed the book The Fountainhead by Ayn Rand. Following is the review of the book:
Fountainhead is the story of an architect, named Howard Roark, who is extremely passionate about the field of architecture but his ideas about it are not in tune with the times in which he lives in. In his time the teachers in his college to the professional architects practicing business were all of the view that the field of building design and architecture has already reached its pinnacle of evolution and needs no further change from what the masters of the past have already established as the best approach to building design possible – namely the gothic architecture. Howard Roark was a modernist and did not endorse to the idea of gothic architecture and wanted to do the building design in a more modern way in tune with the demands of the present times. As a result, he is faced with several challenges while practicing architecture his own way. He wont get any contracts, he does not work if people don’t accept his design exactly as he designed it without any change, and there were people who worked against him to ensure he succumbs to the pain they inflict on him. Ayn Rand has very elegantly tried to convey the message that in this world most of us are mere second-handers who adopt the genius of one man and keeping towing to that line without wanting or accepting any change. When there comes a man who tries to bring in something new something different than the norm then the whole world goes against such a man – since that man represents the one that most of us mere humans are not – such a man is more able than any of the average men around him and so the world does not want to let him be since that man makes others realize that they are inferior than him. Such average mere mortals have low self-respect, no integrity and they endorse but one thing – that good of the community is more important than the good of the individual. An individual may be sacrificed for the good of the community if need be. Such people cannot stand alone and require support of the other like minded men. They only know to feed on the genius of the first handers – men like Howard Roark. Ayn Rand goes on to expound on the virtues of being selfish – to love oneself is not sin – but a primary duty of an individual toward himself. She goes on to mention that where there is some sacrifice being done by someone there is someone getting what is being sacrificed. In the name of religion and politics, in the name of brotherhood we come across several such people who vehemently try to emphasize to others the virtues of being unselfish and to practice sacrifice/renunciation.
Howard Roark says – I shall not live for any other man nor will I expect any man to live for me.
The philosophy behind this story is gripping and forces one to think about whether one has integrity or are we going to end up as one of the mere second handers.

The important characters are:
Howard Roark – the hero or the protagonist.
Dominique Francone – the heroine who loves Roark
Peter Keating – Roark’s college mate who starts with being a go-getter and then realizes that in his passion to succeed he has lost his integrity.
Gayle Wynand – the industrialist who is the alter ego of Howard Roark
Ellsworth Toohey – the villain – he feeds on the souls of the unsure the second hander population which needed some moral support from him and his guidance since they lacked their own decision their own integrity
Henry Cameron – an architect who Roark works for in his first job
Highly recommended. Even if one does not like the philosophy one should still read this book for the literary value it has – the prose of Howard Roark’s statement in the court, Ellsworth Toohey’s lecture to Peter Keating and in general the dialogues exchanged between the characters are very well composed and a pleasure to read.

Wednesday, February 09, 2011

Book Review: The Read-Aloud Handbook

 

The read-aloud handbook by Jim Trelease is a treatise on the importance of reading aloud books to your children (by parents or by teachers in classroom). Mr Trelease brings forth several examples of how some parents were able to inculcate into their kids the habit of reading by beginning to read to them from early childhood. I will try to summarize my own experience of following this idea with my kid Rushil (who is 3.5yrs old).

I don’t remember exactly when I started to read on a regular basis during bed time to Rushil but it was approximately around 1.5yrs of age and only recently around 2.5-3yr age Rushil has started to show very positive interest in the books and just wants me to continue to read to him one book after another. Nowadays I read to him for at least 30mins during bed time but that is the least and mostly I have to read 2 stories (either from one book or 2 books). We visit the library once a week on Saturday’s after him gym class and of late that has become a routine and Rushil has come to expect that on Saturday’s and going to library is a pleasure trip for him as he gets to pick books and also DVDs Smile there. We bring usually 2-5 books at a time with some books containing multiple stories. Apart from bedtime stories I also try to read to him while he is eating but that’s not a routine. Until now I have only been reading to him picture books and have also tried some chapter picture books (especially the Usborne anthologies ones which are picture books divided into chapters with about 70 pages for each story). I am yet to try reading a chapter from a Novel (like Charlotte’s Web by E. B. White). Once we also brought an audio book collection from library of Fairy tales and I was pleasantly surprised that Rushil was listening to the story of the Ugly Duckling quite intently. The audio books can be a good variety to play in the car at times.

Now going back to the book, the read-aloud handbook, it contains a list of books to be read aloud organized by the type of books and the kid’s age range. We can also find good lists on Amazon web site on which books to read to children of certain age. The list comes in handy in deciding which books are good to be read-aloud to children. In the first part of the book the author gives instances of several people who have written to him or spoken to him retelling their own experiences of reading to their students or children and the changes they witnessed in the kids. Also he mentions of research works which corroborate the fact that reading aloud to children is the best thing parents can do for their children’s education – by helping them build a solid foundation and imagination and most importantly inculcating in their kids the value of reading as a pleasure giving activity so that children are encouraged to read more as they grow. The book also recommends that parent’s themselves should lead by example by becoming avid readers. Reading aloud should also be done even after children start reading on their own. The book mentions of using close caption feature of TV while letting kids watch TV so that they also get to see the text together with what they hear – as this also may help in familiarizing the child with the sound and the text of words which will help them eventually in learning to read those text.

If you are a parent then it’s a good book to read to know about the values of reading aloud to your children.

Saturday, February 05, 2011

WattOS distro review

WattOS is a very fast Ubuntu based distro which i have started using now on my not-so-old laptop (Dell Vostro). I tried several re-mastered Ubuntu distros but somehow i was not getting the optimum performance out of my laptop. It was generally running slower than my work laptop which has windows XP and even though my Vostro has modest RAM and processor but even with Ubuntu (Gnome desktop one) i could see the processor being used upto 40% with just some apps in operation (an IDE, a terminal etc). Also the browsing speed was sub-par. With WattOS i see the performance on the same Vostro laptop very good. I hope this is going to remain stable. WattOS only supports 32 bit for now and even though my Vostro has Core 2 Duo (64 bit processor) i was ok with using a 32 bit distro too as even Ubuntu site mentions that 32 bit edition is more stable release. It uses LXDE/OpenBox desktop environment. WattOS uses the latest Ubuntu Linux as a basis using only the core system and then slowly adding base modules to ensure a small memory footprint, and speed.

I tried several distros before and even liked them but had it been a faster machine the distros like pinguy OS are very good and beautiful indeed but for my Vostro they were just too bulky. WattOS does not come with any games at all nor does it have several of the applications that come with the standard Ubuntu distribution but comes with bare minimal of the applications only - for office they have AbiWord, Leafpad for text editior, KeepassX for password management, fotoxx for photo management, Firefox as the default browser (which i replaced with Chromium), and then you have the Synaptic Package manager to add any other that you want. I will be using this system mostly for Java development and programming stuff and not for any document editing at all (as for those i have a windows 7 desktop) so i wont care too much about how complete a desktop it has and i will prefer if it does not have too many extra apps that i will not use like at all. So i am happy with the speed and performance of the machine and feel like my old laptop is rejuvenated. I wish i had found such an OS as wattOS earlier without having to waste my time in trying out others. Now my CPU usage under similar load conditions as perviously described is around 3% and memory usage is 1% (i have 4GB RAM).

Introduction excerpted from the WattOS site:
wattOS is a lightweight Linux operating system remastered from the core Ubuntu Linux build. It is a free operating system that focuses on a small footprint, low power, and a simple quick interface. Bring your old computer back to life again with a fresh install of wattOS!

Monday, January 31, 2011

Book Review: Kidnapped (Graphic Novella)

 

I recently got hold of this book – Kidnapped by R. L. Stevenson, from the local library and it proved to be an interesting read and the illustrations in the novel were very good too. Its an abridged edition of course but is able to hold the interest of the reader quite well indeed. Following is some summary of the book in my words – David Balfour goes seeking for his inheritance after his father’s demise – and meets his uncle Ebenezer Balfour who is the evil kind who will not want David to get his share of the estate and conspires to kill David but fails and eventually manages to sell David off for bondage labor to a captain of the Covenant ship. There David happens to meet a guy of Scottish decent who he befriends and who finally helps David to come back to England and get his property back from his uncle. The adventures of David and his friend while they escape from the Covenant till they reach England forms the major part of the story line. Overall a  nicely done novella – good for a quick read.

Sunday, January 30, 2011

Book Review: The Call of the Wild


This is my first review of any book on my blog. I have recently started paying attention to my reading habit and have completed the first book – by author Jack LondonThe Call of the Wild. Though much has already been written about the book I will try to summarize it in my words below. This story has its appeal for me for the fact that I am presently staying in Santa Clara California where Buck used to live in Judge Miller’s house and I have also once visited Alaska where most of the story is based on.
This is a classic American story about a dog (Buck) who is sold by Judge Miller’s (in who’s household Buck used to inhabit as a pet born of a Saint Bernard father and a Scotch Shepherd Mother) gardener, Manuel, to the wrong hands at the time when (strong sled) dogs were in great demand (due to Klondike Gold Rush). And so Buck was relocated from the Santa Clara valley California to the north land (Alaska). The story is about how Buck experiences and sustains through the drastic change in his life being brought about by being moved from a domesticated pet dog to a hard working sled dog in the extreme climate of the north land. Buck survives it all because of his physical strength, ability to adapt to the changing environment, and above all, not loosing his values and remaining true to his self. Buck was passed on from one master to the next but they all liked him except for the trio who were themselves bad masters and they end up loosing Buck to Thornton. Bucks affection for Thornton is very heart warming. Eventually Buck avenges for his master’s death and returns to answer the call of the wild – where he does not kill for pleasure but only for his need to survive.
This is a children’s classic and is a quick read and a nicely told story.

Saturday, November 27, 2010

My new 2011 Honda Odyssey EX-L

Its been quite some time that I have been keeping silent on this blog but today I just could not resist the need to announce it to the who-so-ever-is-interested (may be its just me – and yes I do like to read what I wrote in the past some times) that I bought my second car – which is not a car but a mini-van and the best in its category at the time of the purchase – the new 2011 Honda Odyssey. I went for the EX-L trim which comes with leather seats and many other luxuries which one does not often need but are nice to have. The color is Polished Metal (dark grey) and the interior leather color is beige (light greyish brown). I just drove it a little bit till now (from dealer’s showroom to home) but the feel of driving a brand new Odyssey is just as I read about it described on the several forums (which I visited while researching which of the Honda Odyssey, Toyota Sienna or Acura MDX should be my next car). They said it is a driver’s mini-van (meaning you will have perfect control on the vehicle while steering it – the steering control is almost perfect) and which makes even a big mini-van quite easy to maneuver. Also the 2011 is state-of-the-art with many of the tech features coming standard (like Bluetooth, Auxiliary Jack for MP3 players, USB port to charge iPODs etc). There are some unique convenience features like the cool box refrigerator, a trash holder in the 2nd row which are unique to the Odyssey 2011 (no other mini-van has it right now).

After juggling between Sienna, Odyssey and MDX we decided to go for Odyssey because of its better ratings as the best mini-van and economical mileage, nice technical package that came standard (which definitely increase the ease of use of the vehicle), the 2011 is a design refresh year for Honda Odyssey so many improvements have been made over the previous model,  the cost was bearable (compared to MDX), even though it does not have a 4WD I decided to go for it because I already have the Honda Element which is a 4WD vehicle and in the bay area we don’t usually need the 4WD unless you are travelling to the Sierra’s (lake tahoe etc) where there is snow fall. We also considered the equally priced Honda Pilot EX-L but somehow after having one SUV (even though Element is a compact SUV) I did not want to own another similar (only little bigger) vehicle. Mini-vans are more roomy, more comfy and the 2011 model of Ody also looks and feels more like driving a car than a mini-van.

I have a 3.5yr old kid and the purpose of this van was to mainly drop and pickup the kid from school. But we also wanted to buy something more comfortable, not very luxurious but at least one that makes those couple family vacations to LA and the like more pleasurable. I first wanted to buy an MDX but I realized that it was too much of a stretch to go for (in  terms of the cost of the car and its maintenance cost – only take premium gas and mileage is 16mpg, parts are expensive etc.). The other option was to get a used MDX but then I somehow prefer to own a less luxurious or less powerful *new* car than a fully loaded luxury car which is used one (I know this is not exactly being practical but Ody seemed to be a nice compromise and here’s why – I could get a fully loaded MDX Touring with RES/NAV used 2005 model with 50K+ miles on it comes for 24K approx. and if I spend 13k more I get a new Honda Odyssey 2011 which is not the fully loaded model but has all that I care for with just 2 miles on it Smile). I did not need the RES/NAV but what I cared for more was the leather seats, power doors, power tailgate, blue tooth hands free support. For RES and NAV I did not want to shell out another 3-4k more. I can always put a GPS in the car for much less price. Also the mini-van is in general more roomy and hence more comfortable on longer trips than any SUV. Also climbing in and out of the van for kids and older people is generally easier.

Enough with the pros of Ody, now the cons are: it does not come with 4WD, parking is a hassle some times, does not look as cool as an SUV would. But for me the pros outweighed the cons. Between Sienna and Ody, the Ody looked much better than the 2011 Sienna (which to me looked more like an ambulance). Sienna has a 4WD option but the mileage was minus 3 mpg from the 2WD one. Also the reviews that 2011 Ody got were better than 2011 Sienna.

Wednesday, April 21, 2010

Setting up NFS Server on Linux

Steps to setup the NFS server on RHEL 5 Linux:
For details you can refer to http://nfs.sourceforge.net/.
1. Check if NFS is not already running by typing the command: rpcinfo -p

# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 895 status
100024 1 tcp 898 status
100011 1 udp 725 rquotad
100011 2 udp 725 rquotad
100011 1 tcp 728 rquotad
100011 2 tcp 728 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 32774 nlockmgr
100021 3 udp 32774 nlockmgr
100021 4 udp 32774 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 54361 nlockmgr
100021 3 tcp 54361 nlockmgr
100021 4 tcp 54361 nlockmgr
100005 1 udp 791 mountd
100005 1 tcp 794 mountd
100005 2 udp 791 mountd
100005 2 tcp 794 mountd
100005 3 udp 791 mountd
100005 3 tcp 794 mountd

If the output looks something similar to above then NFS service is already running and you may need to just restart it in case you are modifying the /etc/exports file. If you don't see the nfs service being printed as output of command rpcinfo -p then follow the next steps.

2. Create a /etc/exports file (if not already present). For details and other examples refer to the man exports documentation.

Format for entries in this file is:
/directory/to/share nfs_client_host(options)

Following entry is only good for testing purposes (as it is insecure).
----- edit start -----
/vm_share *(rw,insecure)

----- edit end ------

3. Now run the below command to export all the directories.

$ /usr/sbin/exportfs -a

4. Restart the nfsd from the /etc/init.d script file. This may vary across distributions of linux. In case of RHEL 5, this file happens to be /etc/init.d/nfs. Pass it the option to start or restart.

5. Again verify that rpcinfo -p now prints nfs service too (as shown above).

Now you can use any NFS client to access the shared NFS directory /vm_share on the linux host.

Popular micro services patterns

Here are some popular Microservice design patterns that a programmer should know: Service Registry  pattern provides a  central location  fo...