svsematest(8)
๐ svsematest โ the manual page, but make it make sense ๐
okay bestie, pull up a chair ๐ช because we're talking about svsematest(8), and honestly? she's iconic. this is the section 8 manual page for the one and only svsematest.
quick licensing tea: this page carries SPDX-License-Identifier: GPL-2.0-or-later. respect the license, periodt. ๐
โจ NAME โจ
svsematest โ spin up two threads, or fork two processes, and measure the latency of SYSV semaphores. no cap, that's literally her whole job. ๐
๐ SYNTAX ๐
like, here's how you call her:
svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance
DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV]
[--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet]
[-S|--smp] [-t|--threads [NUM]]
copy it, paste it, live your truth. ๐ฆ
๐ DESCRIPTION ๐
so here's the vibe: svsematest starts two threads โ or, if you want, it forks two processes instead โ and those two lil guys are synchronized via SYSV semaphores. ๐ซถ
and then? it measures the latency between releasing a semaphore on one side and getting it on the other side. that's it. that's the whole plot. and it ate. ๐ฅ
๐ธ OPTIONS ๐ธ
okay this is the part where we go through every single flag because we do NOT skip options in this house. all of them. every one. let's gooo. โจ
-a,--affinity[=NUM]โ run on processor number NUM. and ifPROCis not specified, just run on the current processor. (yes bestie, it saysPROCin there, we don't make the rules, we just report them ๐ซ )-b,--breaktrace=USECโ sends a break trace command when latency is> USEC. this is a debugging option, lowkey for controlling the latency tracer in the realtime preemption patch. it's the move when you're trying to hunt down unexpected large latencies on a system. ๐ต๏ธโ๏ธ-d,--distance=DISTโ sets the distance of thread intervals in microseconds (default is500us). 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. math but make it cute. ๐งฎ-D,--duration=TIMEโ specify a length for the test run. and you can append'm','h', or'd'to say minutes, hours or days. so like,'d'if you're feeling unhinged. ๐-f,--forkโ instead of creating threads (which is the default, fyi), fork new processes. choose your fighter. โ๏ธ-i,--interval=INTVโ sets the base interval of the thread(s) in microseconds (default is1000us). this sets the interval of the first thread. see also-d. ๐--json=FILENAMEโ write the final results intoFILENAME, JSON formatted. data girlies rise. ๐-l,--loops=LOOPSโ sets the number of loops. default is0(endless ๐ต). this one is useful for automated tests with a given number of test cycles.svsemateststops once the number of timer intervals has been reached. so, like, it knows when to leave the party. ๐ช-p,--prio=PRIOโ sets the priority of the process. main character energy only. ๐-q,--quietโ print a summary only on exit. useful for automated tests where only the summary output needs to be captured. she's mysterious. ๐คซ-S,--smpโ SMP testing: options-a-tand same priority of all threads. everybody equal, everybody slaying. ๐-t,--threads[=NUM]โ sets the number of test threads (default is1if this option isn't given). if NUM is specified, create NUM test threads. if NUM is not specified, NUM is set to the number of available CPUs. surprise mechanics. ๐
๐ฆ EXAMPLES ๐ฆ
this next example was running on a 4-way CPU, and honestly? she served:
# svsematest -a -t -p99 -i100 -d25 -l1000000
#0: ID13110, P99, CPU0, I100; #1: ID13111, P99, CPU0, Cycles 1000000
#2: ID13112, P98, CPU1, I125; #3: ID13113, P98, CPU1, Cycles 813573
#4: ID13114, P97, CPU2, I150; #5: ID13115, P97, CPU2, Cycles 667285
#6: ID13116, P96, CPU3, I175; #7: ID13117, P96, CPU3, Cycles 591403
#1 -> #0, Min 1, Cur 2, Avg 2, Max 12
#3 -> #2, Min 1, Cur 3, Avg 2, Max 12
#5 -> #4, Min 1, Cur 3, Avg 3, Max 12
#7 -> #6, Min 1, Cur 2, Avg 3, Max 11
look at those numbers. Min, Cur, Avg, Max. chef's kiss. ๐ญ๐
๐ AUTHORS ๐
Carsten Emde <C.Emde@osadl.org> โ thank you for your service, legend. ๐ซก๐
โญ SEE ALSO โญ
semop(2)โ go read her next, bestie, she's the whole reason this works. ๐ง
okay that's the whole page!! you're officially a svsematest girlie now, iykyk. ๐
and a lil sign-off for the record: this whole thing is version 0.1 of svsematest(8). yes, 0.1. baby version, already 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