Tracing mysqld Using DTrace
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-start, command-start, query-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
For more information on DTrace and writing DTrace scripts, read the DTrace User Guide.
For an introduction to DTrace, see the MySQL Dev Zone article Getting started with DTracing MySQL.
Tracing mysqld Using DTrace的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 用Systemtap探索MySQL
http://www.actionsky.com/docs/archives/168#Systemtap 目录 1 Systemtap 2 Systemtap 观测点的支持程度 2.1 官方编译的My ...
- How to Use Dtrace Tracing Ruby Executing
http://googya.github.io/blog/categories/dtrace/ 最近看了点关于Dtrace的东西,它是个通用型的工具,但我主要集中于分析ruby程序的执行上面.关于操作 ...
- 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 ...
- dtrace 语法
Usage: dtrace [-aACeFHlqSvVwZ] [-arch i386|x86_64] [-b bufsz] [-c cmd] [-D name[=def]] [-I path ...
- 利用DTrace实时检测MySQl
与我们大多数人想象的不同,DTrace用于MySQL时不需对MySQL做任何更改.DTrace最强大的“提供器”(provider,是一组可观测的探测器)是FBT(Functional Boundar ...
- 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 ...
随机推荐
- 关于SizeOf、Length
结论: 到底什么时候用Length,SizeOf呢,我总结下使用Length,Sizeof的场景 1.Length(静态数组或动态数组)----没有问题 2.Length(string/shortst ...
- POJ 2955 Brackets(括号匹配一)
题目链接:http://poj.org/problem?id=2955 题目大意:给你一串字符串,求最大的括号匹配数. 解题思路: 设dp[i][j]是[i,j]的最大括号匹配对数. 则得到状态转移方 ...
- Django API验证(令牌)
1. 获取接口信息 Client端 import requests import time import hashlib ctime = time.time() key = 'akfljakfjakl ...
- MySQL学习笔记:生成时间维度表2
实现目的: 测试: # 测试 加一秒 SECOND), INTERVAL SECOND); SECOND),'%H%i%s');# 第一秒 SECOND),'%H%i%s');# 最后一秒 SELEC ...
- 使用Emacs:帮助篇
当你打开emacs并认真阅读“快速指南”后,你已经知道用C-x C-f打开文件,用C-x C-s保存文件,用C-x C-c退出emacs,可以在emacs中生存了.这里把Tutorial.cn中出现的 ...
- Visual Studio 2017各版本安装包离线下载
关于Visual Studio 2017各版本安装包离线下载.更新和安装的方法以及通过已下载版本减少下载量的办法 微软最近发布了正式版Visual Studio 2017并公开了其下载方式,不过由于V ...
- 100+torch的基础操作
官网: torch 各种操作,做个翻译,以后查阅 Tensors torch.is_tensor 如果 obj 是 pytorch 张量,则返回 True. torch.is_storage ...
- Web前端开发最佳实践(9):CSS代码太太乱,重复代码太多?你需要精简CSS代码
前言 提高网站整体加载速度的一个重要手段就是提高代码文件的网络传输速度.之前提到过,所有的代码文件都应该是经过压缩了的,这可提高网络传输速度,提高性能.除了压缩代码之外,精简代码也是一种减小代码文件大 ...
- Caffe训练AlexNet网络模型——问题一
训练AlexNet网络时,出现Check failed:datum_height >= crop_size (size vs. 227)错误,具体如下图所示: 根据提示,问题是crop_size ...
- 极简操作无需root隐藏S8导航栏和状态栏
距离三星Galaxy S8国行发布快一个礼拜了,相信论坛不少小同伴已经拿到手,许多人和我一样被那块全视曲面屏给诱惑剁手的,当拿到手把玩一段时间后却發现这么美的一块屏幕居然大部分应用上下都有一行碍眼的状 ...