sigwaittest(8)
π sigwaittest(8) π
okay bestie, gather round β this is sigwaittest, from the sigwaittest(8) manual. It's a tiny little latency-measuring icon and honestly? She ate. Let's get into it. π¦
β¨ NAME β¨
sigwaittest β spin up two threads (or fork two processes, your call) and measure the latency between sending a signal and receiving it.
πΈ SYNTAX πΈ
sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance
DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV]
[--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads
[NUM]]
π§ DESCRIPTION π§
So here's the vibe: sigwaittest starts two threads, or β if you want β it forks two processes instead. Either way, those two lil guys are synchronized via signals, and the whole point of the program is measuring the latency between sending a signal and returning from sigwait(). That's it. That's the mission. No cap. π
π OPTIONS π
-a,--affinity[=PROC]β Run on processor number PROC. And if you don't bother specifying PROC? It just runs on the current processor. lowkey convenient π«Ά-b,--breaktrace=USECβ Send the break trace command when latency goes > USEC. This one's a debugging option β it controls the latency tracer in the realtime preemption patch. Super useful when you're trying to track down those unexpected, giant, lowkey terrifying latencies on a system. π΅οΈβοΈ-d,--distance=DISTβ Sets the distance of the thread intervals, in microseconds. The default is 500 us. Here's the tea: whencyclictestis called with the-toption and more than one thread gets created, this distance value gets added to the interval of the threads:
Interval(thread N) = Interval(thread N-1) + DIST
-D,--duration=TIMEβ Specify a length for the test run. Append'm','h', or'd'to say minutes, hours, or days. β°-f,--fork[=OPT]β Instead of creating threads (which is, like, the default behavior), fork new processes. processes > threads, apparently π-i,--interval=INTVβ Set the base interval of the thread(s) in microseconds. Default is 1000 us. This sets the interval of the first thread. And bestie, see also-d, because they're besties too. π--json=FILENAMEβ Write the final results into FILENAME, JSON formatted. For the data girlies. π-l,--loops=LOOPSβ Set the number of loops. Default is 0, which means endless (iconic, honestly). This option is great for automated tests where you want a given number of test cycles βsigwaitteststops once the number of timer intervals has been reached. π-p,--prio=PRIOβ Set the priority of the process. π-t,--threads[=NUM]β Set the number of test threads. Default is 1, if this option isn't given at all. If NUM is specified, it creates NUM test threads. And if NUM is not specified? Then NUM gets set to the number of available CPUs. go off, multithreading. π₯
π EXAMPLES π
This example was running on a 4-way CPU:
# sigwaittest -a -t -p99 -i100 -d25 -l1000000
#0: ID11510, P99, CPU0, I100; #1: ID11511, P99, CPU0, Cycles 1000000
#2: ID11512, P98, CPU1, I125; #3: ID11513, P98, CPU1, Cycles 817484
#4: ID11514, P97, CPU2, I150; #5: ID11515, P97, CPU2, Cycles 668213
#6: ID11516, P96, CPU3, I175; #7: ID11517, P96, CPU3, Cycles 597344
#1 -> #0, Min 1, Cur 2, Avg 3, Max 30
#3 -> #2, Min 1, Cur 26, Avg 3, Max 42
#5 -> #4, Min 1, Cur 46, Avg 4, Max 67
#7 -> #6, Min 1, Cur 2, Avg 3, Max 74
look at those Min/Cur/Avg/Max columns, we love a clean output π₯Ή
π AUTHORS π
Carsten Emde <C.Emde@osadl.org> β thank you for your service, king π«‘π
π¦ SEE ALSO π¦
little housekeeping note bestie: the source file carries the license line # SPDX-License-Identifier: GPL-2.0-only β so that's the licensing vibe. β¨
and that's the whole page!! version 0.1 of sigwaittest(8), mwah π stay low-latency, stay iconic, periodt π
π
π¦ where this page comes from
- arch rolling: rt-tests 2.11-1 Β· GPL-2.0-or-later
- centos-stream 10: realtime-tests 2.11-1.el10 Β· GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.1-or-later
- centos-stream 9: realtime-tests 2.11-1.el9 Β· GPLv2
- fedora 43: realtime-tests 2.11-1.fc43 Β· GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.1-or-later
- fedora 43: realtime-tests 2.8-6.fc43 Β· GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.1-or-later
- fedora 44: realtime-tests 2.11-1.fc44 Β· GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.1-or-later
- fedora 44: realtime-tests 2.8-7.fc44 Β· GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.1-or-later
- nixos 26.05: rt-tests 2.10
- nixpkgs unstable: rt-tests 2.11
- opensuse-leap 16.0: rt-tests 2.8-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: rt-tests 2.8-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: rt-tests 2.8-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: rt-tests 2.8-160000.2.2 Β· GPL-2.0-only
- ubuntu resolute: rt-tests 2.9-1ubuntu1 Β· GPL-2.0-only
- ubuntu stonking: rt-tests 2.10-1ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms