xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Docs/Examples/cswstat_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1The following is an example of the cswstat.d script,
2
3   # cswstat.d
4   TIME                       NUM      CSWTIME      AVGTIME
5   2005 May 17 01:57:21       276         2407            8
6   2005 May 17 01:57:22       283         2251            7
7   2005 May 17 01:57:23       259         2098            8
8   2005 May 17 01:57:24       268         2169            8
9   2005 May 17 01:57:25      1248        10864            8
10   2005 May 17 01:57:26      2421        21263            8
11   2005 May 17 01:57:27      2183        19804            9
12   2005 May 17 01:57:28      1980        18640            9
13   2005 May 17 01:57:29       794         7422            9
14   2005 May 17 01:57:30       275         2233            8
15   2005 May 17 01:57:31       288         2338            8
16   2005 May 17 01:57:32       545         4154            7
17   2005 May 17 01:57:33       264         2149            8
18   ^C
19
20In the above output, the average context switch time is 8 microseconds.
21During the sample there was a burst of activity, increasing the number
22of context switches per second from around 270 to over 2000. The time
23consumed by all of these context switches in total is printed, peaking
24at 21 ms.
25
26