| 1 |
#! /usr/bin/env stap |
| 2 |
# sigkill.stp |
| 3 |
# Copyright (C) 2007 Red Hat, Inc., Eugene Teo <[email protected]> |
| 4 |
# |
| 5 |
# This program is free software; you can redistribute it and/or modify |
| 6 |
# it under the terms of the GNU General Public License version 2 as |
| 7 |
# published by the Free Software Foundation. |
| 8 |
# |
| 9 |
# /usr/share/systemtap/tapset/signal.stp: |
| 10 |
# [...] |
| 11 |
# probe signal.send = _signal.send.* |
| 12 |
# { |
| 13 |
# sig=$sig |
| 14 |
# sig_name = _signal_name($sig) |
| 15 |
# sig_pid = task_pid(task) |
| 16 |
# pid_name = task_execname(task) |
| 17 |
# [...] |
| 18 |
|
| 19 |
probe signal.send { |
| 20 |
if (sig_name == "SIGKILL") |
| 21 |
printf("%s was sent to %s (pid:%d) by %s uid:%d\n", |
| 22 |
sig_name, pid_name, sig_pid, execname(), uid()) |
| 23 |
} |