Sunday, June 1, 2008

Grep fan

Major part of my work involves checking for certain events in log files and try to trace out activities that happened just before and after these events. This is commonly called Root Cause Analysis (RCA).

Earlier , when I was new into this job , I used to do a "less" on the log files , one by one .
Then scroll page by page in each log to find out where the interesting parts were.

It became easier , when I learned about the "/" in "less" . If ya hit "/" when in less , you can perform a simple search , and sort through the results by "n"(next).

Now I don't even do that , I just do a
grep -i "event_im_searching_for" "list_of_log files or wildcards" -A5 -B5

The A5 , B5 give me 5 log entries before and after the event ! Can't get any better than this.

This may look childish to a Unix guru , he would probably use some regexes with grep to do this even better . But I'm learning , I'll get there.

Can't live without tail -f

Let's say performing a step produces an unexpected result or an error.
And you want to find out more information from the logs about the error.

Initially I would gather all the logs on my end , and then I would do the "grepping" thing on them.
But every time I tried a troubleshooting step(and it didnt work or did something else ) , I had to go back in and then do the "grepping" again.

Found out that this works out far better , if you do this with tail -f.

Open a few ssh sessions to the esx/unix/linux box.
Do a tail -f /var/log/whatever for each log file that you want to examine.
Then perform the step that produces the unexpected result or error.
The "-f" continues polls the logs , so it lets you see the relevant information from the logs in real time.

Friday, May 23, 2008

Work Work !

Its madness . I am now working more than 12 hours a day. Spend 10 hours in the office , then come back home VPN in and continue working .

I recently got a dell precision t3400 desktop , in addition to my dell d630 laptop,
Pretty rocking fast , I spent 4 hours after shift, playing UT2004 (it has a nvidia FX5700 !)

Thursday, May 1, 2008

Nightlife

The biggest myth about this place is that it has a nightlife .
Nightlife ?? this place f**king sucks !

There isn't anyone on the roads after 10pm. Even on the main/arterial roads , you will find very few people on the roads.

I stay in jayanagar , I went to HSR layout yesterday and saw the same thing there.
10pm in HSR and the place looks like a ghost town.

I miss my old Bbay ...

Busy week

It has one hell of a busy week . Work is zapping up all my energy .
I really seem to have no time to sit and think ,or write.
The good part is , there seems to be no lack of company these days.