From mboxrd@z Thu Jan 1 00:00:00 1970 From: danielhilst@gmail.com (daniel hilst) Date: Tue, 19 Feb 2013 10:56:15 -0300 Subject: Tracing SIGKILL, is that possible? In-Reply-To: <14849.1361214557@turing-police.cc.vt.edu> References: <14849.1361214557@turing-police.cc.vt.edu> Message-ID: <5123847F.1030600@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Em 18/02/2013 16:09, Valdis.Kletnieks at vt.edu escreveu: > On Mon, 18 Feb 2013 15:46:58 -0300, "Daniel." said: >> Is there a way to track signals, specially SIGKILL. I would like to >> know if some process dies because reach some resource limit, because >> an OMM error or something likewise.. > > Depends on where you want the tracking to go. But your first thing to try > would probably be: > > echo 1 > /proc/sys/kernel/print-fatal-signals > > which controls this code in kernel/signal.c: > > static void print_fatal_signal(int signr) > { > struct pt_regs *regs = signal_pt_regs(); > printk("%s/%d: potentially unexpected fatal signal %d.\n", > current->comm, task_pid_nr(current), signr); > > Bahh. That's missing a KERN_INFO. Patch submitted. > Hi Valdis, Thanks! This should be a good start, Cheers!