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