QuicksearchDisclaimerThe individual owning this blog works for Oracle in Germany. The opinions expressed here are his own, are not necessarily reviewed in advance by anyone but the individual author, and neither Oracle nor any other party necessarily agrees with them.
|
kill -9Tuesday, September 20. 2011Comments
Display comments as
(Linear | Threaded)
Joerg,
I've been "preaching" about this for years. I'm talking back to the days of serial connections to green (or amber) screen dumb terminals running curses based programs. It amazes me how many admins' automatic action is to kill -9 a process. And, in the case of the curses based programs would leave the screen/session in an unusable state. Thanks for continuing to spread the word and your great blog. -Todd
it's even easy to catch a signal in shell scripts via trap...
Part of the problem are lots and lots of tutorials of people who don't have a deep understanding of the system, they just keep spamming google with kill -9 and such. I wasn't in the need of SIGKILL for a long time, though admittedly I was a long time -9 user myself. Guess what, I even learned it out of a crappy book :-/
I think slightly different about this... 'kill' is already the sledgehammer approach when a program or command can't be ended normally anymore. The chances that such a program will react to a kill -15 (TERM) in a sensible way is in most cases rather slim. So admins aren't usually too careful before getting out the bomb that is kill -9.
Slightly off-topic.. do you have any good hints to clean out zombies on Solaris? The usual approach I learned many years ago was to -9 its parent process, so the zombie gets re-parented to 1 (init), and then kill -CHLD init to force him to clean up "his" children. This worked rather nice until Sol8, but on Sol10 it can take a quarter of an hour and repeated application to really get rid of a process. Is there anything to make this quicker/easier? In theory, pwait should help, but in practice it does nothing. (and before the usual "why not leave it alone? zombies cost nothing..." comes up: there are times where you need to get rid of them - e.g. when monitoring job count or existence via nagios etc.)
preap only works on processes that Solaris recognizes as "defunct", not on processes that are dead but don't know it yet. (processes that were sent -9 a dozen times, aren't active via truss/dtrace monitoring anymore, have been reparented to 1 but don't seem to get reaped by init...)
I get those a lot, especially from umount on filesystems that are still accessed etc... |
+1The LKSF bookThe book with the consolidated Less known Solaris Tutorials is available for download here
Web 2.0Contact
Networking xing.com My photos CommentsMon, 21.05.2012 04:44
Hi Greg,
With regards to IO
PS I have seen terrible result
s using a 60GB SATA2 SSD with
USB2.0 - USB2 really cho [...]
about ZFS Dedup Internals
Sat, 19.05.2012 09:50
There is no impact to boot/imp
ort times, as the DDT is loade
d as needed ... so the pool is
imported as fast as wit [...]
about Tracks
Tue, 15.05.2012 19:46
Very nice, I like the way the
eye is taken right into the pi
cture. Did you use any filter
s not to make the green [...]
Buttons![]() This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Germany License
![]() ![]() ![]() Blog Administration |
Tracked: Sep 29, 16:41