3 * sigdist.d - signal distribution by process name.
4 * Written using DTrace (Solaris 10 3/05)
6 * This is a simple DTrace script that prints the number of signals
7 * recieved by process and signal number. This script is also available
8 * as /usr/demo/dtrace/sig.d, where it originates.
10 * $Id: sigdist.d 4 2007-08-01 11:01:38Z brendan $
12 * USAGE: sigdist.d # hit Ctrl-C to end
15 * SENDER process name of sender
16 * RECIPIENT process name of target
17 * SIG signal number, see signal(3head)
18 * COUNT number of signals sent
20 * BASED ON: /usr/demo/dtrace/sig.d
22 * SEE ALSO: DTrace Guide "proc Provider" chapter (docs.sun.com)
25 * PORTIONS: Copyright (c) 2005, 2006 Brendan Gregg.
29 * The contents of this file are subject to the terms of the
30 * Common Development and Distribution License, Version 1.0 only
31 * (the "License"). You may not use this file except in compliance
34 * You can obtain a copy of the license at Docs/cddl1.txt
35 * or http://www.opensolaris.org/os/licensing.
36 * See the License for the specific language governing permissions
37 * and limitations under the License.
41 * 09-Jun-2005 Brendan Gregg Created this.
42 * 20-Apr-2006 " " Last update.
45 #pragma D option quiet
49 printf("Tracing... Hit Ctrl-C to end.\n");
54 @Count[execname, stringof(args[1]->pr_fname), args[2]] = count();
59 printf("%16s %16s %6s %6s\n", "SENDER", "RECIPIENT", "SIG", "COUNT");
60 printa("%16s %16s %6d %6@d\n", @Count);