]>
Commit | Line | Data |
---|---|---|
1815bff5 A |
1 | .\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved. |
2 | .\" | |
3 | .Dd March 28, 2000 | |
4 | .Dt LATENCY 1 | |
5 | .Os "Mac OS X" | |
6 | .Sh NAME | |
7 | .Nm latency | |
8 | .Nd monitors scheduling and interrupt latency | |
9 | .Sh SYNOPSIS | |
10 | .Nm latency | |
11 | .Op Fl rt | |
c03df0e9 | 12 | .Op Fl h |
34d340d7 A |
13 | .Op Fl c Ar code_file |
14 | .Op Fl l Ar log_file | |
1815bff5 A |
15 | .Op Fl st Ar threshold |
16 | .Op Fl it Ar threshold | |
17 | .Op Fl s Ar sleep_in_usecs | |
18 | .Op Fl d Ar decrementer_in_usecs | |
19 | .Op Fl n Ar kernel | |
20 | .Sh DESCRIPTION | |
20e66415 | 21 | The |
1815bff5 | 22 | .Nm latency |
34d340d7 A |
23 | utility provides scheduling and interrupt-latency statistics. |
24 | Due to the kernel tracing facility it uses to operate, | |
25 | the command requires root privileges. | |
1815bff5 A |
26 | .Pp |
27 | The arguments are as follows: | |
28 | .Bl -tag -width Ds | |
34d340d7 A |
29 | .\" ========== |
30 | .It Fl c Ar code_file | |
1815bff5 A |
31 | When the |
32 | .Fl c | |
34d340d7 | 33 | option is specified, it takes a path to a code file |
20e66415 | 34 | that contains the mappings for the system calls. |
34d340d7 A |
35 | This option overrides the default location of the system call code file, |
36 | which is found in /usr/share/misc/trace.codes. | |
37 | .\" ========== | |
38 | .It Fl d Ar decrementer_in_usecs | |
39 | Sets the decrementer, using a value expressed in microseconds. | |
40 | On exit, the decrementer is set back to the system default value. | |
41 | .\" ========== | |
42 | .It Fl it Ar threshold | |
43 | Set the interrupt latency threshold, | |
44 | expressed in microseconds. | |
45 | If the latency exceeds this value, | |
46 | and a log file has been specified, | |
47 | a record of what occurred during this time is recorded. | |
48 | .\" ========== | |
49 | .It Fl l Ar log_file | |
50 | Specifies a log file that is written to when | |
51 | either the interrupt or scheduling latency is exceeded. | |
52 | .\" ========== | |
53 | .It Fl n Ar kernel | |
1815bff5 A |
54 | By default, |
55 | .Nm latency | |
20e66415 A |
56 | acts on the default /mach_kernel. |
57 | This option allows you to specify an alternate booted kernel. | |
34d340d7 A |
58 | .\" ========== |
59 | .It Fl rt | |
60 | Sets the real-time scheduling policy. | |
61 | Default policy is timeshare. | |
62 | .\" ========== | |
c03df0e9 A |
63 | .It Fl h |
64 | Display high resolution interrupt latencies and write them to latencies.csv (truncate existing file) upon exit. | |
65 | .\" ========== | |
34d340d7 A |
66 | .It Fl s Ar sleep_in_usecs |
67 | Sets the timer, taking an argument expressed in microseconds. | |
68 | The default timer is set to 1000 microseconds. | |
69 | .\" ========== | |
70 | .It Fl st Ar threshold | |
71 | Set the scheduler latency threshold in microseconds. | |
72 | If latency exceeds this, and a log file has been specified, | |
73 | a record of what occurred during this time is recorded. | |
1815bff5 A |
74 | .El |
75 | .Pp | |
76 | The data columns displayed are as follows: | |
34d340d7 | 77 | .Bl -tag -width LAST_PATHNAME_WAITED_FOR |
1815bff5 | 78 | .It SCHEDULER |
20e66415 | 79 | The number of context switches that fall within the described delay. |
1815bff5 | 80 | .It INTERRUPTS |
20e66415 | 81 | The number of interrupts that fall within the described delay. |
1815bff5 A |
82 | .El |
83 | .Pp | |
84 | The | |
85 | .Nm latency | |
20e66415 | 86 | utility is also SIGWINCH savvy, so adjusting your window geometry will change |
1815bff5 A |
87 | the list of delay values displayed. |
88 | .Sh SAMPLE USAGE | |
89 | .Pp | |
90 | latency -rt -st 20000 -it 1000 -l /var/tmp/latency.log | |
91 | .Pp | |
20e66415 | 92 | The |
1815bff5 | 93 | .Nm latency |
20e66415 A |
94 | utility will set the realtime scheduling policy. |
95 | The threshold for the scheduler is set to 20000 microseconds. | |
96 | The threshold for interrupts is set to 1000 microseconds. | |
97 | Latencies that exceed these thresholds will be logged in /var/tmp/latency.log. | |
1815bff5 | 98 | .Sh SEE ALSO |
20e66415 | 99 | .Xr fs_usage 1 , |
34d340d7 A |
100 | .Xr sc_usage 1 , |
101 | .Xr top 1 |