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

NAME

8       pmqtest  -  Start pairs of threads and measure the latency of interpro‐
9       cess communication with POSIX messages queues
10

SYNTAX

12       pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME]  [-f  TO]  [-h]  [-i
13       INTV] [--json FILENAME] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM]
14

DESCRIPTION

16       The  program  pmqtest starts pairs of threads that are synchronized via
17       mq_send/mw_receive() and measures the latency between sending  and  re‐
18       ceiving the message.
19

OPTIONS

21       -a, --affinity[=PROC]
22              Run  on  processor number PROC. If PROC is not specified, run on
23              current processor.
24
25       -b, --breaktrace=USEC
26              Send break trace command when latency > USEC. This is  a  debug‐
27              ging  option  to control the latency tracer in the realtime pre‐
28              emption patch.  It is useful to track down unexpected large  la‐
29              tencies of a system.
30
31       -d, --distance=DIST
32              Set the distance of thread intervals in microseconds (default is
33              500 us). When pmqtest is called with the -t option and more than
34              one  thread is created, then this distance value is added to the
35              interval of the threads: Interval(thread  N)  =  Interval(thread
36              N-1) + DIST
37
38       -D, --duration=TIME
39              Specify a length for the test run.
40              Append 'm', 'h', or 'd' to specify minutes, hours or days.
41
42       -h, --help
43              Print help message
44
45       -f, --forcetimeout=TO
46              Set an artificial delay of the send function to force timeout of
47              the receiver, requires the -T option
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. pmqtest is stopped once the number of timer intervals  has
61              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              Test mode for symmetric multi-processing, implies -a and -t  and
72              uses the same priority on all threads.
73
74       -t, --threads[=NUM]
75              Set  the number of test threads (default is 1, if this option is
76              not given). If NUM is specified, create NUM test threads. If NUM
77              is not specified, NUM is set to the number of available CPUs.
78
79       -T, --timeout=TO
80              Use  mq_timedreceive() instead of mq_receive() and specify time‐
81              out TO in seconds.
82

EXAMPLES

84       The following example was running on an 8-way processor:
85
86       # pmqtest -Sp99 -i100 -d0
87       #0: ID10047, P99, CPU0, I100; #1: ID10048, P99, CPU0, Cycles 153695
88       #2: ID10049, P99, CPU1, I100; #3: ID10050, P99, CPU1, Cycles 154211
89       #4: ID10051, P99, CPU2, I100; #5: ID10052, P99, CPU2, Cycles 156823
90       #6: ID10053, P99, CPU3, I100; #7: ID10054, P99, CPU3, Cycles 158202
91       #8: ID10055, P99, CPU4, I100; #9: ID10056, P99, CPU4, Cycles 153399
92       #10: ID10057, P99, CPU5, I100; #11: ID10058, P99, CPU5, Cycles 153992
93       #12: ID10059, P99, CPU6, I100; #13: ID10060, P99, CPU6, Cycles 156576
94       #14: ID10061, P99, CPU7, I100; #15: ID10062, P99, CPU7, Cycles 157957
95       #1 -> #0, Min    1, Cur    8, Avg    5, Max   18
96       #3 -> #2, Min    1, Cur    4, Avg    5, Max   18
97       #5 -> #4, Min    1, Cur    5, Avg    5, Max   19
98       #7 -> #6, Min    1, Cur    4, Avg    4, Max   17
99       #9 -> #8, Min    1, Cur    9, Avg    5, Max   18
100       #11 -> #10, Min    1, Cur    8, Avg    5, Max   18
101       #13 -> #12, Min    1, Cur    4, Avg    5, Max   29
102       #15 -> #14, Min    1, Cur    8, Avg    4, Max   17
103

AUTHORS

105       Carsten Emde <C.Emde@osadl.org>
106

SEE ALSO

108       mq_send(3p), mq_receive(3p)
109
110
111
112                                      0.1                           pmqtest(8)
Impressum