In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to install orzdba in MySQL monitoring tools. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Install orzdba
Code SVN address: http://code.taobao.org/p/orzdba/src/trunk/
Description: Perl script for real-time monitoring of Linux hosts and MySQL-related indicators.
Modify about 160lines of code to configure MySQL related verification information, such as username,password,host,port,sock, etc.
Install tcprstat
Install orzdba_rt_depend_perl_module.tar.gz dependency packages (version module, Class-Data-Inheritable module, Module-Build module, File-Lockfile module)
Shell > grep-n'my $MYSQL' orzdba
160:my $MYSQL = qq {mysql-s-- skip-column-names-uroot-P$port}
Shell > chmod + x orzdba
Shell >. / orzdba-- help
=
Info:
Created By zhuxu@taobao.com
Usage:
Command line options:
-hmil Mustang help Print Help Info.
-imam Murray interval Time (second) Interval. # data capture interval (seconds)
-Cremlin Mutual Times. # Total number of crawls
-tmam Mustang time Print The Current Time.
-nocolor Print NO Color.
-lmmam Mustang load Print Load Info.
-CPU Print Cpu Info.
-Scrimson, Murphy, swap, Print Swap Info.
-djinghui Mustang disk Print Disk Info.
-NMAE MULTINE Print Net Info.
-Pmam Mushport Port number to use for mysql connection (default 3306).
-Smallink socket Socket file to use for mysql connection.
-com Print MySQL Status (Com_select,Com_insert,Com_update,Com_delete).
-hit Print Innodb Hit%.
-innodb_rows Print Innodb Rows Status (Innodb_rows_inserted/updated/deleted/read).
-innodb_pages Print Innodb Buffer Pool Pages Status (Innodb_buffer_pool_pages_data/free/dirty/flushed)
-innodb_data Print Innodb Data Status (Innodb_data_reads/writes/read/written)
-innodb_log Print Innodb Log Status (Innodb_os_log_fsyncs/written)
-innodb_status Print Innodb Status from Command: 'Show Engine Innodb Status'
(history list/ log unflushed/uncheckpointed bytes/ read views/ queries inside/queued)
-Tmil Murray threads Print Threads Status (Threads_running,Threads_connected,Threads_created,Threads_cached).
-rt Print MySQL DB RT (us).
-Bjorty murmurbytes Print Bytes received from/send to MySQL (Bytes_received,Bytes_sent).
-mysql Print MySQLInfo (include-t talk comm le le it mat le B).
-innodb Print InnodbInfo (include-t talk about innodency pages, people talking about innobance, people, people, etc., etc.)
-sys Print SysInfo (include-t LJI LRY C MAHULIZS)
-lazy Print Info (include-t people talk about people, etc.)
-Ljon Murray Lou file Print to Logfile.
-logfile_by_day One day a logfile,the suffix of logfile is' yyyy-mm-dd'
And is valid with-L.
Sample:
Shell > nohup. / orzdba-lazy-d sda-C 5-I 2-L / tmp/orzdba.log > / dev/null 2 > & 1 &
=
View Linux host metrics
Shell >. / orzdba-sys-C 10-I 1-t-d sda
. =.
| | Welcome to use the orzdba tool! |
| | Yep...Chinese English~ |
'= Date: 2014-12-31 ='
HOST: rac3 IP: 127.0.0.1
-load-avg-----cpu-usage----swap----io-usage
Time | 1m 5m 15m | usr sys idl iow | si so | r rkB/s wkB/s queue await svctm s rkB/s wkB/s queue await svctm% util |
02:14:13 | 0.08 0.02 0.01 | 00 100 0 | 00 | 0.3 7.7 2.7 0.0 6.0 2.0 0.1 |
02:14:14 | 0.08 0.02 0.01 | 0 397 0 | 0 0 | 0 3.0 0 11 9 0 0 0 4.0 1.3 0.4 |
02:14:15 | 0.08 0.02 0.01 | 0 397 0 | 0 0 | 0.06.7 0.0 30.5 0.0 2.1 0.7 0.5 |
02:14:16 | 0.080.020.01 | 02 98 0 | 0 0 | 0.0 0.0 0.0 |
02:14:17 | 0.080.020.01 | 0 397 0 | 0 0 | 0.0 0.0 0.0 |
02:14:18 | 0.07 0.02 0.00 | 0 3960 | 00 | 0.0 0.0 0.0 |
02:14:19 | 0.07 0.02 0.00 | 0 397 0 | 00 | 0.01.9 0.0 7.5 0.0 4.0 2.0 0.4 |
02:14:20 | 0.07 0.02 0.00 | 0 4960 | 00 | 0.05.0 0.0 51.7 0.0 0.8 0.4 0.2 |
02:14:21 | 0.07 0.02 0.00 | 0 3960 | 00 | 0.0 0.0 0.0 |
02:14:22 | 0.07 0.02 0.00 | 0 4960 | 00 | 0.0 0.0 0.0 |
02:14:23 | 0.07 0.02 0.00 | 0 397 0 | 00 | 0.0 0.0 0.0 |
-sys: print system information, including-t (print current time),-l (print load information, 1 minute, 5 minutes, 15 minutes),-c (print cpu information),-s (print exchange partition information)
-d: print disk information, you need to point to the disk device name
-n: print network information, receive and send size, need to point to the name of the network card device
To view DISK (- d) and NET (- n), you need a specific device name (you can check the devices in / proc/diskstats and / proc/net/dev or take them from iostat.
And sar-n DEV)
The data of Linux metrics all come from the relevant system metadata in the / proc directory:
LOAD: / proc/loadavg
CPU: / proc/stat
SWAP: / proc/vmstat
DISK: / proc/diskstats
NET: / proc/net/dev
View MySQL response time (rt)
The response time of the MySQL is monitored by calling tcprstat.
Shell >. / orzdba-rt-C 10-I 1-t-d sda
. =.
| | Welcome to use the orzdba tool! |
| | Yep...Chinese English~ |
'= Date: 2014-12-31 ='
-io-usage----tcprstat (us)-
Time | rAccord s wplash s rkB/s wkB/s queue await svctm% util | count avg 95-avg 99-avg |
01:53:22 | 0.0 0.0 0.1 0.0 0.0 0.4 0.4 0.0 | 0 000 |
01:53:24 | 0.0 0.0 0.0 | 0 000 |
01:53:25 | 0.0 0.0 0.0 | 0 000 |
01:53:26 | 0.0 0.0 0.0 | 0 000 |
01:53:27 | 0.0 0.0 0.0 | 0 000 |
01:53:28 | 0.0 0.0 0.0 | 0 000 |
01:53:29 | 0.0 0.0 0.0 | 0 000 |
01:53:30 | 0.0 0.0 0.0 | 0 000 |
01:53:31 | 0.0 0.0 0.0 | 0 000 |
01:53:32 | 0.0 0.0 0.0 | 0 000 |
01:53:33 | 0.0 0.0 0.0 | 0 000 |
Monitor the performance metrics of InnoDB
Shell >. / orzdba-innodb-C 10-I 1
. =.
| | Welcome to use the orzdba tool! |
| | Yep...Chinese English~ |
'= Date: 2014-12-31 ='
-innodb bp pages status--- innodb data status---- innodb log-- his-- log (byte)-read-query
Time | data free dirty flush | reads writes read written | fsyncs written | list uflush uckpt view inside que |
01:48:38 | 0 000 | 0 000 | 0 0 | 0 000 0 |
01:48:39 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:40 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:41 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:42 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:43 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:44 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:45 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:46 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:47 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
01:48:48 | 638 7553 0 0 | 0 000 | 0 0 | 35 000 0 0 |
Monitor MySQL Server performanc
Shell >. / orzdba-mysql-C 10-I 1
. =.
| | Welcome to use the orzdba tool! |
| | Yep...Chinese English~ |
'= Date: 2014-12-31 ='
-- QPS--TPS--Hit%--threads--bytes
Time | ins upd del sel iud | lor hit | run con cre cac | recv send |
01:45:58 | 0 100.00 | 0 00 | 00 | 00 |
01:45:59 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:01 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:02 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:03 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:04 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:05 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:06 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:07 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:08 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
01:46:09 | 00 01 0 | 0 100.00 | 1 200 | 839 1k |
Installation problems:
Usage: Socket::inet_ntoa (ip_address_sv) at. / orz line 477
Write the hostname and IP to the / etc/hosts file because the hostname cannot be resolved.
This is the end of the article on "how to install orzdba in MySQL monitoring tools". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.