1mysqld_qslower(8)           System Manager's Manual          mysqld_qslower(8)
2
3
4

NAME

6       mysqld_qslower - Trace MySQL server queries slower than a threshold.
7

SYNOPSIS

9       mysqld_qslower PID [min_ms]
10

DESCRIPTION

12       This  traces  queries  served  by a MySQL server, and prints those that
13       exceed a custom latency (query duration) threshold. By default, a mini‐
14       mum  threshold  of  1 millisecond is used. If a threshold of 0 is used,
15       all queries are printed.
16
17       This uses User Statically-Defined  Tracing  (USDT)  probes,  a  feature
18       added  to  MySQL  for DTrace support, but which may not be enabled on a
19       given MySQL installation. See requirements.
20
21       Since this uses BPF, only the root user can use this tool.
22

REQUIREMENTS

24       CONFIG_BPF, bcc, and MySQL server with USDT probe support (when config‐
25       uring the build: -DENABLE_DTRACE=1).
26

OPTIONS

28       PID Trace this mysqld PID.
29
30       min_ms Minimum  query  latency  (duration)  to  trace, in milliseconds.
31              Default is 1 ms.
32

EXAMPLES

34       Trace MySQL server queries slower than 1 ms for PID 1981:
35              # mysqld_qslower 1981
36
37       Trace slower than 10 ms for PID 1981:
38              # mysqld_qslower 1981 10
39

FIELDS

41       TIME(s)
42              Time of query start, in seconds.
43
44       PID    Process ID of the traced server.
45
46       MS     Milliseconds for the query, from start to end.
47
48       QUERY  Query string, truncated to 128 characters.
49

OVERHEAD

51       This adds low-overhead instrumentation to MySQL queries, and only emits
52       output data from kernel to user-level if they query exceeds the thresh‐
53       old. If the server query rate is less than 1,000/sec, the  overhead  is
54       expected  to  be negligible. If the query rate is higher, test to gauge
55       overhead.
56

SOURCE

58       This is from bcc.
59
60              https://github.com/iovisor/bcc
61
62       Also look in the bcc distribution for a  companion  _examples.txt  file
63       containing example usage, output, and commentary for this tool.
64

OS

66       Linux
67

STABILITY

69       Unstable - in development.
70

AUTHOR

72       Brendan Gregg
73

SEE ALSO

75       biosnoop(8)
76
77
78
79USER COMMANDS                     2016-08-01                 mysqld_qslower(8)
Impressum