1pmqtest(8) pmqtest(8)
2
3
4
6 pmqtest - Start pairs of threads and measure the latency of interpro‐
7 cess communication with POSIX messages queues
8
10 pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-i INTV] [-l loops] [-p PRIO]
11 [-S] [-t|-t NUM] [-T TO]
12
14 The program pmqtest starts pairs of threads that are synchronized via
15 mq_send/mw_receive() and measures the latency between sending and
16 receiving the message.
17
19 -a, --affinity[=PROC]
20 Run on processor number PROC. If PROC is not specified, run on
21 current processor.
22
23 -b, --breaktrace=USEC
24 Send break trace command when latency > USEC. This is a debug‐
25 ging option to control the latency tracer in the realtime pre‐
26 emption patch. It is useful to track down unexpected large
27 latencies of a system.
28
29 -d, --distance=DIST
30 Set the distance of thread intervals in microseconds (default is
31 500 us). When pmqtest is called with the -t option and more than
32 one thread is created, then this distance value is added to the
33 interval of the threads: Interval(thread N) = Interval(thread
34 N-1) + DIST
35
36 -D, --duration=TIME
37 Specify a length for the test run.
38 Append 'm', 'h', or 'd' to specify minutes, hours or days.
39
40 -f, --forcetimeout=TO
41 Set an artificial delay of the send function to force timeout of
42 the receiver, requires the -T option
43
44 -i, --interval=INTV
45 Set the base interval of the thread(s) in microseconds (default
46 is 1000 us). This sets the interval of the first thread. See
47 also -d.
48
49 -l, --loops=LOOPS
50 Set the number of loops. The default is 0 (endless). This option
51 is useful for automated tests with a given number of test
52 cycles. pmqtest is stopped once the number of timer intervals
53 has been reached.
54
55 -p, --prio=PRIO
56 Set the priority of the process.
57
58 -S, --smp
59 Test mode for symmetric multi-processing, implies -a and -t and
60 uses the same priority on all threads.
61
62 -t, --threads[=NUM]
63 Set the number of test threads (default is 1, if this option is
64 not given). If NUM is specified, create NUM test threads. If NUM
65 is not specified, NUM is set to the number of available CPUs.
66
67 -T, --timeout=TO
68 Use mq_timedreceive() instead of mq_receive() and specify time‐
69 out TO in seconds.
70
72 The following example was running on an 8-way processor:
73
74 # pmqtest -Sp99 -i100 -d0
75 #0: ID10047, P99, CPU0, I100; #1: ID10048, P99, CPU0, Cycles 153695
76 #2: ID10049, P99, CPU1, I100; #3: ID10050, P99, CPU1, Cycles 154211
77 #4: ID10051, P99, CPU2, I100; #5: ID10052, P99, CPU2, Cycles 156823
78 #6: ID10053, P99, CPU3, I100; #7: ID10054, P99, CPU3, Cycles 158202
79 #8: ID10055, P99, CPU4, I100; #9: ID10056, P99, CPU4, Cycles 153399
80 #10: ID10057, P99, CPU5, I100; #11: ID10058, P99, CPU5, Cycles 153992
81 #12: ID10059, P99, CPU6, I100; #13: ID10060, P99, CPU6, Cycles 156576
82 #14: ID10061, P99, CPU7, I100; #15: ID10062, P99, CPU7, Cycles 157957
83 #1 -> #0, Min 1, Cur 8, Avg 5, Max 18
84 #3 -> #2, Min 1, Cur 4, Avg 5, Max 18
85 #5 -> #4, Min 1, Cur 5, Avg 5, Max 19
86 #7 -> #6, Min 1, Cur 4, Avg 4, Max 17
87 #9 -> #8, Min 1, Cur 9, Avg 5, Max 18
88 #11 -> #10, Min 1, Cur 8, Avg 5, Max 18
89 #13 -> #12, Min 1, Cur 4, Avg 5, Max 29
90 #15 -> #14, Min 1, Cur 8, Avg 4, Max 17
91
93 Carsten Emde <C.Emde@osadl.org>
94
96 mq_send(3p), mq_receive(3p)
97
98
99
100 0.1 pmqtest(8)