]> git.saurik.com Git - apple/system_cmds.git/blame - latency.tproj/latency.1
system_cmds-498.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
c03df0e9 12.Op Fl h
34d340d7
A
13.Op Fl c Ar code_file
14.Op Fl l Ar log_file
1815bff5
A
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
20e66415 21The
1815bff5 22.Nm latency
34d340d7
A
23utility provides scheduling and interrupt-latency statistics.
24Due to the kernel tracing facility it uses to operate,
25the command requires root privileges.
1815bff5
A
26.Pp
27The arguments are as follows:
28.Bl -tag -width Ds
34d340d7
A
29.\" ==========
30.It Fl c Ar code_file
1815bff5
A
31When the
32.Fl c
34d340d7 33option is specified, it takes a path to a code file
20e66415 34that contains the mappings for the system calls.
34d340d7
A
35This option overrides the default location of the system call code file,
36which is found in /usr/share/misc/trace.codes.
37.\" ==========
38.It Fl d Ar decrementer_in_usecs
39Sets the decrementer, using a value expressed in microseconds.
40On exit, the decrementer is set back to the system default value.
41.\" ==========
42.It Fl it Ar threshold
43Set the interrupt latency threshold,
44expressed in microseconds.
45If the latency exceeds this value,
46and a log file has been specified,
47a record of what occurred during this time is recorded.
48.\" ==========
49.It Fl l Ar log_file
50Specifies a log file that is written to when
51either the interrupt or scheduling latency is exceeded.
52.\" ==========
53.It Fl n Ar kernel
1815bff5
A
54By default,
55.Nm latency
20e66415
A
56acts on the default /mach_kernel.
57This option allows you to specify an alternate booted kernel.
34d340d7
A
58.\" ==========
59.It Fl rt
60Sets the real-time scheduling policy.
61Default policy is timeshare.
62.\" ==========
c03df0e9
A
63.It Fl h
64Display high resolution interrupt latencies and write them to latencies.csv (truncate existing file) upon exit.
65.\" ==========
34d340d7
A
66.It Fl s Ar sleep_in_usecs
67Sets the timer, taking an argument expressed in microseconds.
68The default timer is set to 1000 microseconds.
69.\" ==========
70.It Fl st Ar threshold
71Set the scheduler latency threshold in microseconds.
72If latency exceeds this, and a log file has been specified,
73a record of what occurred during this time is recorded.
1815bff5
A
74.El
75.Pp
76The data columns displayed are as follows:
34d340d7 77.Bl -tag -width LAST_PATHNAME_WAITED_FOR
1815bff5 78.It SCHEDULER
20e66415 79The number of context switches that fall within the described delay.
1815bff5 80.It INTERRUPTS
20e66415 81The number of interrupts that fall within the described delay.
1815bff5
A
82.El
83.Pp
84The
85.Nm latency
20e66415 86utility is also SIGWINCH savvy, so adjusting your window geometry will change
1815bff5
A
87the list of delay values displayed.
88.Sh SAMPLE USAGE
89.Pp
90latency -rt -st 20000 -it 1000 -l /var/tmp/latency.log
91.Pp
20e66415 92The
1815bff5 93.Nm latency
20e66415
A
94utility will set the realtime scheduling policy.
95The threshold for the scheduler is set to 20000 microseconds.
96The threshold for interrupts is set to 1000 microseconds.
97Latencies that exceed these thresholds will be logged in /var/tmp/latency.log.
1815bff5 98.Sh SEE ALSO
20e66415 99.Xr fs_usage 1 ,
34d340d7
A
100.Xr sc_usage 1 ,
101.Xr top 1