在线精品99_中国九九盗摄偷拍偷看_91免费版在线观看_91.app_91高清视频在线_99热最新网站

Mysql tools中的orzdba举例分析

115次阅读
没有评论

共计 4548 个字符,预计需要花费 12 分钟才能阅读完成。

本篇内容主要讲解“Mysql tools 中的 orzdba 举例分析”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让丸趣 TV 小编来带大家学习“Mysql tools 中的 orzdba 举例分析”吧!

mysql 工具集:orzdba
修改代码 160 行左右配置 MySQL 的相关验证信息, 如 username,password,host,port,sock 等
安装 tcprstat
安装 orzdba_rt_depend_perl_module.tar.gz 依赖包(version 模块、Class-Data-Inheritable 模块、Module-Build 模块、File-Lockfile 模块)

cd Perl_Module/
perl Makefile.PL
make
make install

cd Module-Build-0.31
perl  Makefile.PL
make
make install

cd File-Lockfile-v1.0.5
perl Build.PL
perl ./Build
perl ./Build test
perl ./Build install

cd version-0.99
perl  Makefile.PL
make
make install

mv orzdba.txt orzdba
./orzdba.sh –help

grep -n my $MYSQL orzdba
root@pts/1 # 修改代码:
160 my $MYSQL = qq{mysql -s –skip-column-names -uroot -P$port};
161 $MYSQL .= qq{-S$socket} if defined $socket;
162 my $TCPRSTAT =“/usr/bin/tcprstat –no-header -t 1 -n 0 -p $port”;

修改为:

这个步骤可以不用,主要是因为有密码报警
160 my $MYSQL = qq{mysql -s –skip-column-names -uroot -P$port -h227.0.0.1 -p12345678};
161 $MYSQL .= qq{-S$socket} if defined $socket;
162 my $TCPRSTAT =“/usr/bin/tcprstat –no-header -t 1 -n 0 -p $port”;

报错处理:
ERROR 1054 (42S22) at line 1: Unknown column Com_select in where clause

修改代码如下:

 -e show variables where Variable_name in (sync_binlog , max_connections , max_user_connections , max_connect_errors , table_open_cache , table_definition_cache , thread_cache_size , binlog_format , open_files_limit , max_binlog_size , max_binlog_cache_size)

改成:
 -e show variables where Variable_name in (sync_binlog , max_connections , max_user_connections , max_connect_errors , table_open_cache , table_definition_cache , thread_cache_size , binlog_format , open_files_limit , max_binlog_size , max_binlog_cache_size)

错误代码
-e show variables where Variable_name in (innodb_flush_log_at_trx_commit , innodb_flush_method , innodb_buffer_pool_size , innodb_max_dirty_pages_pct , innodb_log_buffer_size , innodb_log_fil        e_size , innodb_log_files_in_group , innodb_thread_concurrency , innodb_file_per_table , innodb_adaptive_hash_index , innodb_open_files , innodb_io_capacity , innodb_read_io_threads , innodb_write_io_threads , innodb_adaptive_fl        ushing , innodb_lock_wait_timeout , innodb_log_files_in_group)

改成
 -e show variables where Variable_name in (innodb_flush_log_at_trx_commit , innodb_flush_method , innodb_buffer_pool_size , innodb_max_dirty_pages_pct , innodb_log_buffer_size , innodb_log_fil        e_size , innodb_log_files_in_group , innodb_thread_concurrency , innodb_file_per_table , innodb_adaptive_hash_index , innodb_open_files , innodb_io_capacity , innodb_read_io_threads , innodb_write_io_threads , innodb_adaptive_fl        ushing , innodb_lock_wait_timeout , innodb_log_files_in_group)

错误代码
 -e show global status where Variable_name in (Com_select , Com_insert , Com_update , Com_delete , Innodb_buffer_pool_read_requests , Innodb_buffer_pool_reads , Innodb_rows_inserted , Innodb_rows_updated , Innodb_rows_deleted , Innodb_rows_read , Threads_running , Threads_connected , Threads_cached , Threads_created , Bytes_received , Bytes_sent , Innodb_buffer_pool_pages_data , Innodb_buffer_pool_pages_free , Innodb_buffer_pool_pages_dirty , Innodb_buffer_pool_pages_flushed , Innodb_data_reads , Innodb_data_writes , Innodb_data_read , Innodb_data_written , Innodb_os_log_fsyncs , Innodb_os_log_written)

  改成
 -e show global status where Variable_name in (Com_select , Com_insert , Com_update , Com_delete , Innodb_buffer_pool_read_requests , Innodb_buffer_pool_reads , Innodb_rows_inserted , Innodb_rows_updated , Innodb_rows_deleted , Innodb_rows_read , Threads_running , Threads_connected , Threads_cached , Threads_created , Bytes_received , Bytes_sent , Innodb_buffer_pool_pages_data , Innodb_buffer_pool_pages_free , Innodb_buffer_pool_pages_dirty , Innodb_buffer_pool_pages_flushed , Innodb_data_reads , Innodb_data_writes , Innodb_data_read , Innodb_data_written , Innodb_os_log_fsyncs , Innodb_os_log_written)
 
去掉密码告警信息
Warning: Using a password on the command line interface can be insecure.

创建加密密码:
mysql_config_editor set –user=root –password
ls -alh .my*
mysql_config_editor print –all

cd root
[root@server11 ~]# more .my.cnf
[client]
user=root
password=123456

  查看 Linux 主机指标
 ./orzdba -sys -C 10 -i 1 -t -d sda3

-sys:打印系统信息,包括 -t(打印当前时间)、-l(打印负载信息,分 1 分钟、5 分钟、15 分钟)、-c(打印 cpu 信息)、-s(打印交换分区信息)
-d:打印磁盘信息,需要指点磁盘设备名
-n:打印网络信息,接收和发送大小,需要指点网卡设备名

查看 MySQL 响应时间 (rt)
通过调用 tcprstat 来监控 MySQL 的响应时间。
./orzdba -rt -C 10 -i 1 -t -d sda

监控 InnoDB 的性能指标
./orzdba -innodb -C 10 -i 1

监控 MySQL Server 性能
./orzdba -mysql -C 10 -i 1

懒人模式:
nohup ./orzdba -lazy -d sda -C 5 -i 2 -L /tmp/orzdba.log   /dev/null 2 1
—————–
orzdba 报表

1、运行 orzdba 收集 mysql 相关性能数据,生成 log.xxxx-xx-xx 收集数据文件

这边我对 orzdba 稍微做了些修改,为了获得更加连续的数据

原:if ($mycount%15 == 0) {
修改 193 行为 if ($mycount%100000000 == 0) {

1

2

3

./orzdba -mysql -innodb_rows -C 500000 -i 5 \

 -S /u01/tmp/mysql.sock \

 -L /tmp/orzdba.log -logfile_by_day

2、使用 orzdba_report.py 分析 orzdba.log.xxxx-xx-xx 文件生成报表

orzdba_report.py 源码:orzdba_report

1

python orzdba_report.py orzdba.log.2016-02-21

到此,相信大家对“Mysql tools 中的 orzdba 举例分析”有了更深的了解,不妨来实际操作一番吧!这里是丸趣 TV 网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-19发表,共计4548字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 国产一区二区不卡视频 | 分享一个无毒不卡免费国产 | 一区二区三区中文国产亚洲 | 公粗挺进了我的密道在线播放贝壳 | 国产免费一区二区三区免费视频 | 无码av免费一区二区三区试看 | 欧美精品亚洲精品日韩专区va | 天天操夜操 | 国产亚洲第一页 | 久久99精品国产一区二区三区 | 亚洲学生妹高清av | www.亚洲天堂 | 一区二区视频在线观看 | 99精品国产闺蜜国产在线闺蜜 | 国产免费av片在线看 | 99久久精品久久久久久清纯 | 久久人人爽人人爽人人片av高请 | 久久精品免看国产成 | 新四虎影院 | 日日噜噜夜夜狠狠va视频 | 久久综合色综合 | 91免费版网站 | 在教室伦流澡到高潮h麻豆 在教室伦流澡到高潮h强圩电影 | 欧美精品久久久亚洲 | 欧美日本韩国 | 中国真实处破女www出血 | 久久三级电影 | 亚洲区小说区激情区图片区 | 韩国在线一区 | 18禁高潮出水呻吟娇喘蜜芽 | 国产一区二区精品久久91 | 日韩中文字幕精品久久 | 国产嘿嘿嘿视频在线观看 | 无码无套少妇毛多18p | 男人黄女人色视频在线观看 | 久久亚洲国产高清 | 久久免费99精品国产自在现线 | 福利一区视频 | www精品久久 | h视频网站在线观看 | 国产亚洲精品久久久网站好莱 |