Friday, February 25, 2005

Reporting application Errors by Email

Good article about log4j and reporting critical events
Reporting Application Errors by Email by Sean C. Sullivan --
Even if your application logs an error to a local file, the developer doesn't know there's a problem until a user notices it and sends the log file back.
It can be more useful for apps to email their own error messages back. And as Sean C. Sullivan explains, it's not hard to do with either log4j or java.util.logging.

MUSHKIL HAI APNA MEL PRIYE


mushkil hai apna mel priye, ye pyar nahin hai khel priye,
mushkil hai apna mel priye, ye pyar nahin hai khel priye,

tum MA 1st division ho, main hua matric fel priye,
mushkil hai apna mel priye, ye pyar nahin hai khel priye,

tum fauji afsar ki beti, main to kisaan ka beta hoon,
tum rabadi kheer malai ho, main to sattu sapreta hoon,
tum AC ghar mein rahti ho, main ped ke neeche leta hoon,
tum nai maruti lagti ho, main scooter lamreta hoon,
is kadar agar hum chup-chup kar aapas me prem badhaenge,
to ek roz tere daddy amrish puri ban jaaenge,
sab haddi pasli tod mujhe bhijwaa denge vo jail priye,

mushkil hai apna mel priye, ye pyar nahin hai khel priye,

tum arab desh kee ghodi ho, main hoon gadahe ki naal priye,
tum deewali ka bonus ho, main bhookho ki hadtaal priye,
tum heere jadi tashtari ho, main almunium ka thaal priye,
tum chicken-soop biryani ho, main kankad waali daal priye,
tum hiran-chaokadi bharti ho, main hoon kachue ki chaal priye,
tum chandan-wan ki lakdi ho, main hoon babool ki chaal priye,
main pake aam sa latka hoon, mat maaro mujhe gulel priye,

mushkil hai apna mel priye, ye pyar nahin hai khel priye,

main shani-dev jaisa kuroop, tum komal kanchan kaya ho,
main tan-se man-se kanshi ram, tum maha chanchala maya ho,
tum nirmal paawan ganga ho, main jalta hua patanga hoon,
tum raaj ghaat ka shanti march, main hindu-muslim danga hoon,
tum ho poonam ka taajmahal, main kaali gufa ajanta ki,
tum ho vardaan vidhata ka, main galti hoon bhagvanta ki,
tum jet vimaan ki shobha ho, main bus ki thelam-thel priye,

mushkil hai apna mel priye, ye pyar nahin hai khel priye,

tum nai videshi mixi ho, main patthar ka silbatta hoon,
tum AK-saintalis jaisi, main to ik desi katta hoon,
tum chatur rabadi devi si, main bhola-bhala lalu hoon,
tum mukt sherni jangal ki, main chidiyaghar ka bhaalu hoon,
tum vyast sonia gandhi si, main v.p.singh sa khali hoon,
tum hansi madhuri dixit ki, main policeman ki gaali hoon,

kal jel agar ho jaaye to dilwa dena tum bel priye,
mushkil hai apna mel priye, ye pyar nahin hai khel priye,

main dhabe ke dhaanche jaisa, tum paanch sitara hotel ho,
main mahue ka desi tharra, tum red-label ki botel ho,
tum chitra-haar ka madhur geet, main krishi-darshan ki jhaadi hoon,
tum vishva-sundari si kamaal, main teliya chaap kabadi hoon,
tum sony ka mobile ho, main telephone waala chonga,
tum machli maansarovar ki, main saagar tat ka hoon ghongha,
dus manzil se gir jaaooga, mat aage mujhe dhakel priye,

mushkil hai apna mel priye, ye pyar nahin hai khel priye,

tum satta ki maharani ho, main vipaksha ki lachari hoon,
tum ho mamta-jailalita si, main kwara atal-bihari hoon,

tum tendulkar ka shatak priye, main follow on ki paari hoon,
tum getz, matiz, corolla ho main Leyland ki lorry hoon,

mujhko refree hi rehne do, mat khelo mujhse khel priye,
mushkil hai apna mel priye, ye pyar nahin hai khel priye,

main soch raha ki rahe hain kabse, shrota mujhko jhel priye,
mushkil hai apna mel priye, ye pyar nahin hai khel priye.

Thursday, February 24, 2005

Poem by Rudyard Kipling


IF

If you can keep your head when all about you
Are losing theirs and blaming it on you,
If you can trust yourself when all men doubt you
But make allowance for their doubting too,
If you can wait and not be tired by waiting,
Or being lied about, don't deal in lies,
Or being hated, don't give way to hating,
And yet don't look too good, nor talk too wise:

If you can dream--and not make dreams your master,
If you can think--and not make thoughts your aim;
If you can meet with Triumph and Disaster
And treat those two impostors just the same;
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Or watch the things you gave your life to, broken,
And stoop and build 'em up with worn-out tools:

If you can make one heap of all your winnings
And risk it all on one turn of pitch-and-toss,
And lose, and start again at your beginnings
And never breath a word about your loss;
If you can force your heart and nerve and sinew
To serve your turn long after they are gone,
And so hold on when there is nothing in you
Except the Will which says to them: "Hold on!"

If you can talk with crowds and keep your virtue,
Or walk with kings--nor lose the common touch,
If neither foes nor loving friends can hurt you;
If all men count with you, but none too much,
If you can fill the unforgiving minute
With sixty seconds' worth of distance run,
Yours is the Earth and everything that's in it,
And--which is more--you'll be a Man, my son!

Just to keep in my memories ....


"Boulevard Of Broken Dreams"
I walk a lonely road
The only one that I have ever known
Don't know where it goes
But it's home to me and I walk alone

I walk this empty street
On the Boulevard of Broken Dreams
Where the city sleeps
and I'm the only one and I walk alone
I walk alone

I walk alone
I walk a...

My shadow's the only one that walks beside me
My shallow heart's the only thing that's beating
Sometimes I wish someone out there will find me
'Til then I walk alone
Ah-ah, Ah-ah, Ah-ah, Aaah-ah,
Ah-ah, Ah-ah, Ah-ah

I'm walking down the line
That divides me somewhere in my mind
On the border line
Of the edge and where I walk alone

Read between the lines
What's fucked up and everything's alright
Check my vital signs
To know I'm still alive and I walk alone

I walk alone
I walk alone
I walk a...

My shadow's the only one that walks beside me
My shallow heart's the only thing that's beating
Sometimes I wish someone out there will find me
'Til then I walk alone

Ah-ah, Ah-ah, Ah-ah, Aaah-ah
Ah-ah, Ah-ah

I walk alone
I walk a...

I walk this empty street
On the Boulevard of Broken Dreams
Where the city sleeps
And I'm the only one and I walk a...

My shadow's the only one that walks beside me
My shallow heart's
the only thing that's beating
Sometimes I wish someone out there will find me
'Til then I walk alone

Tuesday, February 22, 2005

How to monitor Linux systems

A must see link for monitoring Linux system/ services/applications.
I feel its really worth reading this article and having archived it for future use.

http://www.kernel.org/software/mon/

Email Templates in java

Creating Email Templates with XML by Rafe Colburn -- Nearly every web app needs to send email at some point, but storing message bodies and headers can be tricky. Rafe Colburn demonstrates using XML, the Commons Digester, JavaMail, and MessageFormat to simplify generating and sending email.

Monday, February 21, 2005

How to pass parameters to interactive shell script from java

It is very small but tricky, just try it


public static int executeWithInput(String cmd) throws Exception
{
int retCode = 0;
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(cmd);
OutputStream out = pr.getOutputStream();
out.write('y');
out.write('\n');
out.flush();
pr.waitFor();
retCode = pr.exitValue();
return retCode;
}

My world



its me

Automation

Off, its really tuff to do automation of linux server, application maintenance. I am just going through the book Automating UNIX and LINUX Administration by Kirk bauer.

Looks like a good book, but stiil need to catch more.

This time busy....Will be back soon