]>
Commit | Line | Data |
---|---|---|
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 | |
20 | The | |
21 | .Nm latency | |
22 | utility provides scheduling and interrupt latency statistics. | |
23 | It requires root privileges due to the kernel tracing facility it uses to | |
24 | operate. | |
25 | .Pp | |
26 | The arguments are as follows: | |
27 | .Bl -tag -width Ds | |
28 | .It Fl rt | |
29 | Set real time scheduling policy. | |
30 | Default policy is timeshare. | |
31 | .It Fl c | |
32 | When the | |
33 | .Fl c | |
34 | option is specified, it takes a path to a | |
35 | .Ar codefile | |
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. | |
39 | .It Fl l | |
40 | Specifies a | |
41 | .Ar logfile | |
42 | that is written to when either the interrupt or scheduling latency is exceeded. | |
43 | .It Fl st | |
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. | |
47 | .It Fl it | |
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. | |
51 | .It Fl s | |
52 | The | |
53 | .Fl s | |
54 | option sets the timer. | |
55 | It takes microseconds as an argument, the default timer is set to 1000 | |
56 | microseconds. | |
57 | .It Fl d | |
58 | The | |
59 | .Fl d | |
60 | option sets the decrementer. | |
61 | It takes microseconds as an argument. | |
62 | The decrementer is set back to the system default on exit. | |
63 | .It Fl n | |
64 | By default, | |
65 | .Nm latency | |
66 | acts on the default /mach_kernel. | |
67 | This option allows you to specify an alternate booted kernel. | |
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 | |
74 | The number of context switches that fall within the described delay. | |
75 | .It INTERRUPTS | |
76 | The number of interrupts that fall within the described delay. | |
77 | .El | |
78 | .Pp | |
79 | The | |
80 | .Nm latency | |
81 | utility is also SIGWINCH savvy, so adjusting your window geometry will change | |
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 | |
87 | The | |
88 | .Nm latency | |
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. | |
93 | .Sh SEE ALSO | |
94 | .Xr top 1 , | |
95 | .Xr fs_usage 1 , | |
96 | .Xr sc_usage 1 |