oracle linux 7.3 下用dtrace 跟踪 mysql-community-server-5.6.20

时间:2022-02-10 04:28:13

第一部分:oracle linux 7.3 dtrace 安装:

http://public-yum.oracle.com/
 
内核升极到
[root@server1 SPECS]# uname -r
4.1.12-94.3.8.el7uek.x86_64
 
yum install \
kernel-uek-firmware-4.1.12-94.3.8.el7uek.noarch \
kernel-uek-debug-devel-4.1.12-94.3.8.el7uek.x86_64 \
kernel-uek-doc-4.1.12-94.3.8.el7uek.noarch \
kernel-uek-devel-4.1.12-94.3.8.el7uek.x86_64 \
kernel-uek-4.1.12-94.3.8.el7uek.x86_64 \
 
 
安装DTRACE 程序
yum install
dtrace-utils-devel-0.6.0-3.el7.x86_64      //手动下载
dtrace-utils-0.6.0-3.el7.x86_64            //手动下载
dtrace-modules-4.1.12-94.3.8.el7uek-0.6.0-4.el7.x86_64
 
探针模块加载:
[root@server1 ~]# cat probe.sh
cd /usr/lib/modules/4.1.12-94.3.8.el7uek.x86_64/kernel/drivers/dtrace/
modprobe fbt
modprobe profile
modprobe systrace
modprobe fasttrap
modprobe dtrace
modprobe sdt
 
 
测试:
Testing function entry codes
[root@oel65 Dtrace]# dtrace -n 'syscall::open:entry  { printf("Exec: %s  File: %s" , execname , stringof(arg0) ); }'
dtrace: description 'syscall::open:entry  ' matched 1 probe
CPU     ID                    FUNCTION:NAME
  0      8                       open:entry Exec: udisks-daemon  File: /dev/sr0
  0      8                       open:entry Exec: vminfo  File: /var/run/utmp
  0      8                       open:entry Exec: vminfo  File: /etc/passwd

第二部分MYSQL 安装

1.选择版本:mysql-community-server-5.6.20 起开始内置dtrace(但是mysql 8.0 移除)
2.下载:
http://public-yum.oracle.com/
http://public-yum.oracle.com/repo/OracleLinux/OL7/MySQL56/x86_64/index.html下载四个文件
mysql-community-client-5.6.20-4.el7.x86_64.rpm
mysql-community-common-5.6.20-4.el7.x86_64.rpm
mysql-community-server-5.6.20-4.el7.x86_64.rpm
mysql-community-libs-5.6.20-4.el7.x86_64.rpm
3.安装:
rpm -ivh mysql-community-libs-5.6.20-4.el7.x86_64.rpm
rpm -ivh mysql-community-common-5.6.20-4.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.6.20-4.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.6.20-4.el7.x86_64.rpm
4.文件安装位置
[root@server1 data]# rpm -ql  mysql-community-server-5.6.20-4.el7.x86_64
/etc/logrotate.d/mysql
/etc/my.cnf
/usr/bin/innochecksum
/usr/bin/my_print_defaults
/usr/bin/myisam_ftdump
/usr/bin/myisamchk
/usr/bin/myisamlog
/usr/bin/myisampack
/usr/bin/mysql-systemd-start
/usr/bin/mysql_convert_table_format
/usr/bin/mysql_fix_extensions
/usr/bin/mysql_install_db
/usr/bin/mysql_plugin
/usr/bin/mysql_secure_installation
/usr/bin/mysql_tzinfo_to_sql
/usr/bin/mysql_upgrade
/usr/bin/mysql_zap
/usr/bin/mysqlbug
/usr/bin/mysqld_multi
/usr/bin/mysqld_safe
/usr/bin/mysqldumpslow
/usr/bin/mysqlhotcopy
/usr/bin/mysqltest
/usr/bin/perror
/usr/bin/replace
/usr/bin/resolve_stack_dump
/usr/bin/resolveip
/usr/lib/systemd/system/mysqld.service
/usr/lib/tmpfiles.d/mysql.conf
/usr/lib64/mysql/plugin
/usr/lib64/mysql/plugin/adt_null.so
/usr/lib64/mysql/plugin/auth.so
/usr/lib64/mysql/plugin/auth_socket.so
/usr/lib64/mysql/plugin/auth_test_plugin.so
/usr/lib64/mysql/plugin/daemon_example.ini
/usr/lib64/mysql/plugin/debug
/usr/lib64/mysql/plugin/debug/adt_null.so
/usr/lib64/mysql/plugin/debug/auth.so
/usr/lib64/mysql/plugin/debug/auth_socket.so
/usr/lib64/mysql/plugin/debug/auth_test_plugin.so
/usr/lib64/mysql/plugin/debug/innodb_engine.so
/usr/lib64/mysql/plugin/debug/libdaemon_example.so
/usr/lib64/mysql/plugin/debug/libmemcached.so
/usr/lib64/mysql/plugin/debug/mypluglib.so
/usr/lib64/mysql/plugin/debug/qa_auth_client.so
/usr/lib64/mysql/plugin/debug/qa_auth_interface.so
/usr/lib64/mysql/plugin/debug/qa_auth_server.so
/usr/lib64/mysql/plugin/debug/semisync_master.so
/usr/lib64/mysql/plugin/debug/semisync_slave.so
/usr/lib64/mysql/plugin/debug/validate_password.so
/usr/lib64/mysql/plugin/innodb_engine.so
/usr/lib64/mysql/plugin/libdaemon_example.so
/usr/lib64/mysql/plugin/libmemcached.so
/usr/lib64/mysql/plugin/mypluglib.so
/usr/lib64/mysql/plugin/qa_auth_client.so
/usr/lib64/mysql/plugin/qa_auth_interface.so
/usr/lib64/mysql/plugin/qa_auth_server.so
/usr/lib64/mysql/plugin/semisync_master.so
/usr/lib64/mysql/plugin/semisync_slave.so
/usr/lib64/mysql/plugin/validate_password.so
/usr/sbin/mysqld
/usr/sbin/mysqld-debug
/usr/share/doc/mysql-community-server-5.6.20/COPYING
/usr/share/doc/mysql-community-server-5.6.20/ChangeLog
/usr/share/doc/mysql-community-server-5.6.20/INFO_BIN
/usr/share/doc/mysql-community-server-5.6.20/INFO_SRC
/usr/share/doc/mysql-community-server-5.6.20/README
/usr/share/doc/mysql-community-server-5.6.20/my-default.cnf
/usr/share/man/man1/innochecksum.1.gz
/usr/share/man/man1/my_print_defaults.1.gz
/usr/share/man/man1/myisam_ftdump.1.gz
/usr/share/man/man1/myisamchk.1.gz
/usr/share/man/man1/myisamlog.1.gz
/usr/share/man/man1/myisampack.1.gz
/usr/share/man/man1/mysql.server.1.gz
/usr/share/man/man1/mysql_convert_table_format.1.gz
/usr/share/man/man1/mysql_fix_extensions.1.gz
/usr/share/man/man1/mysql_install_db.1.gz
/usr/share/man/man1/mysql_plugin.1.gz
/usr/share/man/man1/mysql_secure_installation.1.gz
/usr/share/man/man1/mysql_tzinfo_to_sql.1.gz
/usr/share/man/man1/mysql_upgrade.1.gz
/usr/share/man/man1/mysql_zap.1.gz
/usr/share/man/man1/mysqlbug.1.gz
/usr/share/man/man1/mysqld_multi.1.gz
/usr/share/man/man1/mysqld_safe.1.gz
/usr/share/man/man1/mysqldumpslow.1.gz
/usr/share/man/man1/mysqlhotcopy.1.gz
/usr/share/man/man1/mysqlman.1.gz
/usr/share/man/man1/mysqltest.1.gz
/usr/share/man/man1/perror.1.gz
/usr/share/man/man1/replace.1.gz
/usr/share/man/man1/resolve_stack_dump.1.gz
/usr/share/man/man1/resolveip.1.gz
/usr/share/man/man8/mysqld.8.gz
/usr/share/mysql/SELinux/RHEL4/mysql.fc
/usr/share/mysql/SELinux/RHEL4/mysql.te
/usr/share/mysql/dictionary.txt
/usr/share/mysql/fill_help_tables.sql
/usr/share/mysql/innodb_memcached_config.sql
/usr/share/mysql/magic
/usr/share/mysql/my-default.cnf
/usr/share/mysql/mysql-log-rotate
/usr/share/mysql/mysql_security_commands.sql
/usr/share/mysql/mysql_system_tables.sql
/usr/share/mysql/mysql_system_tables_data.sql
/usr/share/mysql/mysql_test_data_timezone.sql
/var/lib/mysql
/var/run/mysqld
5. 配制my.cnf
  datadir     mysql.sock   error.log    etc
6.测试
dtrace -l |c++filt
58746  mysql5011            mysqld         ha_myisam::rnd_next(unsigned char*) read-row-start
58747  mysql5011            mysqld         ha_tina::rnd_pos(unsigned char*, unsigned char*) read-row-start
58748  mysql5011            mysqld           ha_tina::rnd_next(unsigned char*) read-row-start
58749  mysql5011            mysqld     ha_blackhole::rnd_next(unsigned char*) read-row-start
58750  mysql5011            mysqld   ha_blackhole::rnd_pos(unsigned char*, unsigned char*) read-row-start
58751  mysql5011            mysqld handle_select(THD*, select_result*, unsigned long) select-done
58752  mysql5011            mysqld handle_select(THD*, select_result*, unsigned long) select-start
58753  mysql5011            mysqld    mysql_execute_command(THD*) update-done
58754  mysql5011            mysqld  handler::ha_update_row(unsigned char const*, unsigned char*) update-row-done
58755  mysql5011            mysqld  handler::ha_update_row(unsigned char const*, unsigned char*) update-row-start
58756  mysql5011            mysqld    mysql_execute_command(THD*) update-start

oracle linux 7.3 下用dtrace 跟踪 mysql-community-server-5.6.20的更多相关文章

  1. Oracle Linux 6.3下安装Oracle 11g R2(11.2.0.3)

    本文主要描写叙述了在Oracle Linux 6.3下安装Oracle 11gR2(11.2.0.3).从Oracle 11g開始,Oracle官方站点不再提供其Patch的下载链接,须要使用Meat ...

  2. Oracle Linux 7.3下载与 dtrace安装

    https://docs.oracle.com/cd/E52668_01/E86280/html/section_edm_dvp_hz.html http://www.oracle.com/techn ...

  3. windows XP 下的DTRACE 跟踪 学习

    https://github.com/prash-wghats/DTrace-win32 1. dtrace_loader.exe -l //to load dtrace drivers 2. C:\ ...

  4. linux(centos6.9)下rpm方式安装mysql后mysql服务无法启动

    以下两种方式启动都报错:启动失败: [root@node03 ~]# service mysqld startMySQL Daemon failed to start.Starting mysqld: ...

  5. linux、windows下导入、导出mysql数据库命令

    一.导出数据库用mysqldump命令(注意mysql的安装路径,即此命令的路径): 1.导出数据和表结构:[不是mysql里的命令]mysqldump -u用户名 -p密码 数据库名 > 数据 ...

  6. Red Hat Enterprise Linux 7.2下使用RPM包安装SQL Server vNext

    1.下载安装包 mssql-server:https://packages.microsoft.com/rhel/7/mssql-server/ mssql-tools:https://package ...

  7. 【Linux】Ubuntu下C语言访问MySQL数据库入门

    使用的系统是Ubuntu 11.10.数据库是MySQL. MySQL数据库环境配置 首先需要安装MySQL客户端和服务器,命令行安装方式为: sudo apt-get install mysql-s ...

  8. linux(centos6.9)下使用yum安装mysql,及启动MySQL等

    查看系统自带的mysql版本:rpm -qa | grep mysql 卸载mysql:rpm -e mysql-libs-5.1.73-8.el6_8.x86_64 --nodeps 1. 安装my ...

  9. 在 Oracle Linux 上使用 DTrace

    作者:Richard Friedman 简要介绍适用于 Oracle Linux 的 DTrace 探测器和提供程序,以及与 Oracle Solaris 中 DTrace 探测器和提供程序的区别.还 ...

随机推荐

  1. Linux 网络编程四(socket多线程升级版)

    //网络编程--客户端 #include <stdio.h> #include <stdlib.h> #include <string.h> #include &l ...

  2. tarjan算法模板

    终于能自己完整的打下来 #include<cstdio> #include<cstring> #include<iostream> #include<vect ...

  3. 剑指Offer23 二叉树中和为sum的路径

    /************************************************************************* > File Name: 23_FindPa ...

  4. sql server中创建链接服务器图解教程

    转自sql server中创建链接服务器图解教程 1.展开服务器对象-->链接服务器-->右击"新建链接服务器" 注意:必须以数据库管理员身份登录(通常也就是sa帐号) ...

  5. delphi 读网页线程TReadHtmlThread

    读网页,通常是一个耗时操作.故把读网页放入线程是显得比较重要了. 本例用改进后的 TIdhttpEx 加上线程来实现读网页. 它的父类TSimpleThread 在此 本例程源码在此 源码中包含了所有 ...

  6. 在 iOS 10&period;0 之后&comma; App 要调用手机相机与相簿应注意的事项

    iOS 的 SDK 每一年至少都会有一次大改版,从 2009 到 2016 年,版号已经到了第 10 版了,很轻易的就追上了 Mac OSX. 每一次的大改版都会有不少新的功能或新的规范,在 iOS ...

  7. Linux探索之路1---CentOS入坑笔记整理

    前言 上次跟运维去行方安装行内环境,发现linux命令还是不是很熟练.特别是用户权限分配以及vi下的快捷操作.于是决定在本地安装一个CentOS虚拟机,后面有时间就每天学习一点Linux常用命令. 作 ...

  8. dll导出函数的两种方式的比较

    最初的网页链接已经挂了, 在此贴一个中间的转载链接 https://blog.csdn.net/zhazhiqiang/article/details/51577523 一 概要 vs中导出 dll的 ...

  9. 微信小程序跳转小程序

    <navigator target="miniProgram" open-type="navigate" app-id="{{BappId}}& ...

  10. sklearn机器学习-泰坦尼克号

    sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...