http://dev.mysql.com/doc/refman/5.6/en/dba-dtrace-server.html

MySQL 5.6 Reference Manual -> 5 MySQL Server Administration :: 5.4 Tracing mysqld Using DTrace

5.4.1 mysqld DTrace Probe Reference

The DTrace probes in the MySQL server are designed to provide information about the execution of queries within MySQL and the different areas of the system being utilized during that process. The organization and triggering of the probes means that the execution of an entire query can be monitored with one level of probes (query-startand query-done) but by monitoring other probes you can get successively more detailed information about the execution of the query in terms of the locks used, sort methods and even row-by-row and storage-engine level execution information.

The DTrace probes are organized so that you can follow the entire query process, from the point of connection from a client, through the query execution, row-level operations, and back out again. You can think of the probes as being fired within a specific sequence during a typical client connect/execute/disconnect sequence, as shown in the following figure.

Figure 5.1 The MySQL Architecture Using Pluggable Storage Engines

Global information is provided in the arguments to the DTrace probes at various levels. Global information, that is, the connection ID and user/host and where relevant the query string, is provided at key levels (connection-startcommand-startquery-start, and query-exec-start). As you go deeper into the probes, it is assumed either you are only interested in the individual executions (row-level probes provide information on the database and table name only), or that you will combine the row-level probes with the notional parent probes to provide the information about a specific query. Examples of this will be given as the format and arguments of each probe are provided.

MySQL 5.6 includes support for DTrace probes on these platforms:

  • Solaris 10 Update 5 (Solaris 5/08) on SPARC, x86 and x86_64 platforms

  • OS X 10.4 and higher

  • Oracle Linux 6 and higher with UEK kernel (as of MySQL 5.6.20)

Enabling the probes should be automatic on these platforms. To explicitly enable or disable the probes during building, use the -DENABLE_DTRACE=1 or -DENABLE_DTRACE=0 option to CMake.

If a non-Solaris platform includes DTrace support, building mysqld on that platform will include DTrace support.

Additional Resources

Tracing mysqld Using DTrace的更多相关文章

  1. End-to-End Tracing of Ajax/Java Applications Using DTrace

    End-to-End Tracing of Ajax/Java Applications Using DTrace         By Amit Hurvitz, July 2007     Aja ...

  2. DTrace to Troubleshoot Java Native Memory Problems

    How to Use DTrace to Troubleshoot Java Native Memory Problems on Oracle Solaris 11 Hands-On Labs of ...

  3. Linux BPF/bcc for Oracle Tracing

    Luca Canali on 26 May 2016 Topic: In this post you will find a short discussion and pointers to the ...

  4. 用Systemtap探索MySQL

    http://www.actionsky.com/docs/archives/168#Systemtap 目录 1 Systemtap 2 Systemtap 观测点的支持程度 2.1 官方编译的My ...

  5. How to Use Dtrace Tracing Ruby Executing

    http://googya.github.io/blog/categories/dtrace/ 最近看了点关于Dtrace的东西,它是个通用型的工具,但我主要集中于分析ruby程序的执行上面.关于操作 ...

  6. Using Dtrace OEL 6.X and Oracle® Solaris 11.3 DTrace (Dynamic Tracing) Guide

    http://www.hhutzler.de/blog/using-dtrace/ https://docs.oracle.com/cd/E53394_01/html/E53395/gkyaz.htm ...

  7. dtrace 语法

    Usage: dtrace [-aACeFHlqSvVwZ] [-arch i386|x86_64] [-b bufsz] [-c cmd] [-D name[=def]]      [-I path ...

  8. 利用DTrace实时检测MySQl

    与我们大多数人想象的不同,DTrace用于MySQL时不需对MySQL做任何更改.DTrace最强大的“提供器”(provider,是一组可观测的探测器)是FBT(Functional Boundar ...

  9. Adding DTrace Probes to PHP Extensions

      By cj on Dec 06, 2012 The powerful DTrace tracing facility has some PHP-specific probes that can b ...

随机推荐

  1. mac系统安装redis

    1.下载 打开官网:https://redis.io/ Download---Stable---Download3.2.8,下载最新稳定版,这里是3.2.8 2.安装 下载完成后,打开命令行工具,执行 ...

  2. js中的call,apply,bind区别

    在JavaScript中,call.apply和bind是Function对象自带的三个方法,这三个方法的主要作用是改变函数中的this指向. call.apply.bind方法的共同点和区别:app ...

  3. 解决insert语句插入时,需要写列值的问题

    今天发现解决这个问题其实很简单,闲话不多谈,我直接附上语句 ) select @s = isnull(@s+',', '') + [name] from syscolumns where id = o ...

  4. **汇总CodeIgniter(CI)的数据库操作函数

    //查询: $query = $this->db_query("SELECT * FROM table"); ================================ ...

  5. 在Ubuntu 16.04 安装python3.6 环境并设置为默认

    在Ubuntu 16.04 安装python3.6 环境并设置为默认 1.添加python3.6安装包,并且安装 sudo apt-get install software-properties-co ...

  6. LogStash plugins-inputs-file介绍(三)

    官方文档 https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html 重要参数: path # 文件路径 sin ...

  7. 使用linux mysql客户端建立表时遇到格式解析的问题

    发现在notepad++写好的建表脚本,粘贴到linux客户端后,执行时总是报我的脚本有问题. 我看了又看,发现建表脚本本身是没有问题,问题出在"Tab"键上和注释上边了. 解决办 ...

  8. 在android studio中集成javah, ndk-build进行JNI开发

    最近在搞一个android上控制LED灯闪烁的功能,用到了串口编程,搜索了一下,发现Google发布了一个demo,android-serialport-api.有现成的代码和APK,要想自己改JNI ...

  9. Wannafly挑战赛9 B - 数一数

    链接:https://www.nowcoder.com/acm/contest/71/B来源:牛客网 题目描述 设s,t为两个字符串,定义f(s,t) = t的子串中,与s相等的串的个数.如f(&qu ...

  10. 【SQL】183. Customers Who Never Order

    Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL qu ...