]> git.saurik.com Git - apple/system_cmds.git/blob - latency.tproj/latency.1
system_cmds-433.8.tar.gz
[apple/system_cmds.git] / latency.tproj / latency.1
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 h
13 .Op Fl c Ar code_file
14 .Op Fl l Ar log_file
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
21 The
22 .Nm latency
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.
26 .Pp
27 The arguments are as follows:
28 .Bl -tag -width Ds
29 .\" ==========
30 .It Fl c Ar code_file
31 When the
32 .Fl c
33 option is specified, it takes a path to a code file
34 that contains the mappings for the system calls.
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
54 By default,
55 .Nm latency
56 acts on the default /mach_kernel.
57 This option allows you to specify an alternate booted kernel.
58 .\" ==========
59 .It Fl rt
60 Sets the real-time scheduling policy.
61 Default policy is timeshare.
62 .\" ==========
63 .It Fl h
64 Display high resolution interrupt latencies and write them to latencies.csv (truncate existing file) upon exit.
65 .\" ==========
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.
74 .El
75 .Pp
76 The data columns displayed are as follows:
77 .Bl -tag -width LAST_PATHNAME_WAITED_FOR
78 .It SCHEDULER
79 The number of context switches that fall within the described delay.
80 .It INTERRUPTS
81 The number of interrupts that fall within the described delay.
82 .El
83 .Pp
84 The
85 .Nm latency
86 utility is also SIGWINCH savvy, so adjusting your window geometry will change
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
92 The
93 .Nm latency
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.
98 .Sh SEE ALSO
99 .Xr fs_usage 1 ,
100 .Xr sc_usage 1 ,
101 .Xr top 1