3 * kill.d - watch process signals as they are sent (eg, kill -9).
4 * Written in DTrace (Solaris 10 3/05).
6 * $Id: kill.d 3 2007-08-01 10:50:08Z brendan $
12 * COMMAND source command name
14 * SIG destination signal ("9" for a kill -9)
15 * RESULT result of signal (-1 is for failure)
17 * SEE ALSO: Chapter 25, Solaris Dynamic Tracing Guide, docs.sun.com,
18 * for a solution using proc:::signal-send.
20 * COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
24 * The contents of this file are subject to the terms of the
25 * Common Development and Distribution License, Version 1.0 only
26 * (the "License"). You may not use this file except in compliance
29 * You can obtain a copy of the license at Docs/cddl1.txt
30 * or http://www.opensolaris.org/os/licensing.
31 * See the License for the specific language governing permissions
32 * and limitations under the License.
36 * 09-May-2004 Brendan Gregg Created this.
37 * 28-Jun-2005 " " Last update.
43 printf("%5s %12s %5s %-6s %s\n",
44 "FROM", "COMMAND", "SIG", "TO", "RESULT");
49 /* Record target PID and signal */
56 /* Print source, target, and result */
57 printf("%5d %12s %5d %-6d %d\n",
58 pid, execname, self->signal, self->target, (int)arg0);