Re: Tracing SIGKILL, is that possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: pgpVxm8EwIq5q.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux