Technology

Simple script to compare files in two directories..

Here’s a small script to compare the files in two different directories on a Linux machine. The script uses MD5 checksum to compare the files.

#\!/bin/bash
prefix1=“/usr/directory1″ # First directory without trailing /
prefix2=“/usr/directory2″ # Second directory without trailing /
find \-L “$prefix1″ \-type f \| while read filename; do
name=“${filename#$prefix1*}”
sum1=“$(md5sum \-b ”$prefix1$name“)”
sum2=“$(md5sum \-b ”$prefix2$name“)”
if \[ “${sum1% \*}” = “${sum2% \*}” \]; then
echo “ok: $prefix1$name”
else
echo “not ok: $prefix1$name”
fi
done

Internet in the air..

I wrote ~2 years ago, about accessing the Internet, while I was flying at 35,000 feet in the air. Since then, the company that provided this service, Connexion, has declared bankruptcy and everyone pretty much wrote off the market for in-air Internet access. Looks like enough people want it 🙂 and several companies are reentering this market. This article at news.com claims that most of the US air-carriers will have some kind of broadband service available in the next 2 years. Say goodbye to the last “Internet free” place on earth 🙂

Save XP!!

While, I am writing about couples smooching over each other!! :), my buddy Ray is writing something meaningful. As he states, Microsoft is planning on ending sales of Windows XP on June 30 2008. While Vista, has a lot of cool features, none of them are compelling for businesses to make the expensive migration. Not only does the new operating system require extensive planning for the migration and training for the tech support teams, but businesses also have to consider the expense of training end users because the interface has changed so much.

And not to mention the 100 different (I am exaggerating!! 🙂 ) flavors of Vista that Microsoft has come up with to make the decision even tougher.

Sign the petition here . [UPDATE : Link has been corrected.. Thx Ray for pointing this out.]

Google does it again..

The almighty Google has come out with a new toy for me to play with :). I don’t claim, that I am a programmer by any means, but like to dabble in scripting now and then. So, I was really excited to see this new simple API from Google for creating charts. I can already imagine, how this can be used in generating some cool reports. Here’s my “Hello World” graph using the API.

Vinay Rocks

The code I used to generate this graph is

“http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250×100&chl=Vinay|Rocks&chtt=My+Hello+World”

Looks like some smart and entrepenuring programmer is already making some money out of this API :). Check out this link for a very cool and smart implementation of the API

http://lovegraph.thefootnotes.net/index.html

Tools of the trade : Site24x7.com

Anyone working in IT Operations, knows that numbers are really important :). Esp, numbers showing availability, downtime, response time etc. I have used, several tools and services during my career to capture these numbers, but have never come across a service that is cost effective and reliable at the same time. I discovered site24x7.com, while was evaluating some products from their parent company AdventNet.

Site24x7.com offers external monitoring for your key network components, at the fraction of the price charged by others in area. I wouldn’t put them on the same scale as Gomez or Keynote, but for they are very reasonable for the features they offer. Also, while they are lacking in the customer service area per se, they are very quick to add features based on feedback. I provided them (and I am sure several others) some feedback on adding a feature to have setup scheduled maintenance (so that it doesn’t skew with the availability numbers) for the services monitored and they added the feature in less than a month.

If you are looking, for a reasonably priced monitoring service, look no further..

Operational Tips : Password parameter changes in Group Policy

I am planning on sharing some of the “Ahh.. we should have thought of that” moments on this site as I run into them. First is to remind of me of my past mistakes, so that I can avoid them in future, and two is help other folks out. Here’s my first one..

We decided to change the password parameters in our companies group policy recently. The password expiration was changed to 60 days from 120 days and password complexity was enabled.  We thought this was a pretty straight forward change and wouldn’t get the helpdesk swamped with calls, since the new policy will take affect as the current passwords expire..

Wrong!!! AD checks the last time your password was changed and compares it to the password expiration time frame in group policy. And you could just imagine, the look our helpdesk folks gave the engineers when they got swaped with people calling them that they are being forced to change passwords and all the ones they used before don’t work.

Morale : Decrease the password timeout in intervals. i..e in our case, we should have decreased the expiration date 10 days at a time. That way, you minimize the impact the change.

HOW TO : Configure wireless NIC on Fedora 7.0

I decided to play around with Fedora to brush up on my Redhat skills. I have been using Ubuntu for some time, but wanted to see what the newly released Fedora 7.0 offers. With each new release, Linux is coming closer to becoming an operating system that a normal user can install and start using right away. Gone are the days of plowing through config files to get everything working. Thats why, I was pretty surprised when the wireless card in my laptop didn’t work with the default install. Here’s how I got the card to work in Fedora, using ndiswrapper (An opensource project that enables the usage of Windows drivers in Linux).

  • Install kernel headers by running “yum –install kernel-devel”
  • Install gcc (compiler) by running “yum –install gcc”
  • Download ndiswrapper from http://ndiswrapper.sourceforge.net (make sure to download the latest version)
  • Unpack ndiswrapper and run the following commands
    • make uninstall
    • make
    • make install
  • Download the windows drivers (.inf and .sys files) for your wireless card and copy them to a location on your harddrive
  • Change the working directory to the folder where the windows drivers have been saved
  • Install the drivers by running the following commands
    • ndiswrapper -i driver_file_name.inf
    • ndiswrapper -l
      • This command should show that the device has been installed and enabled. My output looks like this
        net5416 : driver installed
        device (168C:0024) present
  • Configure an alias for the wireless card by editing the /etc/modprobe.conf file and adding the line
    • alias wlan0 ndiswrapper
  • Configure NetworkManager to startup automatically by running
    • chkconfig –level456 NetworkManager on
  • Restart your machine and you can start using the wireless card by using the “NetworkManager” applet that starts when you log into the GUI.