]> git.saurik.com Git - apple/system_cmds.git/blob - latency.tproj/latency.1
system_cmds-597.90.1.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 p
12 .Op Fl h
13 .Op Fl m
14 .Op Fl st Ar threshold
15 .Op Fl it Ar threshold
16 .Op Fl c Ar code_file
17 .Op Fl l Ar log_file
18 .Op Fl R Ar raw_file
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 h
39 Display high resolution interrupt latencies and write them to latencies.csv (truncate existing file) upon exit.
40 .\" ==========
41 .It Fl m
42 Display per-CPU interrupt latency statistics.
43 .\" ==========
44 .It Fl it Ar threshold
45 Set the interrupt latency threshold,
46 expressed in microseconds.
47 If the latency exceeds this value,
48 and a log file has been specified,
49 a record of what occurred during this time is recorded.
50 .\" ==========
51 .It Fl l Ar log_file
52 Specifies a log file that is written to when
53 either the interrupt or scheduling latency is exceeded.
54 .\" ==========
55 .It Fl n Ar kernel
56 By default,
57 .Nm latency
58 acts on the default /mach_kernel.
59 This option allows you to specify an alternate booted kernel.
60 .\" ==========
61 .It Fl p Ar priority
62 Specifies the priority level to observe scheduler latencies for.
63 .\" ==========
64 .It Fl st Ar threshold
65 Set the scheduler latency threshold in microseconds.
66 If latency exceeds this, and a log file has been specified,
67 a record of what occurred during this time is recorded.
68 .\" ==========
69 .It Fl R Ar raw_file
70 Specifies a raw trace file to use as input.
71 .El
72 .Pp
73 The data columns displayed are as follows:
74 .Bl -tag -width LAST_PATHNAME_WAITED_FOR
75 .It SCHEDULER
76 The number of context switches that fall within the described delay.
77 .It INTERRUPTS
78 The number of interrupts that fall within the described delay.
79 .El
80 .Pp
81 The
82 .Nm latency
83 utility is also SIGWINCH savvy, so adjusting your window geometry will change
84 the list of delay values displayed.
85 .Sh SAMPLE USAGE
86 .Pp
87 latency -p 97 -st 20000 -it 1000 -l /var/tmp/latency.log
88 .Pp
89 The
90 .Nm latency
91 utility will watch threads with priority 97 for scheduling latencies.
92 The threshold for the scheduler is set to 20000 microseconds.
93 The threshold for interrupts is set to 1000 microseconds.
94 Latencies that exceed these thresholds will be logged in /var/tmp/latency.log.
95 .Sh SEE ALSO
96 .Xr fs_usage 1 ,
97 .Xr sc_usage 1 ,
98 .Xr top 1