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