kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Tracing SIGKILL, is that possible?
Date: Mon, 18 Feb 2013 14:09:17 -0500	[thread overview]
Message-ID: <14849.1361214557@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Mon, 18 Feb 2013 15:46:58 -0300." <CAF3SDA4Wp0PkduCw-H=8z=NA1K8HNY+M7-CUNkxSp7mrXhNHSA@mail.gmail.com>

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130218/3d531897/attachment.bin 

  reply	other threads:[~2013-02-18 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 18:46 Tracing SIGKILL, is that possible? Daniel.
2013-02-18 19:09 ` Valdis.Kletnieks at vt.edu [this message]
2013-02-19 13:56   ` daniel hilst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14849.1361214557@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).