Friday, July 16, 2010

kill -9 me!

My senior Snr, unix expert, who works with me!

He comes to me... and

Snr:
Yaar, hi.. you updated this?
-Just made a few changes, to enhance performance, nothing altered as such, we can execute this without knowing the changes, no effect on functionality.

Snr: what have you updated, I still want to know..
-Every time, you start this script, tomcat is started and later this tomcat should be killed for faster report generation.. I just killed the tomcat before triggering report method

Snr: how did you kill that?
-I just grepped the PID for tomcat and killed it.

Snr: how did you grepped the PId of tomcat?
-Using ps

Snr: What does ps do?
-IT GIVES YOU THE LIST OF PROCESSES RUNNING

Snr: Give me the full code?
-Its not a code, herz the command, ps -ef

Snr: How did you grep the ...what?
-I piped down grep with ps

Snr: Give me the full code or syntax or command or whatever.
- ps -ef | grep tomcat

Snr: How did you kill tomcat then?
- kill -9 PID

Snr: What does kill -9 do?
[calm down Aman...]
- Sir, here is the full command I will mail you, google all the tokens in it

to: Snr@myGreatCompany.com
Sub: kill

Hi Snr,

Following line has been used to kill the running instance of tomcat
kill -9 `ps -ef | grep tomcat | awk '{printf $2}'` (press enter to execute)

Thanks
Aman, Jnr



Snr: I don't see any keyword token here?

-[M@#$%@#%#$@^@ B@#$@^$^.. 6 years experience IT snr.. F@#$#@ you!!]
- Sir, I just googled the syntax and kept it on proper place, please forgive me, I will never do this again!!!

Snr: Its ok, I knew this, even I google things down.
-Sir, same here :) Take care!

----XXX---

After this oral communication I tried to check "Snr"z R&D on server

$history
1 ps
2 ps -ef
3 ps -ef pipe grep tomcat
4 ps -ef PIPE grep tomcat
5 ps -ef Pipe grep tomcat
6 clear
7 ps -ef pipe grep tomcat
8 ps -ef pipe grape tomcat
9 kill -9 (ps -ef pipe grep tomcat)
10 kill -9 `ps -ef | grep tomcat | awk '{printf $2}'` (press enter to execute)
10 clear
11 history

$exit

2 comments:

pourush said...

hahaha!!!!.....o bhai, awsm!!!....lets hope tht guy doesnt know whats avd-zeek!!..our seniors shud never know what gets discussed behind their backs!!..

Intellectual Finesse said...

hahahah :P
wow?!
hate it when those incompetent idiots get to become 'seniors'!!! duh