]>
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 | |
12 | .Op Fl c Ar codefile | |
13 | .Op Fl l Ar logfile | |
14 | .Op Fl st Ar threshold | |
15 | .Op Fl it Ar threshold | |
16 | .Op Fl s Ar sleep_in_usecs | |
17 | .Op Fl d Ar decrementer_in_usecs | |
18 | .Op Fl n Ar kernel | |
19 | .Sh DESCRIPTION | |
20e66415 | 20 | The |
1815bff5 | 21 | .Nm latency |
20e66415 A |
22 | utility provides scheduling and interrupt latency statistics. |
23 | It requires root privileges due to the kernel tracing facility it uses to | |
24 | operate. | |
1815bff5 A |
25 | .Pp |
26 | The arguments are as follows: | |
27 | .Bl -tag -width Ds | |
28 | .It Fl rt | |
20e66415 A |
29 | Set real time scheduling policy. |
30 | Default policy is timeshare. | |
1815bff5 A |
31 | .It Fl c |
32 | When the | |
33 | .Fl c | |
34 | option is specified, it takes a path to a | |
35 | .Ar codefile | |
20e66415 A |
36 | that contains the mappings for the system calls. |
37 | This option overrides the default location of the system call codefile which is | |
38 | found in /usr/share/misc/trace.codes. | |
1815bff5 A |
39 | .It Fl l |
40 | Specifies a | |
41 | .Ar logfile | |
20e66415 | 42 | that is written to when either the interrupt or scheduling latency is exceeded. |
1815bff5 | 43 | .It Fl st |
20e66415 A |
44 | Set the scheduler latency threshold in microseconds. |
45 | If latency exceeds this, and a logfile has been specified, a record of what | |
46 | occurred during this time is recorded. | |
1815bff5 | 47 | .It Fl it |
20e66415 A |
48 | Set the interrupt latency threshold in microseconds. |
49 | If latency exceeds this, and a logfile has been specified, a record of what | |
50 | occurred during this time is recorded. | |
1815bff5 A |
51 | .It Fl s |
52 | The | |
53 | .Fl s | |
20e66415 A |
54 | option sets the timer. |
55 | It takes microseconds as an argument, the default timer is set to 1000 | |
56 | microseconds. | |
1815bff5 A |
57 | .It Fl d |
58 | The | |
59 | .Fl d | |
20e66415 A |
60 | option sets the decrementer. |
61 | It takes microseconds as an argument. | |
1815bff5 A |
62 | The decrementer is set back to the system default on exit. |
63 | .It Fl n | |
64 | By default, | |
65 | .Nm latency | |
20e66415 A |
66 | acts on the default /mach_kernel. |
67 | This option allows you to specify an alternate booted kernel. | |
1815bff5 A |
68 | .El |
69 | .Pp | |
70 | The data columns displayed are as follows: | |
71 | .Bl -tag -width LAST_PATHNAME_WAITED_FOR -compact | |
72 | .Pp | |
73 | .It SCHEDULER | |
20e66415 | 74 | The number of context switches that fall within the described delay. |
1815bff5 | 75 | .It INTERRUPTS |
20e66415 | 76 | The number of interrupts that fall within the described delay. |
1815bff5 A |
77 | .El |
78 | .Pp | |
79 | The | |
80 | .Nm latency | |
20e66415 | 81 | utility is also SIGWINCH savvy, so adjusting your window geometry will change |
1815bff5 A |
82 | the list of delay values displayed. |
83 | .Sh SAMPLE USAGE | |
84 | .Pp | |
85 | latency -rt -st 20000 -it 1000 -l /var/tmp/latency.log | |
86 | .Pp | |
20e66415 | 87 | The |
1815bff5 | 88 | .Nm latency |
20e66415 A |
89 | utility will set the realtime scheduling policy. |
90 | The threshold for the scheduler is set to 20000 microseconds. | |
91 | The threshold for interrupts is set to 1000 microseconds. | |
92 | Latencies that exceed these thresholds will be logged in /var/tmp/latency.log. | |
1815bff5 | 93 | .Sh SEE ALSO |
20e66415 A |
94 | .Xr top 1 , |
95 | .Xr fs_usage 1 , | |
1815bff5 | 96 | .Xr sc_usage 1 |