latency.1   [plain text]

.\" Copyright (c) 2000, Apple Computer, Inc.  All rights reserved.
.Dd March 28, 2000
.Os "Mac OS X"
.Nm latency
.Nd monitors scheduling and interrupt latency
.Nm latency
.Op Fl rt
.Op Fl h
.Op Fl c Ar code_file
.Op Fl l Ar log_file
.Op Fl st Ar threshold
.Op Fl it Ar threshold
.Op Fl s Ar sleep_in_usecs
.Op Fl d Ar decrementer_in_usecs
.Op Fl n Ar kernel
.Nm latency
utility provides scheduling and interrupt-latency statistics.
Due to the kernel tracing facility it uses to operate,
the command requires root privileges.
The arguments are as follows:
.Bl -tag -width Ds
.\" ==========
.It Fl c Ar code_file
When the
.Fl c
option is specified, it takes a path to a code file 
that contains the mappings for the system calls.
This option overrides the default location of the system call code file,
which is found in /usr/share/misc/
.\" ==========
.It Fl d Ar decrementer_in_usecs
Sets the decrementer, using a value expressed in microseconds.
On exit, the decrementer is set back to the system default value.
.\" ==========
.It Fl it Ar threshold
Set the interrupt latency threshold,
expressed in microseconds.
If the latency exceeds this value,
and a log file has been specified,
a record of what occurred during this time is recorded.
.\" ==========
.It Fl l Ar log_file
Specifies a log file that is written to when
either the interrupt or scheduling latency is exceeded.
.\" ==========
.It Fl n Ar kernel
By default,
.Nm latency
acts on the default /mach_kernel.
This option allows you to specify an alternate booted kernel.
.\" ==========
.It Fl rt
Sets the real-time scheduling policy.
Default policy is timeshare.
.\" ==========
.It Fl h
Display high resolution interrupt latencies and write them to latencies.csv (truncate existing file) upon exit.
.\" ==========
.It Fl s Ar sleep_in_usecs
Sets the timer, taking an argument expressed in microseconds.
The default timer is set to 1000 microseconds.
.\" ==========
.It Fl st Ar threshold
Set the scheduler latency threshold in microseconds.
If latency exceeds this, and a log file has been specified,
a record of what occurred during this time is recorded.
The data columns displayed are as follows:
The number of context switches that fall within the described delay.
The number of interrupts that fall within the described delay.
.Nm latency
utility is also SIGWINCH savvy, so adjusting your window geometry will change
the list of delay values displayed.
latency -rt -st 20000 -it 1000 -l /var/tmp/latency.log
.Nm latency
utility will set the realtime scheduling policy.
The threshold for the scheduler is set to 20000 microseconds.
The threshold for interrupts is set to 1000 microseconds.
Latencies that exceed these thresholds will be logged in /var/tmp/latency.log.
.Xr fs_usage 1 ,
.Xr sc_usage 1 ,
.Xr top 1