LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-17-2006, 09:25 AM   #1
beeblequix
Member
 
Registered: Oct 2005
Location: Tierra Firma, Earth
Distribution: Debian of course...
Posts: 198

Rep: Reputation: 30
kill -- levels of harshness


Does anyone know from least harsh to most harsh which kill signals are easiest and hardest on the system? The reason I ask is that I think we issue too many "kill -9" commands. I theorize that by doing that we create either a memory leak or never releases DB2 connections that eventually takes our system to its knees. I try to kill processes with a -2 usually, but now I believe a -15 was more in order. My boss & other co-workers are a little trigger happy, and use -9.

Does this sound most reasonable?
-- start with -15
-- wait a few seconds, recheck running processes
-- try -15 again
-- wait...check
-- if it's not down issue a -2
-- wait...check
-- -2 again
-- wait...check
-- THEN we may start using -9......or not? Ideas?

me@mylinuxbox:/home/me> kill -l
1 HUP Hangup
2 INT Interrupt
3 QUIT Quit
4 ILL Illegal instruction
5 TRAP Trace trap
6 ABRT Abort
7 BUS Bus error
8 FPE Floating point exception
9 KILL Killed
10 USR1 User defined signal 1
11 SEGV Memory fault
12 USR2 User defined signal 2
13 PIPE Broken pipe
14 ALRM Alarm clock
15 TERM Terminated
16 STKFLT Stack fault
17 CHLD Child exited
18 CONT Continued
19 STOP Stopped (signal)
20 TSTP Stopped
21 TTIN Stopped (tty input)
22 TTOU Stopped (tty output)
23 URG Urgent I/O condition
24 XCPU CPU time limit exceeded
25 XFSZ File size limit exceeded
26 VTALRM Virtual timer expired
27 PROF Profiling timer expired
28 WINCH Window size change
29 IO I/O possible
30 PWR Power-fail/Restart
31 UNUSED Unused
32 32 Signal 32
..then 33 thru 63

Last edited by beeblequix; 09-17-2006 at 09:31 AM.
 
Old 09-17-2006, 09:52 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by beeblequix
Does this sound most reasonable?
-- start with -15
-- wait a few seconds, recheck running processes
-- try -15 again
-- wait...check
-- if it's not down issue a -2
-- wait...check
-- -2 again
-- wait...check
-- THEN we may start using -9......or not? Ideas?
You approach is very reasonable to me, people who directly start with -9 are fools as -9 is a last resort feature, not a general purpose one.

By the way, you may want to use the non numerical names for better portability, i.e. kill -TERM, kill -INT then kill -KILL.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What if 'kill -9' fails to kill a task? chii-chan Linux - Newbie 15 03-27-2013 03:47 PM
Why won't my FC3 rc0 and rc6 levels not call kill script when entering those levels? dvkwiatk Linux - General 2 11-11-2006 08:09 AM
how to use kill to kill a batch of processes with same name? dr_zayus69 Linux - Software 2 09-03-2005 06:35 PM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 02:32 PM
kill X = kill computer! jd243 Slackware 3 07-01-2003 11:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration