Wednesday, December 19, 2007

We have been fooled in school

I was shocked to hear the news that "Hindi is not the national language of India". We all have been fooled in school, in our NCERT text books, stating that Hindi is our national language.

India as a nation comprises of various languages and cultures. Every individual represents his language and culture likewise language and culture are symbols of ones identity. India considers itself a federal republic because it comprises of different states which have their own language and culture. There was a strong cultural and administrative reason to form the states based on linguistic affiliation, because of the vast diversity in culture and language. Thus each state has its own official language which mostly differs from that of other states'. That language is the lifeline of the people of state and it represents its culture, since language is the media for communication and inheritance of culture.
Hindi was accepted as official language in some states and it represented the culture of only those states. Nowhere in the constitution is Hindi mentioned as the "National language". According to Indian Constitution, 22 languages are accepted as scheduled languages. Among these 22 languages a single language does not represent India's culture in its entirety. A situation where a single language can represent India's culture can only be made possible by suppressing India's diverse cultures. Hence Hindi is NOT the "National Language" of India.

Many of the languages like Bhojpuri, Pahaadi, Rajasthani, Haryanvi, etc have been systematically reduced to "dialects" of Hindi. Many other languages like Punjabi, Marwari, Gujarati,Tamil, Telugu, Kannada, Bengali, Marathi have lost their entertainment industries and are happy entertaining themselves in Hindi, an alien language to most people living in those states. Students in most of the states have been brainwashed that Hindi is the national language of India. Loyalty and patriotism to the nation has been reduced to acceptance of Hindi as the sole "National" and "Link" language. Any Indian having a different opinion on this is branded as not being nationalist enough! A bigger problem this has created is the false sense of superiority in the Hindi speakers. Their expectation that the whole of India speaks Hindi, their reluctance to learn the language of the place they settle in, arrogance that they display in their interaction with fellow non-Hindi speaking Indians is the biggest threat to national integration.

Please be aware of this fact and make sure to speak back if someone speaks superior of Hindi and inferior of your local language.

Tuesday, October 9, 2007

Some F1 Facts

* F1 car is made up of 80,000 components, if it were assembled 99.9% correctly, it would still start the race with 80 things wrong!

* When an F1 driver hits the brakes on his car he experiences retardation or deceleration comparable to a regular car driving through a BRICK wall at 300kmph!!!

* F1 car can go from 0 to 160 kph AND back to 0 in FOUR seconds!!!!!!!


* F1 car engines last only for about 2 hours of racing mostly before blowing up on the other hand we expect our engines to last us for a decent 20yrs on an average and they quite faithfully DO....that's the extent to which the engines r pushed to perform...


* An average F1 driver looses about 4kgs of weight after just one race due to the prolonged exposure to high G forces and temperatures for little over an hour (Yeah that's right!!!)


* At 550kg a F1 car is less than half the weight of a Mini.


* To give you an idea of just how important aerodynamic design and added down force can be, small planes can take off at slower speeds than F1 cars travel on the track.


* Without aerodynamic down force, high-performance racing cars have sufficient power to produce wheel spin and loss of control at 160 kph. They usually race at over 300 kph.


* In a street course race like the Monaco grand prix, the down force provides enough suction to lift manhole covers. Before the race all of the manhole covers on the streets have to be welded down to prevent this from happening!


* The refuelers used in F1 can supply 12 liters of fuel per second. This means it would take just 4 seconds to fill the tank of an average 50 liter family car. They use the same refueling rigs used on US military helicopters today.


* TOP F1 pit crews can refuel and change tyres in around 3 seconds. It took me 8 sec to read above point


* During the race the tyres lose weight! Each tyre loses about 0.5 kg in weight due to wear.

* Normal tyres last 60 000 - 100 000 km. Racing tyres are designed to last 90 - 120 km.

* A dry-weather F1 tyre reaches peak operating performance (best grip) when tread temperature is between 900C and 1200C.(Water boils boils at 100C remember) At top speed, F1 tyres rotate 50 times a second.

And that's not Magic…. Its only the Power of Human Imagination…

Courtesy: Naga

Monday, October 8, 2007

Happy Days Review!!!

For people who are wondering, what is "Happy Days", its a youthful telugu movie worth commenting on, as it will touch every ex-college student.
I was not that interested to watch this movie, but by chance went to the theater. To my surprise the movie was full. but we managed 10 INR tickets, get set to watch the movie from the third row.

The movie doesn't have any special story as such. Happy days means that your college days are your most happy days. The movie starts with the freshers welcome and ends on the farewell.
The movie was so much fun to watch, just because it made me remember most of my college days.
The same well known dialogue, "You mighty mighty senior, me dirty dirty junior, May sir I sir please sir know sir your sir name sir sir sir". And yeah our Tek Salute too was there. And thirdly, the assignments were written for the seniors.

Next, it was formation of gangs in a class. One character portrayed to be selfish than friendly. One, who is a son of MLA, one normal guy who has to listen to his dad's lecture everyday. And yeah, their counterparts in girls.
I personally liked a person named Tyson. He on his first day would ask a senior, about the seniors own girl friend.
Let me not elaborate more than this, even though there is nothing much to elaborate.
If you are fresh out of college and if you miss your college life, just go for this movie and relinquish your college days which are far from rewindable now.
After watching this movie, you will surely appreciate the title as it makes a lot of sense and to prove it, ask yourself.
PS: Prakash Raj has got the rights for this movie in Tamil.

Thursday, July 26, 2007

APJ Abdul Kalam - What a Leader!


There are so many resons for me to be proud of being an Indian. One of them is to have a leader like Dr APJ Kalam. He is the perfect example of how a leader should be. His vision, goals and thoughts are so motivating. He always makes sure he is not a politician, but one among us.


Some lines from his famous speech in Hyderabad.


Dr. APJ Abdul Kalaam's speech in Hyderabad
"I have three visions for India. In 3000 years of our history, people from all over the world have come and invaded us, captured our lands, conquered our minds. From Alexander onwards, The Greeks, the Turks, the Moguls, the Portuguese, the British, the French, the Dutch, all of them came and looted us, took over what was ours. Yet we have not done this to any other nation. We have not conquered anyone. We have not grabbed their land, their culture, their history and Tried to enforce our way of life on them. Why? Because we respect the freedom of others.


That is why my first vision is that of FREEDOM. I believe that India got its first vision of this in 1857, when we started the war of Independence. It is this freedom that we must protect and nurture and build on. If we are not free, no one will respect us.
My second vision for India's DEVELOPMENT, For fifty years we have been A developing nation. It is time we see ourselves as a developed nation. We are among top 5 nations of the world in terms of GDP. We have 10 percent growth rate in most areas. Our poverty levels are falling. Our achievements are being globally recognized today. Yet we lack the self-confidence to see ourselves as a developed nation, self-reliant and self-assured. Isn't this incorrect?


I have a THIRD vision. India must stand up to the world. Because I believe that, unless India stands up to the world, no one will respect us. Only strength respects strength. We must be strong not only as a military power but also as an economic power. Both must go hand-in-hand. My good fortune was to have worked with three great minds. Dr. Vikram Sarabhai of the Dept. of space, Professor Satish Dhawan, who succeeded him and Dr.Brahm Prakash, father of nuclear material. I was lucky to have worked with all three of them closely and consider this the great opportunity of my life.I see four milestones in my career:

For the full speech please click here.

It is worth reading many times.

Salutations to our best ever Indian President. We will make your dreams come true because we too are having the same dream. And as you said, You have to dream before your dreams can come true.

Jai hind!!!

Tuesday, July 24, 2007

European Grandprix 2007.

The European grandprix last sunday was a dramatic event, with so many incidents happening all around the track, during the entire span of the race.
Some of the action and trauma:
  1. Hamilton crashes in qualifiers.
  2. Raikonen's Ferrari crawls to a halt in a stage where he was driving great.
  3. Markus Winkelhock making his debut for Spyker-Ferrari had the wet tyres before the start of the race and during the rain time when everyone were in pits to change tyres, this guy was leading the race for almost 2 laps, until the safety cars arrived. What a momemt for a spyker driver making his debut and still manages to lead the race for 2 laps.
  4. Kimi going into pits to change wet tyres, but suddenly comes out and continues the race. He was actually was giving way for Massa to change tyres as they were very close to each other. Kimi would have wasted nearly 5-6 seconds in that.
  5. A series of clashes, and the only person to slightly escape was Hamilton during rain.
  6. The best moment came in the last 10 laps when the rain God made it clear to the Ferrari team they are not going to win. Fernando Alonso was nearly 6 seconds behind Massa, but overtook him after a heart-pounding chase. What a great sight it was. To provide you with the same pleasure, here is the video of Alonso overtaking Massa.




  7. After the race Massa had lots to talk about Alonso, obviously he felt it was unacceptable for Alonso to overtake him so closely. but as far as Alonso was concerned, he had it. Fernando Alonso, The European Grand Prix Winner.

Goran Ivanisevic...



I like watching international Tennis mathces very much. Tennis is a great sport which encapsulates a person's capability to show aggression and to stay cool. And whenever I think of Tennis, the first name that comes to my mind is Goran Ivanisevic ( why not Federer? ;-) ). I am a die hard fan of Ivanisevic, right from the day I started watching Tennis.


His 2001 Winbledon campaign was too memorable. Anybody in this world who knows about tennis will know this guy, for his great serves. He has a great service and I have seen many matches where he has taken a game with four aces in a row. Goran, along with his serve is a masterpeice, though his game is not extraordinary. He is very active on-court and does lots of things that people usually do off-court.Here is a sample video of what happened in a match between Goran and Rafter.



Monday, June 25, 2007

Sivaji - My Personal Review

Finally "The BOSS" hit the screens. Its a pity every movie gets dubbed in telugu. Sivaji released across 40 theatres in Hyderabad amongst which there was just one show at 8:45Am in just one theatre. What a pity...
I booked the ticket and was off for the show on Tuesday(5th day). The first time I wathced the movie, I felt something was missing. May be I was'nt in a good mood as I had bunked the training and was thinking of what the trainer is going to say.
I had booked again on Sunday to wathc the movie with my parents in the same theatre, and this time Sivaji Rocked.
For people who said the story was not strong, I wanted to ask what was wrong with the story. It was a good theme, with great screenply, with enough Rajni comedy and action. I want just one thing out of a Rajni movie "ENTERTAINMENT", 3 hours just flew both the times I saw the movie.
Superstart was looking stunning, and of course was Shriya Saran.
The only thing I felt is there is no need to spend so much for thalaivar's songs. Its enough if he is present in the song, adhu podhum. Set, location ellam no need. But, hats off to Athiradee and Oru koodai sunlight visuals. Vaaji vaaji also was very good.
And I have no words to describe the second half.
Here is a small conversation between Rajni and Suman in tea kadai:
suman's assistant : aiyaa ungala koopduraaru.
rajini : ungoyyaava ingey vara sollu.
rajini : goyyaa.ukaarunga.unoda books,hard disk,documents,panam, pinaami per la sothu,etc nu kanakula kaataama 200 crores black money iruku.
suman : adhuku enna ipo
rajini : bajji saapdu. saapdunga sir
rajini : enaku adhula paadhi venum..... aaah bajji la illai.andha 200 kodi la
suman : apdi illainaa
rajini : motha panamum income tax office kulla poidum. akkada choodu. remo maamaa.polaaam right.........hold on...un 200 kodiyum muzhusaa nakkitu poidum. cease,penalty,interest nu arrest variakum pogum... potu koduthadhuku enaku 10% 20 kodi reward kidaikum.epdi paathalum en business success dhan.
suman : velu, commisioner ku phone podu.
rajini : aadhi. nee onnum comedy kemedy pannaliye. adhu karupu panam chellam.complaint koduka mudiyadhu.thirudanuku thel kotnaa madhiri pothinu irukanum.
suman : nee thani aalu.en kaila govt eh iruku
rajini : en kaila un kudumiye iruku.... repeatu.......hold on... andha 100 kodi piraanji vai.engey epo vaangikurenu adutha phone la solren.tea saapdu.. thalaivaa evlo aachu
tea kadai payan : 20 rubaa anney
rajini : aadhi.pay pannidu.andha 100 kodi la kazhichukalaam


vaadaa vaadaa vaangikoda vaaila beeda potukodaa...............


WOW!!!, too good and only Rajni can do this...
A speacial mention to Suman for his good performance..."Adhiseshan na pottu vechitu pongal saapadravannu nenachiya" was his best one liner.
And yes, finally, "THE BOSS, MOTTA BOSS" was the best part, Rajni's style ans ARR's rap for motta rajni was more than enough to satisfy everyone.
Last but not least, my parents enjoyed the moive so much and they were happy after watching a movie in theatre after 2 years( last one was chandramukhi ).
Thats the power of superstar, he will make everyone go for his movie and enjoy it.
Am sorry to say this but have to as a fan of superstar, People who say the movie is not good and there is no story(including me whne I saw first time), Go to hell and don't be beaten up by a Rajni fan, due to your jealously towards his fame.

Wednesday, June 13, 2007

The Maestro

This was in draft for a long time, posting it only now. Then too, its worth it.
A week back, I watched "Cheeni Kum", a movie containign a seven song album from the maestro Ilayaraja. He cannot get more beter. what wonderful songs and a perfect selection of asking "Shreya" to use her voice box. Am just overwhelmed and the feel of listening to the songs make me happy. People who can make others happy are Gods like our super star. Ilayaraja is definitely one of them.
The best number from the album, Baatein Hawa, is posted




I jus dunno what I am writing

Am so fed up with the training sessions am attending that I decided I would write some crap here, instead of thinking of what to do.
Lets talk about life, is what I feel now. LIFE, I sometimes imagine why people are so desperate to spoil the peace or to do something out of the world in such a short span of say 65-80 years.
I sometimes feel, life is huge, there are so many days you remember to cherish and wai to occur. but on the contrary, a weird feeling also develops that may be life is too small, which drags me into a position where I feel like spending most of the time available. This thought is the reason sometimes for me waking up early, making me think whether am wasting some precious time sleeping. I know its weird, but am bored in this classroom and I have decided am gonna blaber, and u guys are gonna read ahead.
"Saagara Naal Therinji Pochu na Vaazhra Naal Naragam Aayidum, Sandhosham than Mukkiyam", is the line from the trailer of Sivaji- THE BOSS. And its quite true.
Alarmingly, I still donot understand the reason for most of the problems that becomes the part of life. Everyone knows the span of life, why not share then???
the trainer has left us, we can go for lunch, so enough of my vrap. Wil talk about Indian Democracy in my next post, Chal Seeya...

Tuesday, April 10, 2007

Hurray!!! We prepared Veg Pulao

There you go, our story( me and srihari) of pulao preparation.
It was around 6:45 in the evening, whne we decided to prepare veg pulao for dinner. Planning to start at 8:30, we were in spencers daily at 8:40 sharp. We purchased basmathi rice( forgot the brand) , garam masala, ghee, finger chips and were off to vegetable shop getting beans, green peas, tomato, onion, carrot,chilies, karuvepplai, kothamalli and of course curd.
Here is how we prepared Pulao:
1) Soak basmathi rice(2.5 cups) in water.
2)Meanwhile cut all vegetables, cut my finger too :-).
3) Keep the vegetables( beans, green peas and carrot) in presure cooker. Wait for three whistles.
3) Put ghee in pan, add kadugu, onion, chillies and tomato, and fry till onion gets pink.
4) Add 1-1.5tsp garam masala.
5) Add chilli powder, salt.
6) Add a cup of water
7) Keep the gas in "sim" and colse the pan. Switch off gas after 5 mins.
8) Now in rice cooker ( electric) add 2.5 cups basmati rice, 5 cups water, the vegetables and the masal prepared in pan.
9) Nicely mix the, add a bit of salt and let it cook.
10)Switch off cooker after 20-25 mins. Wait for 10 mins for the rice to get better.
11) Serve with onion Raita.
Raita is simple to make( srihari made it, was too good ). Jus add salt, onion, small amount of water, chilies and chilli powder.
We had it stomach full( 11 PM) , and gave some to our neighbours, who were very happy to eat high quality veg pulao and onion raitha.
KUDOS DK and SRIHARI!!!

Monday, March 26, 2007

Pro's and Con's from the World Cup

Its good that India is out of super eights, for Indian Cricket, in general for cricket.
Pro's from the loss:
  • India has learnt it clearly does not deserve a place even in the top eight
  • Average, strike rate and whole bunch of runs and so called reputation is no longer a statistics to decide fate of the team.
  • Sponsors, ICC who, according to me give more importance to money than the game, would have learnt some lesson.
What according to me will be done by BCCI.
  • They would drop the coach( which sounds ok as his contract expires).
  • They may drop the captain( according to me is not a good decision).
  • Future prospects like Uthappa, Dhoni would be removed from the team, and old but reputational so called super starts will be retained.
  • Virendhar Shewag will be in the team, come on guys, he scored a great century against a great team, so Veeru back to form.
  • They would again hyphe the practice sesions saying the team will practice along with Indain Navy this time :-).
What would I do if I was the borad president( Konjam over than )
  • Drop all the batsmen except for Yuvraj(feilding),Uthappa( he is playing his first world cup, when people having 10k runs cannot deliver, why drop him? )
  • Bring back your fielding heros, Kaif, Raina and other youngsters who are brilliant in the feild.
  • Make bowlers who are more aggressive like Sreesanth to play every game.
  • Just send this team across one series and see how it works out.( anyways even if we send the normal team, they are going to lose :-) )
  • This will put pressure on senior players to perform, and their performance should be credited only if they do so outisde India.
  • For some reason, I would Retain Dravid, who is modest, good overseas and a gentlemen role model.
I don't mean to say the senior players would never get a chance to play, its just to create some pressure on them to perform.
Everything I spoke here is impossible, as this is India. If we had this much courage in decision making,we would have been playing super eights in the carribean right now...

Friday, March 23, 2007

Its only a game - too good article

Courtesy: Cricinfo

This piece was written before it was established that Bob Woolmer was murdered. We don't yet know for sure why or how Bob Woolmer died. We shouldn't rush to judgment; it is still possible that it was an accident. It is equally possible he was murdered. And, while conspiracy theorists are working overtime on the motives, it is also quite possible that we will never know the full truth.

And in the event of this not being an accident, it is quite likely that Woolmer was a victim of cricket's seamier side. Either it was the stress, induced by the most obscene and blind expectations of cricket fans who brook no failure, or he was killed by people who felt let down or had something to fear.

Either way, it should serve as a wake-up call to those who run cricket, and those who profess passion for it. If a game starts taking lives, there is something sickeningly wrong with it. But this is not really about Woolmer. We didn't need someone to die to awaken us to a problem. The signs have always been there, it's just that most of us have found it expedient to ignore them. Commodification has been chipping away at the soul of cricket for years, and now the game is the danger of losing its head.

Take the current predicament of this World Cup as an example. The major stake-holders in the tournament - the television channels and major sponsors - risk losing millions, either in cash or kind, if India go out in the first round. They are not the number one team in the world by a mile. Not even number two. They are ranked sixth in the ICC team ratings and, while that might not always be the best indicator of a team's worth, they have not won a competition of note outside the subcontinent since 1985. Yet the fate of the World Cup rides on them. It's a disaster waiting to happen.

Cricket has acquired a dangerous obsession with money, to the extent where it is not a question of a game needing the money to survive or grow but making as much as possible at any cost.


The reason for this is not hard to comprehend. Cricket has acquired a dangerous obsession with money, to the extent where it is not a question of a game needing the money to survive or grow but making as much as possible at any cost. Players have been ground to dust and cricket, the one-day variety in particular, has been divested of any meaning and consequence. It would seem that the administrators have learnt very little from the match-fixing scandal, which was as much a result of greed as of a surfeit of matches that meant little to the players.

Meanwhile, the Indian administrators have managed to market a massive captive television audience to acquire financial muscle that relies little on the capabilities of the national team. As a result the cricket economy has gone ahead of the game, which is struggling to catch up.

It's an economy that relies more on projection and hype than reality. SetMax, the entertainment channel owned by Sony, paid nearly 40 % of the total cost of the ICC rights in the hope of recouping it from advertisers. Luckily for them, India made it to the final of the last World Cup and one Champions Trophy. But that was clearly not enough and Sony didn't even bother to bid for the next set of rights, which have been won by ESPN-Star for US $1.1 billion.

ESPN-Star is a joint venture between Disney and NewsCorp, but there is little doubt which television audience they are banking on. It is an unhealthy dependence. So much should never depend on the performance of one team. Apart from putting unfair pressure on the players -- it must take a lot for the Indian players to play normally in such an abnormal situation -- it leaves the cricket economy dangerously imbalanced and prone to huge risks.

The passion of the fans is the biggest strength of cricket in the sub-continent - but it is also its weakness, particularly in case of India and Pakistan. Sri Lankan fans are far more stoic about their team's fortunes and far more accepting of failure, whereas in Bangladesh they are grateful for every little or big victory, be that of the team or individual. But in India and Pakistan, the passion borders on frenzy. As an Indian, I would like India to win the World Cup. But it might not be such a bad thing for cricket if they were to be knocked out in the first round


In India it is brazenly and cynically fueled by an increasingly sensationalist and populist mass media, which treats cricket as one of the biggest baits to attract advertisers. Instead of providing perspective and being the voice of reason, the media feeds the frenzy and cashes in on it. Stars are built up and decimated. Exaggerated glorification is matched by proportionate vilification. So cricketers are either to be worshipped or denigrated. There isn't a middle ground, a measure of reality, or a sense of proportion.

The reality is that India reaching the World Cup final would be an overachievement. Australia and South Africa possess superior teams, New Zealand have more balance and depth and Sri Lanka are the most improved team in world cricket. India have proven, but ageing, batsmen, a bowling attack that's susceptible to pressure and poor fielders. To be a fan is to dream. But to many Indian fans the dream is the reality.

Nationalism is the bedrock of cricket. But you can't call yourself a true fan if the sight of 18-year old Tamim Iqbal charging down pitch to belt Indian quick bowlers brought you no thrill. Yes, India played below themselves, but every cricket match has a winner. To be unable to comprehend, and appreciate, this runs against the spirit of the game.


Yes, India not making past the first round would be a huge setback. But it would be accorded the status of a national calamity. It will be discussed in Parliament. Television channels will conduct inquests. Effigies will be burnt, cricketers' homes will be attacked, and these will be gleefully publicised. A couple of months ago, Greg Chappell was slapped on the back by a man in Bhubaneswar seeking his fifteen seconds of fame. He was obliged. It could get worse. Someone could get killed. Perhaps someone has already been killed.

As an Indian, I would like India to win the World Cup. But it might not be such a bad thing for cricket if they were to be knocked out in the first round. Cricket needs a reality check. It has an unhealthy, and unsustainable, business model that relies primarily on an increasingly delusional and one-dimensional fan-base. The bubble has to burst for a semblance of sanity to be restored. We must learn to once again enjoy cricket as a game.

Thursday, March 22, 2007

Dynamic Tracing in sun Solaris - DTrace

A simple document I prepared for understading DTrace Probes...


What is DTrace?

DTrace is a comprehensive dynamic tracing facility that is built into Solaris and can be used by administrators and developers to examine the behavior of both user programs and of the operating system itself. With DTrace you can explore your system to understand how it works, track down performance problems across many layers of software, or locate the cause of aberrant behavior. It is safe to use on production systems and does not require restarting either the system or applications.

DTrace Overview

DTrace dynamically modifies the operating system kernel and user processes to record data at locations of interest, called probes. A probe is a location or activity to which DTrace can bind a request to perform a set of actions, like recording a stack trace, a timestamp, or the argument to a function. Probes are like programmable sensors scattered all over your Solaris system in interesting places. DTrace probes come from a set of kernel modules called providers, each of which performs a particular kind of instrumentation to create probes.

Project Objective

The major focus from the perspective of a project would be to
  • Provide a real-time FAQ answering questions as per request.
  • To solve common operational problems faced by Back Office.
  • To provide appropriate resons for aberrant behavior.
To sum up, the tool should act as a perfomance analysis tool helping Sun Solaris 10 users know where they are stuck and identify the internal details of their processes running.

Basic DTrace Functions

  • Examine the behavior of user programs and the Solaris OS and quickly identify the root causes of system and application bottlenecks.
  • Highlight trends and patterns to tune systems for best performance.
  • Track down performance problems across many layers of software.
  • Locate the cause of aberrant behavior.
  • Write reusable scripts for common or complex routines.

How to use DTrace?

DTrace includes a new scripting language called D which is designed specifically for dynamic tracing. With D it is easy to write scripts that dynamically turn on probes, collect the information, and process it. D scripts make it convenient for users to share their knowledge and troubleshooting methods with others

Introduction to D Scripts

Template

probe description
/predicate/ { actions }

Probe Description

provider:module:function:name

  • Provider: The name of the DTrace provider that is publishing this probe. The provider name typically corresponds to the name of the DTrace kernel module that performs the instrumentation to enable the probe.

  • Module: If this probe corresponds to a specific program location, the name of the module in which the probe is located. This name is either the name of a kernel module or the name of a user library.

  • Function: If this probe corresponds to a specific program location, the name of the program function in which the probe is located.

  • Name: The final component of the probe name is a name that gives you some idea of the probe's semantic meaning, such as BEGIN or END.

Predicate A predicate can be any D expression. Below are a few examples. The action is executed only when the predicate evaluates to true.

Actions The action section can contain a series of action commands separated by semi-colons (;)

Compilation and Instrumentation

  • How DTrace Command Executes? When you use the dtrace command you are invoking the compiler for the D language. Once your program is compiled, it is sent into the operating system kernel for execution by DTrace.There the probes that are named in your program are enabled and the corresponding provider performs whatever instrumentation is needed to activate them.
  • What about the Performance? All of the instrumentation in DTrace is completely dynamic: probes are enabled discretely only when you are using them.No instrumented code is present for inactive probes, so your system does not experience any kind of performance degradation when you are not using DTrace. Once your experiment is complete and the dtrace command exits, all of the probes you used are automatically disabled and their instrumentation is removed, returning your system to its exact original state. No effective difference exists between a system where DTrace is not active and one where the DTrace software is not installed.
  • Where does DTrace run and why should we prefer DTrace? The instrumentation for each probe is performed dynamically on the live running operating system or on user processes you select. The system is not paused in any way, and instrumentation code is added only for the probes that you enable. As a result, the probe effect of using DTrace is limited to exactly what you ask DTrace to do: no extraneous data is traced, no one big �tracing switch� is turned on in the system, and all of the DTrace instrumentation is designed to be as efficient as possible. These features enable you to use DTrace in production to solve real problems in real time.
  • Are D-scripts safe? DTrace D programs are compiled into a safe intermediate form that is used for execution when your probes fire. This intermediate form is validated for safety when your program is first examined by the DTrace kernel software. The DTrace execution environment also handles any run-time errors that might occur during your D program's execution, including dividing by zero, dereferencing invalid memory, and so on, and reports them to you. As a result, you can never construct an unsafe program that would cause DTrace to inadvertently damage the Solaris kernel or one of the processes running on your system.These safety features allow you to use DTrace in a production environment without worrying about crashing or corrupting your system. If you make a programming mistake, DTrace will report your error to you, disable your instrumentation, and you can correct your mistake and try again.

DTrace Limitations

  • Dtrace is not a good tool for post-mortem analysis. For example, one problem frequently encountered in Networking is the "where did my packet get queued up?"
  • dtrace will not be able to directly analyze the sequence of events that led to a memory leak or reference-count leak after the leak has occurred.

DTrace Code Snippets

The pid Provider

  • Here is the D script you can run to print all the functions that process id 1234 calls
/* The above line means that the script that follows needs to be
interpreted using dtrace. D uses C-style comments. */
pid1234:::entry
{}

You can run .d files using the command #dtrace -s file.d

  • The following example adds aggregates in the script you are developing to see a summary table of user functions
 pid1234:::entry
{
@count_table[probefunc]=count();
}

This script will collect information into a table and will continue to run until you press ^c (Control c). Once you stop the script, DTrace will print out the table of information. Notice that you do not need to write any code to print the table. DTrace automatically does this for you.

  • This script can easily be modified to collect a table with function and library name by changing the index to probemod, probefunc
 pid1234:::entry
{
@count_table[probemod,probefunc]=count();
}

  • Find how much time is being spent in each function. This can be done through the built in variable timestamp. You can create probes in the entry and return of the functions and calculate the time spent by the difference in timestamp from entry to return. The timestamp variable reports time in nanoseconds. Here is the modified script
pid1234:::entry
{
ts[probefunc] = timestamp;
}

pid$1:::return
{
@func_time[probefunc] = sum(timestamp - ts[probefunc]);
ts[probefunc] = 0;
}

Note that the ts[] is an array, and D has automatically declared and initialized it for you. It is good practice to save space by setting the variable to 0.
  • How to monitor a process from the time it starts until it ends. DTrace allows you to do this using the $target variable and the -c option. This script will count the number of times libc functions are called from a given application.
pid$target:libc::entry
{
@[probefunc]=count();
}

Save this script as libc_func.d and run it.

# libc_func.d -c "cat /etc/hosts"

You can easily replace "cat /etc/hosts" with the command of interest.

Sysinfo Provider

  • The following script counts the number of times various processes get to run in the CPU. Note that the sysinfo:::pswitch probe fires when a process is switched to run on the CPU. Remember to press ^c (Control c) after a few minutes.
sysinfo:::pswitch
{
@[execname] = count();
}

Syscall Provider

This is probably the most important provider to learn and use because system calls are the main communication channel between user level applications and the kernel. Knowing which system calls are being used among other information establishes metrics of system usage and identifies possible misbehavior. With the syscall provider you can easily identify who executes what and how much time a certain operation takes, helping you to identify the root cause of system misbehavior.

  • Script to find the stack trace when the program makes the write system call. Note that you need to run this with the -c option.
syscall::write:entry
{
@[ustack()]=count();
}
  • To list all the occurrences of the probe when it was fired and give information about the system calls at entry into the system that are performing a close system call, use the following script:

# dtrace -n syscall::close:entry

  • To start to identify the process which sent a kill signal to a particular process, use the following script

syscall::kill:entry
{
trace(pid);
trace(execname);
}
  • To determine how much time your webserver is spending at read, use the following script. This script can easily be modified for other processes
BEGIN
{
printf("size\ttime\n");
}
syscall::read:entry
/execname == "httpd"/
{
self->start = timestamp;
}
syscall::read:return
/self->start/
{
printf("%d\t%d\n", arg0, timestamp - self->start);
self->start = 0;
}

Proc Provider

This provider fires at processes and thread creation and termination as well as signals. It is a more sophisticated approach to the simple kill probe and will tell you which user sent a given signal (3head) to which process.
  • The following script prints out the process name, pid and uid when a new process is started in the system. Note that proc:::exec-success fires when a new process is started successfully.
proc:::exec-success
{
printf("%s(pid=%d) started by uid - %d\n",execname, pid, uid);
}
  • Trace all the signals sent to all the processes currently running on the system
proc:::signal-send
{
printf("%d was sent to %s by ", args[2], args[1]->pr_fname);
}
Note: We have to use dtrace -w for this example along with -s.
  • Add the conditional statement (/args[2] == SIGKILL/) into the script and send SIGKILL signals to different processes from different users.
proc:::signal-send
/args[2] == SIGKILL/
{
printf("SIGKILL was sent to %s by ", args[1]->pr_fname);
}

Sched Provider

This provider dynamically traces scheduling events. Use it to understand when and why threads sleep, run, change priority, or wake other threads.
  • The following script determines the amount of time the CPU spends on I/O wait and working. It also breaks the I/O process and indicates that the data that was retrieved during the I/O wait time by sendmail. This script can easily be modified to fit your particular situation.
sched:::on-cpu
/execname == "soffice.bin"/
{
self->on = vtimestamp;
}
sched:::off-cpu
/self->on/
{
@time[""] = sum(vtimestamp self->on);
self->on = 0;
}

I/O Provider

This provider looks into the disk input and output (I/O) subsystem. With the io provider you can get an in-depth understanding of iostat(1M) output.
  • Trace which files are being accessed on which device and to determine if the task being performed is a read or a write.
BEGIN
{
printf("%10s %58s %2s\n", "DEVICE", "FILE", "RW");
}
io:::start
{
printf("%10s %58s %2s\n", args[1]->dev_statname, args[2]->fi_pathname,
args[0]->b_flags & B_READ ? "R" : "W");
}

Wednesday, March 21, 2007

Sivaji - the BOSS

Today was one of the memorable days I was waiting for. thnaks to karthik for pinging me and giving me a link where I could find songs of Sivaji. Am a great Rajni, for just a simple reason that he is the ultimate entertainer and the gives me a chance to watch a movie in theatre with my family coz my parents would never come to theatre, except for Rajni movies. The recent lists of movies I went with my parents are : Chandramukhi, Padayappa( 2 times ), Arunachalam, Muthu. Wat else to say, my parents were ready to come for Rajni movie twice. Thats superstar for you. Thing is my parents are never interested in movies at all, thats wat surprises me.
The songs are good, the same AR Rehman flavor, which no one will like the first time.
One song, his usual style song is too good.
My duty as a fan to give you the lyrics.
Film : Sivaji
Music : A.R.Rahman
Song : Oru Koodai Sunlight

\"oru koodai sunlight..
oru koodai moonlight..
ondraaga saerndha colour dhanay en white..
appo dhaan pichai karrupay,ippo dhaan chekka sivapay..
eppodhum pachai thamizhan,ippo naan vellai thamizhan...

ada ada ada asithudhu un style
nada nada nada nadapadhu un style
gada gada gada siripadhu un style
pada pada pada pesuvadhu un style..

kalakudhu un style,izhukudhu un style,jeikudhu un sytleee..
kozhandhaiku un style,izhasukku un style,perusukku un styleeee..

ada ada ada asathudhu un style
nada nada nada nadapadhu un style
gada gada gada siripadhu un style
pada pada pada pesuvadhu un style
suda suda suda thoduvadhu un style
thada thada thada adhiradi un style
adikadi mudi kalaivadhu style
vara vara ellamay style....

ragalai seiyura thiru veera
mirala sei manmadha maara
kavi thedum kalaga kaara
kann thadavum kandhala maara
ginn nidru kanniya koora
thinn nindru vellai kaara...

adada nee kaithadi mittai
nadandhayae maraikira kattai,
irundhayae uruvathail ettai,
malarndhayae kozhu kozhu muthai,
ice nadhiyai nerambukul vittai,
g ennum sollilay suttai,
eiffel tower idhayathil nattai,
pattasai paatai,...

a o a o lets throw the fido
a o a o lets throw the fido
hero hero heraadhi hero
staro staro nee superstaro\"...

Sivaji - Indeed is a BOSS...
Nallavana aandvan sodhipaan, aana kei vida maatan...

Whooo haaa INDIA!!!

World Cup is up, and everyone are having their hearts in the mouth coz India, as usual, is into another do or die situation. And a personal feeling I have is, we never lost to a minnow. We lost to a side which is felding like they are having wings. And I feel, the difference between the two sides was the feilding. India was too casual in the feild, Dhoni missing a catch, which was not that difficult, off Munaf and Dravid missing a difficult chance, which the Bangladeshians would have surely taken.
Let India have the best batting line up in the world and a very experienced and clever bowling attack, they will never be champions until they grab the chances their bowlers ignite by feilding well.
I saw a television show in Jaya TV, in regard to cricket, when one of the selectors said that, when asked about Kaif's ommision from world cup, Vengsarkar said, we cannot take him into the team just for his fielding. And so they have taken Shewag and Pathan, who did excellently with bat/bowl, so ironic. Atleast Kaif was felding and gauranteed saving 20 runs/innings, even though he didnt bat well like shewag. The selection commitee, the board, the players have one concern that is more important than the game, and thats, personal interest.
ICC knows the loss it wil incur if India is out of the torunament soon. So they would surely try some bargaining. "Whoo haa India" - very sad India...
Jonty Rhodes once in an interview, said he used to bat at number 8 or 9, and the only job he did was feilding. Kaif was an exception. If kaif was in the squad and if he could save some runs and throws at stumps, your teams confidence is so high...
Indian cricket is more run by Politics, Money, Perosnal Interest and Greed, rather than talent.
But still, some where in my heart, I want INDIA to be there and win the Worlc Cup :-). this is the weakness Indians have, to be with your team even after knowing all this, wat to do, I am an Indian :-).