LATENCY(1)
π LATENCY(1) π
okay so welcome to the LATENCY(1) page from the General Commands Manual, bestie β yes, that manual name is part of the lore, and this whole thing is about the latency utility. π«Ά
πΈ NAME πΈ
latency β monitors scheduling and interrupt latency β¨
π SYNOPSIS π
latency [-p priority] [-h] [-m] [-st threshold] [-it threshold]
[-c code_file] [-l log_file] [-R raw_file] [-n kernel]
π DESCRIPTION π
The latency utility gives you scheduling and interrupt-latency statistics. Because of the kernel tracing facility it uses to operate, the command requires root privileges β like, actual root, no cap. π¨
here are the arguments, one by one, no skips:
π arguments π
-c code_fileβ when you pass-c, 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/trace.codes. ποΈ-hβ displays high resolution interrupt latencies and writes them tolatencies.csv(truncate existing file) upon exit. β¨-mβ displays per-CPU interrupt latency statistics. π₯οΈ-it thresholdβ sets 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. β±οΈ-l log_fileβ specifies a log file that is written to when either the interrupt or scheduling latency is exceeded. π-n kernelβ by default,latencyacts on the default/System/Library/Kernels/kernel.development. This option allows you to specify an alternate booted kernel. π§-p priorityβ specifies the priority level to observe scheduler latencies for. The default is realtime (97). A range of priorities to monitor can also be provided, for example31-47or0-127. π―-st thresholdβ sets 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. β³-R raw_fileβ specifies a raw trace file to use as input. π₯
The data columns displayed are as follows:
SCHEDULERβ the number of context switches that fall within the described delay. πINTERRUPTSβ the number of interrupts that fall within the described delay. β‘
The latency utility is also SIGWINCH savvy, so adjusting your window geometry will change the list of delay values displayed. πͺπ«
πΈ SAMPLE USAGE πΈ
latency -p 97 -st 20000 -it 1000 -l /var/tmp/latency.log
The latency utility will watch threads with priority 97 for scheduling latencies. 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. π₯
π«Ά SEE ALSO π«Ά
Signed with macOS sparkle: this is LATENCY(1) from macOS, dated March 28, 2000 β byeee, bestie π«Άπ
π¦ where this page comes from
- nixpkgs unstable: system_cmds 1042.100.6.0.1
- Copyright (c) 2000, Apple Computer, Inc. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms