1 .\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved.
8 .Nd monitors scheduling and interrupt latency
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
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.
38 .It Fl d Ar decrementer_in_usecs
39 Sets the decrementer, using a value expressed in microseconds.
40 On exit, the decrementer is set back to the system default value.
42 .It Fl it Ar threshold
43 Set the interrupt latency threshold,
44 expressed in microseconds.
45 If the latency exceeds this value,
46 and a log file has been specified,
47 a record of what occurred during this time is recorded.
50 Specifies a log file that is written to when
51 either the interrupt or scheduling latency is exceeded.
56 acts on the default /mach_kernel.
57 This option allows you to specify an alternate booted kernel.
60 Sets the real-time scheduling policy.
61 Default policy is timeshare.
64 Display high resolution interrupt latencies and write them to latencies.csv (truncate existing file) upon exit.
66 .It Fl s Ar sleep_in_usecs
67 Sets the timer, taking an argument expressed in microseconds.
68 The default timer is set to 1000 microseconds.
70 .It Fl st Ar threshold
71 Set the scheduler latency threshold in microseconds.
72 If latency exceeds this, and a log file has been specified,
73 a record of what occurred during this time is recorded.
76 The data columns displayed are as follows:
77 .Bl -tag -width LAST_PATHNAME_WAITED_FOR
79 The number of context switches that fall within the described delay.
81 The number of interrupts that fall within the described delay.
86 utility is also SIGWINCH savvy, so adjusting your window geometry will change
87 the list of delay values displayed.
90 latency -rt -st 20000 -it 1000 -l /var/tmp/latency.log
94 utility will set the realtime scheduling policy.
95 The threshold for the scheduler is set to 20000 microseconds.
96 The threshold for interrupts is set to 1000 microseconds.
97 Latencies that exceed these thresholds will be logged in /var/tmp/latency.log.