1svsematest(8)                                                    svsematest(8)
2
3
4
5# SPDX-License-Identifier: GPL-2.0-or-later
6

NAME

8       svsematest  -  Start  two threads or fork two processes and measure the
9       latency of SYSV semaphores
10

SYNTAX

12       svsematest [-a|--affinity NUM]  [-b|--breaktrace  USEC]  [-d|--distance
13       DIST]  [-D|--duration  TIME]  [-f|--fork  [OPT]]  [-i|--interval  INTV]
14       [--json FILENAME]  [-l|--loops  LOOPS]  [-p|--prio  PRIO]  [-q|--quiet]
15       [-S|--smp] [-t|--threads [NUM]]
16

DESCRIPTION

18       The  program  svsematest  starts  two threads or, optionally, forks two
19       processes that are synchronized via SYSV semaphores  and  measures  the
20       latency between releasing a semaphore on one side and getting it on the
21       other side.
22

OPTIONS

24       -a, --affinity[=NUM]
25              Run on processor number NUM. If PROC is not  specified,  run  on
26              current processor.
27
28       -b, --breaktrace=USEC
29              Send  break  trace command when latency > USEC. This is a debug‐
30              ging option to control the latency tracer in the  realtime  pre‐
31              emption  patch.  It is useful to track down unexpected large la‐
32              tencies of a system.
33
34       -d, --distance=DIST
35              Set the distance of thread intervals in microseconds (default is
36              500  us). When  cyclictest is called with the -t option and more
37              than one thread is created, then this distance value is added to
38              the  interval  of  the  threads:  Interval(thread  N)  =  Inter‐
39              val(thread N-1) + DIST
40
41       -D, --duration=TIME
42              Specify a length for the test run.
43              Append 'm', 'h', or 'd' to specify minutes, hours or days.
44
45       -f, --fork
46              Instead of creating threads (which is  the  default),  fork  new
47              processes
48
49       -i, --interval=INTV
50              Set  the base interval of the thread(s) in microseconds (default
51              is 1000 us). This sets the interval of  the  first  thread.  See
52              also -d.
53
54       --json=FILENAME
55              Write final results into FILENAME, JSON formatted.
56
57       -l, --loops=LOOPS
58              Set the number of loops. The default is 0 (endless). This option
59              is useful for automated tests with a given number  of  test  cy‐
60              cles.  svsematest  is stopped once the number of timer intervals
61              has been reached.
62
63       -p, --prio=PRIO
64              Set the priority of the process.
65
66       -q, --quiet
67              Print a summary only on exit. Useful for automated tests,  where
68              only the summary output needs to be captured.
69
70       -S, --smp
71              SMP testing: options -a -t and same priority of all threads
72
73       -t, --threads[=NUM]
74              Set  the number of test threads (default is 1, if this option is
75              not given). If NUM is specified, create NUM test threads. If NUM
76              is not specified, NUM is set to the number of available CPUs.
77

EXAMPLES

79       The following example was running on a 4-way CPU:
80
81       # svsematest -a -t -p99 -i100 -d25 -l1000000
82       #0: ID13110, P99, CPU0, I100; #1: ID13111, P99, CPU0, Cycles 1000000
83       #2: ID13112, P98, CPU1, I125; #3: ID13113, P98, CPU1, Cycles 813573
84       #4: ID13114, P97, CPU2, I150; #5: ID13115, P97, CPU2, Cycles 667285
85       #6: ID13116, P96, CPU3, I175; #7: ID13117, P96, CPU3, Cycles 591403
86       #1 -> #0, Min    1, Cur    2, Avg    2, Max   12
87       #3 -> #2, Min    1, Cur    3, Avg    2, Max   12
88       #5 -> #4, Min    1, Cur    3, Avg    3, Max   12
89       #7 -> #6, Min    1, Cur    2, Avg    3, Max   11
90

AUTHORS

92       Carsten Emde <C.Emde@osadl.org>
93

SEE ALSO

95       semop(2)
96
97                                      0.1                        svsematest(8)
Impressum