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