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");
}