Pages

Friday, October 1, 2010

KISS - Keep it Simple and Stupid

I am a regular blood donor. I donate blood at Sri Sathya Sai Super Speciality Hospital, Bangalore. In one of such occasion, the nurse had a problem in locating the vein. From that time onwards I was occupied in trying to find a solution that can solve this problem. I spent a good amount of time on the web looking for such a device, Also I used to go into "zombie states" - as described by my friends thinking about his problem. Then may be after a month I came across a solution in the web on this (http://medgadget.com/archives/2009/05/av300_portable_system_helps_find_hidden_veins.html).
 My whole thought process was very complicated. When I figured out this solution I was thrilled.
This is my experience of KISS

Past Actions - Future Impressions

In the year 2008 I had a chance to give a talk in the Tech Symposium on "Super Computing on Desktop - GPU". As part of this activity and since this Tech Symposium was the first of its kind being organized in my company, there were three mentors assigned to a group of participants. I can only remember two of the three persons. 


As part of my talk I decided to start it with a story "More like a real life incident". This was not welcomed by the Mentors (I guess it was my inability to narrate it properly). But I did not like this idea. And also I did not want to argue on this topic.


On the final day, I started my talk with a story. Finally it turned out to be a good one (More from the feedbacks I received).


So much about the background, Lets get to the point. It turned out that for a new project we had a new Program Manager. This guy was a bit tough for me to understand (I don't get to choose!). During my performance evaluation, I was surprised to hear from him that he had my first impression dating from the Tech Symposium event. "He was the one whom I conveniently avoided and forgot! He is the one who advised not to open the talk with a story!"  I never realized that such a small incident would carry great impacts for ones future!


This is a lesson I learnt the hard way!
PS: Later the same guy accepted that he had now changed his opinion about me after working for an year or so.

Wednesday, November 25, 2009

Resolve windows hostnames from linux

Edit the file /etc/nsswitch.conf

ensure that it contains a line hosts: files wins nis dns

Wednesday, November 18, 2009

Clearcase cheatsheet

The following information is from the website http://www.ibm.com/developerworks/rational/library/836.html



Use this "cheat sheet" as a quick reference and practical aid to efficent use of IBM Rational® ClearCase®. Tips, reminders, and expert advice from one of Rational's in-house ClearCase pros answer the most common user needs.
Views

How many Views do I need?
Generally, one per discrete task is a good idea, though this is not a requirement. Views should be regarded as "cheap" entities that are easily created and destroyed. Create one for each task you need to do and when that task is done, delete the view.
Dynamic versus Snapshot Views
ClearCase and ClearCase LT offer snapshot views as workspaces. Snapshot views work by copying versions of elements from VOBs to your computer. To see the latest versions of elements, you need to update your snapshot view periodically. An update operation copies the latest versions of elements from the VOB to your view.
ClearCase (but not ClearCase LT) also offers dynamic views. A dynamic view uses the Multiversion File System (MVFS) to provide immediate, transparent access to data stored in VOBs. When you work in a dynamic view, you do not need to copy data fromVOBs to your view; you always see the latest versions of elements. Dynamic views also provide advanced functionality such as build auditing and binary sharing.
How to create a Dynamic View
cleartool mkview -tag atag  storage-location

Where atag is the view-tag (the "name" of the view which should be a name that you can easily remember) and storage-location is the location of a place on a disk where the view can store information.
Alternatively, there is a simplified command:
cleartool mkview -tag atag -stgloc -auto

In this example, you don't need to specify a storage location, but rather this command enables you to use a storage location that has been set up by your ClearCase admin.
How to delete a Dynamic View
cleartool rmview -tag atag

Where atag is the view-tag of the view you want to remove.
How to create a Snapshot View
cleartool mkview -snapshot -tag atag -stgloc -auto apathname

Where apathname is the path to which you want your source code (work area) to reside. The -tag atag is optional - if you omit it, ClearCase will make one up based on your username and the workspace you specify in apathname.
How to delete a Snapshot View
cleartool rmview apathname

Where apathname is the path to where your source code (work area) resides.

Modifying files

Checkout
To modify an element you need to check it out. Do this with the following command:
cleartool co anelement

where anelement is the name of the file or directory you want to check out.
Checkin
Once you are happy with the changes you have made to a checked-out element, you can check it in with the following command:
cleartool ci anelement

where anelement is the name of the file or directory you want to check in. Once you check-in an element, the changes you made to that element are usable by everyone on your project.
Uncheckout
If you want to cancel a checkout, you can do so with the following command:
cleartool unco anelement

where anelement is the name of the file or directory you want to check in.

Creating new files

Creation
To create a new file, you can use whatever editor or command you would normally use to create the file. The new file will be a view-private entity until you take the next step to put it under ClearCase control.
Putting a file under version control
To put a file under ClearCase control you must first check-out the directory that will be containing the file, issue the command to tell ClearCase to put the file under version control, and then check-in the directory containing the new file. Here are commands to perform these steps:
cleartool co thedirectory
cleartool mkelem thefile
cleartool ci thedirectory

After this sequence is performed, the file thefile is still checked-out and can be modified further before you check it in.

Deleting elements
To remove an element you should use the cleartool rmname command. This command removes the name of the specified element from the directory in which it is contained. Similar to placing an element under ClearCase control, you must first check-out the directory containing the element to be removed, do the cleartool rmname of the element, and then check-in the new version of the directory. Here is an example:
cleartool co thedirectory
cleartool rmname anelement
cleartool ci thedirectory

After this sequence, anelement is no longer listed in subsequent versions of thedirectory. It is, however, still listed in previous versions of the directory. If, at a later date you want to re-add anelement to a new version of thedirectory (or any other directory), you can do so easily.

Renaming elements
Renaming an element is similar to deleting it. First you check-out the old directory containing the element, and you also check-out the new directory to which the element is to be moved. Then you use the cleartool mv command to perform the move operation. Be sure to check-in the old and new directories when you are done.
cleartool co .
cleartool co newdirectory
cleartool mv anelement newdirectory
cleartool ci .
cleartool ci newdirectory

Renaming an element is also accomplished using the cleartool mv command except the old directory and the new directory are the same.
cleartool co .
cleartool mv anelement anewname
cleartool ci .

In subsequent versions of the directory, the name anelement will not appear, having been replaced by anewname but the name anelement will still appear in prior versions of the directory. Both the names anewname and anelement will still refer to the same element; only the name associated with the element in the directory will have changed.

Getting information

More about Views
What View am I in?
At any given time you can tell what view you are in by issuing the following command:
cleartool pwv

pwv means "print working view" in the tradition of the UNIX command pwd for "print working directory"
What is my "config-spec"?
Recall that a configuration specification (config-spec) is the set of rules that tells ClearCase what configuration of elements you want to work with. You can see that set of rules by issuing the following command:
cleartool  catcs

How do I change my config-spec?
You can edit your config-spec by issuing the following command:
cleartool edcs

Your favorite editor , as specified by the environment variable WINEDITOR (first choice), VISUAL (second choice), or EDITOR (third choice) will be invoked for the editing operation. If none of these environment variables is set then vi will be invoked for the editing operation on UNIX systems and Notepad will be invoked for the editing operation on Windows systems.
About files/directories

What is checked-out and to whom?
If you want to see who has what checked-out, you can use the cleartool lsco command. This command has a number of possible arguments to use depending on the specific information you want. Here are some common ones:
cleartool lsco

Lists all checkouts of elements in the current directory.
cleartool lsco anelement

List checkout information about the element anelement.
cleartool lsco -recurse

Lists all checkouts of elements in the current directory and below.
cleartool lsco -cview

Lists checkouts of elements in the current directory that are checked-out to the current view.
cleartool lsco -cview -recurse

Lists checkouts of elements in the current directory and below that are checked-out to the current view.
cleartool lsco -me

Lists checkouts of elements in the current directory that the current user has checked-out.
cleartool lsco -user fred

Lists checkouts of elements in the current directory that the user with login id "fred" has checked-out.
Please refer to the ClearCase Reference Manual for more detailed information about the cleartool lsco command.
What is the change history of this file/directory?
If you want to see the change history associated with a particular element, you can use the cleartool lsh command.
cleartool lsh anelement

Where anelement is the name of an element under ClearCase control
What versions of what files/directories am I looking at?
To see exactly what versions of elements are being projected to you by your view and why, you can use the cleartool ls command.
cleartool ls

What are the differences between this version of a file/directory and a different version?
To view the differences between the versions of an element visible in your view and another version of the element you can use the cleartool diff command.
cleartool diff -g -pred anelement

Graphically presents the differences between the version of anelement selected by your view and it's immediate predecessor version.
cleartool diff -g anelement anelement@@/main/5

Graphically presents the differences between the version of anelement selected by your view and version 5 on the main branch of anelement.
You can also use this command without the -g option to present the difference information to you textually rather than graphically.
See the cleartool diff entry in the ClearCase Reference Manual for more detailed information on these commands.
What does the version tree look like for this file/directory?
To view a graphical representation of the version tree associated with an element you can use the xlsvtree command.
cleartool lsvtree -g anelement

You can view a textual representation of the version tree associated with an element with the cleartool lsvtree command.
cleartool lsvtree anelement

I want more information about this element?
You can get more detailed information about a particular element with the cleartool describe command.
cleartool describe anelement

Lists information about anelement such as the version selected by your view, who created it and when, the comment associated with the version, the element type and the predecessor version.

Resources
Learn
  • To learn more about IBM Rational products, visit the developerWorks Rational zone. You'll find technical documentation, how-to articles, education, downloads, product information, and more.

  • To get your team up to speed on IBM Rational product technology as quickly as possible, IBM Global Services offers a variety of classroom training. Attend a public session, or arrange to have the course delivered at your site. If you prefer a self-paced, online training experience, there are a variety of web-based training modules available.

  • Read about the latest release of the IBM Rational Software Delivery Platform in the developerWorks article: Accelerating global software delivery.

  • Learn more about how to benefit from IBM Rational products and technologies in The Rational Edge e-zine.

  • Browse the technology bookstore for books on these and other technical topics.

  • Learn about upcoming events; including webcasts, seminars, trade shows, user group meetings, and the IBM Rational Software Development User Conference.

  • Whitepapers, analyst reports, and datasheets for IBM Rational ClearCase are available here.

  • IBM Rational software has helped thousands of companies worldwide achieve success in their software development efforts. Read about some of them here.

Get products and technologies
  • Download this information as a printable brochure in pdf format.

  • Find more resources for ClearCase users and administrators in the ClearCase area of the developerWorks Rational zone, including articles and whitepapers, plug-ins, scripts and triggers; and links to training, discussion forums, product documentation and support.

  • Product manuals, installation guides, and other documentation are available in the IBM Rational Online Documentation Center.

Discuss
  • The ClearCase discussion forum on developerWorks is a great place to post questions and get answers about configuration management and UCM with IBM Rational ClearCase.

About the author
Tom Milligan
Tom J. Milligan is a software configuration management specialist in IBM Rational's worldwide technical marketing department. Previously, as a member of Rational's western region consulting organization, he assisted Rational ClearCase and Rational ClearQuest customers. He has also worked in development roles ranging from programming to QA, tools acquisition, and system administration.

Enable display on 1920x1200 Monitor

  • As root from the terminal console execute the command

gtf -v 1920 1200

The following lines are displayed:

# 0x1920 @ 1200.00 Hz (GTF) hsync: 6780.00 kHz; pclk: 0.00 MHz

Modeline "0x1920_1200.00" 0.00 0 0 0 0 1920 1921 1924 5650 -HSync +Vsync


  • Copy the line begining with Modeline and insert it in the file /usr/X11/xorg.conf
under the Monitor section
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "CRT-1"
HorizSync 31.5 - 90.0
VertRefresh 59.9 - 60.1
ModeLine "1920x1200_60.00" 193.16 1920 2048 2256 2592 1200 1201 1204 1242 -hsync +vsync
Option "DPMS"
EndSection


  • Reboot / restart the xserver

Linux - Xserver recovery

Did you ever come across a situation wherein you played with the display settings and the next time you reboot to the system the Display is blank and you were helpless but to stare at the blank monitor?

Solution:
  • Press CTRL+ALT+F1 or CTRL+ALT+F2
  • Hit the Enter key couple of times..
  • Provide root credentials
  • Delete the file /usr/X11/xorg.conf
  • Reboot the system
Viola! The display is back. with a new xorg.conf file.

All with VNC

How to enable VNC on linux machine (RedHat) with Display 0

Edit the file /usr/X11/xorg.conf

Add the lines
In the "Modules" section add
SubSection "vnc"
Option "Desktop" "My workstation"
EndSubSection

In the "Screen" Section add
Option "SecurityTypes" "None"

Note you can enable various security types. Easiest is None! :)