1 .\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved.
8 .Nd monitors scheduling and interrupt latency
14 .Op Fl st Ar threshold
15 .Op Fl it Ar threshold
23 utility provides scheduling and interrupt-latency statistics.
24 Due to the kernel tracing facility it uses to operate,
25 the command requires root privileges.
27 The arguments are as follows:
33 option is specified, it takes a path to a code file
34 that contains the mappings for the system calls.
35 This option overrides the default location of the system call code file,
36 which is found in /usr/share/misc/trace.codes.
39 Display high resolution interrupt latencies and write them to latencies.csv (truncate existing file) upon exit.
42 Display per-CPU interrupt latency statistics.
44 .It Fl it Ar threshold
45 Set the interrupt latency threshold,
46 expressed in microseconds.
47 If the latency exceeds this value,
48 and a log file has been specified,
49 a record of what occurred during this time is recorded.
52 Specifies a log file that is written to when
53 either the interrupt or scheduling latency is exceeded.
58 acts on the default /System/Library/Kernels/kernel.development.
59 This option allows you to specify an alternate booted kernel.
62 Specifies the priority level to observe scheduler latencies for.
63 The default is realtime (
65 ). A range of priorities to monitor
66 can also be provided, for example
72 .It Fl st Ar threshold
73 Set the scheduler latency threshold in microseconds.
74 If latency exceeds this, and a log file has been specified,
75 a record of what occurred during this time is recorded.
78 Specifies a raw trace file to use as input.
81 The data columns displayed are as follows:
82 .Bl -tag -width LAST_PATHNAME_WAITED_FOR
84 The number of context switches that fall within the described delay.
86 The number of interrupts that fall within the described delay.
91 utility is also SIGWINCH savvy, so adjusting your window geometry will change
92 the list of delay values displayed.
95 latency -p 97 -st 20000 -it 1000 -l /var/tmp/latency.log
99 utility will watch threads with priority 97 for scheduling latencies.
100 The threshold for the scheduler is set to 20000 microseconds.
101 The threshold for interrupts is set to 1000 microseconds.
102 Latencies that exceed these thresholds will be logged in /var/tmp/latency.log.