3 * syscallbypid.d - report on syscalls by PID.
4 * Written using DTrace (Solaris 10 3/05)
6 * $Id: syscallbypid.d 3 2007-08-01 10:50:08Z brendan $
8 * USAGE: syscallbypid.d # hit Ctrl-C to end sample
13 * SYSCALL syscall name
14 * COUNT number of syscalls for this PID
16 * This is based on a script from DExplorer.
18 * COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg.
22 * The contents of this file are subject to the terms of the
23 * Common Development and Distribution License, Version 1.0 only
24 * (the "License"). You may not use this file except in compliance
27 * You can obtain a copy of the license at Docs/cddl1.txt
28 * or http://www.opensolaris.org/os/licensing.
29 * See the License for the specific language governing permissions
30 * and limitations under the License.
34 * 15-May-2005 Brendan Gregg Created this.
35 * 20-Apr-2006 " " Last update.
38 #pragma D option quiet
42 printf("Tracing... Hit Ctrl-C to end.\n");
47 @num[pid, execname, probefunc] = count();
52 printf("%6s %-24s %-24s %8s\n", "PID", "CMD", "SYSCALL", "COUNT");
53 printa("%6d %-24s %-24s %@8d\n", @num);