3 * intbycpu.d - interrupts by CPU.
4 * Written using DTrace (Solaris 10 3/05).
6 * $Id: intbycpu.d 3 2007-08-01 10:50:08Z brendan $
8 * USAGE: intbycpu.d # hit Ctrl-C to end sample
12 * INTERRUPTS number of interrupts in sample
14 * This is based on a DTrace OneLiner from the DTraceToolkit.
16 * COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg.
20 * The contents of this file are subject to the terms of the
21 * Common Development and Distribution License, Version 1.0 only
22 * (the "License"). You may not use this file except in compliance
25 * You can obtain a copy of the license at Docs/cddl1.txt
26 * or http://www.opensolaris.org/os/licensing.
27 * See the License for the specific language governing permissions
28 * and limitations under the License.
32 * 15-May-2005 Brendan Gregg Created this.
33 * 20-Apr-2006 " " Last update.
36 #pragma D option quiet
40 printf("Tracing... Hit Ctrl-C to end.\n");
43 sdt:::interrupt-start { @num[cpu] = count(); }
47 printf("%-16s %16s\n", "CPU", "INTERRUPTS");
48 printa("%-16d %@16d\n", @num);