]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Examples/sh_stat_example.txt
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Examples / sh_stat_example.txt
1 Following are examples of running sh_stat.d on Shell scripts. 
2
3 sh_stat.d shows you the number of events per second that have happened since
4 the last line output.  The default interval is 1 second, but you can specify 
5 other intervals as arguments to the script.
6
7 This shows the sh_stat.d script reflecting the Code/Shell/func_slow.sh script.
8
9    # sh_stat.d
10    TIME                   EXEC/s  FUNCS/s BLTINS/s SUB-SH/s    CMD/s
11    2007 Sep 17 03:29:02        1        1       50       96        0
12    2007 Sep 17 03:29:03        0        1      151      300        0
13    2007 Sep 17 03:29:04        0        1      142      280        0
14    2007 Sep 17 03:29:05        0        0      132      262        0
15    2007 Sep 17 03:29:06        0        0      122      245        0
16    2007 Sep 17 03:29:07        0        0        9       17        0
17    2007 Sep 17 03:29:08        0        0        0        0        0
18    2007 Sep 17 03:29:09        0        0        0        0        0
19    ^C
20
21 We can see that at 2007 Sep 17 03:29:04 there were 0 Bourne shells executed,
22 one function called, 142 built-in commands called, 280 sub-shells created and
23 0 external commands called.
24
25
26 Here the script runs when Mozilla Firefox is started.
27
28    # sh_stat.d 
29    TIME                   EXEC/s  FUNCS/s BLTINS/s SUB-SH/s    CMD/s
30    2007 Sep 17 03:29:52        1        9       52       38        2
31    2007 Sep 17 03:29:53        0        0        0        0        0
32    2007 Sep 17 03:29:54        0        0        0        0        0
33    2007 Sep 17 03:29:55        0        0        0        0        0
34    2007 Sep 17 03:29:56        0        0        0        0        0
35    2007 Sep 17 03:29:57        0        0        0        0        0
36    2007 Sep 17 03:29:58        0        0        0        0        0
37    2007 Sep 17 03:29:59        0        0        0        0        0
38    2007 Sep 17 03:30:00        0        0        0        0        0
39    2007 Sep 17 03:30:01        1        1        8        0        0
40    2007 Sep 17 03:30:02        0        0        0        0        0
41    2007 Sep 17 03:30:03        0        0        0        0        0
42    2007 Sep 17 03:30:04        0        0        0        0        0
43    ^C
44