Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

latency(1) [opendarwin man page]

LATENCY(1)						    BSD General Commands Manual 						LATENCY(1)

NAME
latency -- monitors scheduling and interrupt latency SYNOPSIS
latency [-rt] [-c codefile] [-l logfile] [-st threshold] [-it threshold] [-s sleep_in_usecs] [-d decrementer_in_usecs] [-n kernel] DESCRIPTION
The latency utility provides scheduling and interrupt latency statistics. It requires root privileges due to the kernel tracing facility it uses to operate. The arguments are as follows: -rt Set real time scheduling policy. Default policy is timeshare. -c When the -c option is specified, it takes a path to a codefile that contains the mappings for the system calls. This option over- rides the default location of the system call codefile which is found in /usr/share/misc/trace.codes. -l Specifies a logfile that is written to when either the interrupt or scheduling latency is exceeded. -st Set the scheduler latency threshold in microseconds. If latency exceeds this, and a logfile has been specified, a record of what occurred during this time is recorded. -it Set the interrupt latency threshold in microseconds. If latency exceeds this, and a logfile has been specified, a record of what occurred during this time is recorded. -s The -s option sets the timer. It takes microseconds as an argument, the default timer is set to 1000 microseconds. -d The -d option sets the decrementer. It takes microseconds as an argument. The decrementer is set back to the system default on exit. -n By default, latency acts on the default /mach_kernel. This option allows you to specify an alternate booted kernel. 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 -rt -st 20000 -it 1000 -l /var/tmp/latency.log The 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. SEE ALSO
top(1), fs_usage(1), sc_usage(1) Mac OS X March 28, 2000 Mac OS X

Check Out this Related Man Page

JACK_IODELAY(1) 					      General Commands Manual						   JACK_IODELAY(1)

NAME
jack_iodelay - JACK toolkit client to measure roundtrip latency SYNOPSIS
jack_iodelay DESCRIPTION
jack_iodelay will create one input and one output port, and then measures the latency (signal delay) between them. For this to work, the output port must be connected to its input port. The measurement is accurate to a resolution of greater than 1 sample. The expected use is to connect jack_iodelay's output port to a hardware playback port, then use a physical loopback cable from the corre- sponding hardware output connector to an input connector, and to connect that corresponding hardware capture port to jack_iodelay's input port. This creates a roundtrip that goes through any analog-to-digital or digital-converters that are present in the audio hardware. Although the hardware loopback latency is the expected use, it is also possible to use jack_iodelay to measure the latency along any fully connected signal path, such as those involving other JACK clients. Once jack_iodelay completes its measurement it will print the total latency it has detected. This will include the JACK period length in addition to any other latency in the signal path. It will continue to print the value every 0.5 seconds or so so that if you wish you can vary aspects of the signal path to see their effect on the measured latency. If no incoming signal is detected from the input port, jack_iodelay will print Signal below threshold... . every second until this changes (e.g. until you establish the correct connections). To use the value measured by jack_iodelay with the -I and -O arguments of a JACK backend (also called Input Latency and Output Latency in the setup dialog of qjackctl), you must subtract the JACK period size from the result. Then, if you believe that the latency is equally distributed between the input and output parts of your audio hardware (extremely likely), divide the result by two and use that for input and/or output latency value. Doing this measurement will enable JACK clients that use the JACK latency API to accurately position/delay audio to keep signals synchronized even when there are inherent delays in the end-to-end signal pathways. AUTHOR
Originally written in C++ by Fons Adriensen, ported to C by Torben Hohn. 0-122-0 September 2012 JACK_IODELAY(1)
Man Page