安装实时监控mysql开源工具GitHub orzdba的操作方法
这期内容当中小编将会给大家带来有关安装实时监控mysql开源工具GitHub orzdba的操作方法,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
前言数据库运维日常工作是非常繁琐的,开源github上面有好多提升数据库工作效率的软件。其中orzdba就是非常好用的一款。它集成了操作系统vmstat及iostat的功能,兼有快速查看mysql一些性能指标的功效。而且消耗资源也非常少。
安装orzdba1,操作系统版本
[root@primarygtid~]#more/etc/redhat-releaseRedHatEnterpriseLinuxServerrelease6.8(Santiago)
2,下载并上传orzdba工具
[root@primarygtid~]#mkdir-p/monitor_tool
3,必须是python 2.7以上
[root@three57bin]#pythonPython2.7.17(default,Oct222019,13:24:01)[GCC4.4.720120313(RedHat4.4.7-17)]onlinux2Type"help","copyright","credits"or"license"formoreinformation.>>>[root@three57bin]#
4,安装gl python软件包
[root@three57monitor_dir]#python./gl.py
5,显示orzdba的具体用法
[root@three57monitor_dir]#ll总用量64-rw-r--r--1rootroot325410月2213:38gl.py-rw-r--r--1rootroot5759010月2213:36orzdba.py[root@three57monitor_dir]#python./orzdba.pyusage:orzdba.py[-h][-iINTERVAL][-t][-sys][-l][-c][-dDISK][-nNET][-s][-com][-innodb_rows][-innodb_pages][-innodb_data][-innodb_log][-innodb_status][-innodb][-T][-B][-rt][-hit][-mysql][-PPORT][-SSOCKET][-pPWD][-CCOUNT][-LLOGFILE][-logfile_by_day][-lazy][--nocolor]CreatedBylubo454331202@qq.comoptionalarguments:-h,--helpshowthishelpmessageandexit-iINTERVAL,--intervalINTERVALTime(second)Interval.-t,--timePrintTheCurrentTime.-sysprintSysInfo(include-l,-c,-s).-l,--loadPrintLoadInfo.-c,--cpuPrintCpuInfo.-dDISK,--diskDISKPrintDiskInfo.-nNET,--netNETPrintNetInfo.Time.-s,--swapPrintTheSwapInfo.-comprintmysqlstatus.-innodb_rowsPrintInnodbRowsStatus.-innodb_pagesPrintInnodbBufferPoolPagesStatus.-innodb_dataPrintInnodbDataStatus.-innodb_logPrintInnodbLogStatus.-innodb_statusPrintInnodbStatusfromCommand:"ShowEngineInnodbStatus".-innodbPrintInnodbInfo.-T,--threadsPrintThreadsStatus.-B,--bytesPrintBytesStatus.-rtPrintMySQLDBRT.-hitPrintInnodbHit%-mysqlprintSysInfo(PrintMySQLInfo(include-t,-com,-hit,-T,-B).-PPORT,--portPORTPortnumbertouseformysqlconnection(default3306).-SSOCKET,--socketSOCKETSocketfiletouseformysqlconnection.-pPWD,--pwdPWDrootuserpassword.-CCOUNT,--countCOUNTTimes.-LLOGFILE,--logfileLOGFILEathoflogfile.-logfile_by_dayonedayalogfile.-lazyPrintInfo(include-t,-l,-c,-s,-m,-hit).--nocolorPrintNOcolor.
6,显示实时性的平均负载及CPU和交换分区的信息
[root@primarygtidmonitor_tool]#pythonorzdba.py-i3-sys.=================================================.|Welcometousetheorzdbatool!||Yep...ChineseEnglish~||Createdbyluboqq:454331202~|'===============Date:2019-10-22================'HOST:primarygtidIP:127.0.0.1-------------load-avg-------cpu-usage------swap---time|1m5m15m|usrsysidliow|siso|13:27:46|0.050.160.17|00990|00|13:27:49|0.040.160.17|001000|00|13:27:52|0.040.160.17|001000|00|13:27:55|0.040.160.17|001000|00|
7,显示磁盘的读写及服务时间及响应时间
[root@primarygtidmonitor_tool]#pythonorzdba.py-i3-t-dsda1.=================================================.|Welcometousetheorzdbatool!||Yep...ChineseEnglish~||Createdbyluboqq:454331202~|'===============Date:2019-10-22================'HOST:primarygtidIP:127.0.0.1---------------------------------io-usage-----------------------time|r/sw/srkB/swkB/squeueawaitsvctm\%util|13:29:42|1.40.634.228.00.01.70.80.2|13:29:45|0.00.00.00.00.00.00.00.0|
8,显示 mysql INNODB相关信息
[root@primarygtidmonitor_tool]#pythonorzdba.py-innodb|Welcometousetheorzdbatool!||Yep...ChineseEnglish~||Createdbyluboqq:454331202~|'===============Date:2019-10-22================'HOST:primarygtidIP:127.0.0.1Ver:5.6.25-enterprise-commercial-advanced-logMySQLEnterpriseServer-AdvancedEdition(Commercial)DB:performance_schema|zxydbVar:binlog_format[ROW]max_connect_errors[100]max_connections[4000]max_user_connections[2500]open_files_limit[65535]sync_binlog[1]table_definition_cache[1424]table_open_cache[2048]thread_cache_size[1024]innodb_adaptive_flushing[ON]innodb_adaptive_hash_index[ON]innodb_buffer_pool_size[3G]innodb_file_per_table[ON]innodb_flush_log_at_trx_commit[1]innodb_flush_log_at_trx_commit[1]innodb_io_capacity[200]innodb_lock_wait_timeout[50]innodb_log_buffer_size[16M]innodb_log_file_size[2G]innodb_log_files_in_group[2]innodb_max_dirty_pages_pct[75]innodb_open_files[2048]innodb_read_io_threads[24]innodb_thread_concurrency[24]innodb_write_io_threads[24]-----------innodbbppagesstatus-------innodbdatastatus------innodblog--his--log(byte)--read---query---time|datafreedirtyflush|readswritesreadwritten|fsyncswritten|listuflushuckptviewinsideque|13:30:35|0000|0000|00|00.0b0.0b000|13:30:36|42919617800|0000|00|3510.0b0.0b000|13:30:37|42919617800|0000|00|3510.0b0.0b000|13:30:38|42919617800|0000|00|3510.0b0.0b000|13:30:39|42919617800|0000|00|3510.0b0.0b000|13:30:40|42919617800|0000|00|3510.0b0.0b000|
9,显示mysql QPS及TPS相关信息,并且显示所有相关的系统变量配置
[root@primarygtidmonitor_tool]#pythonorzdba.py-C10-i3-com.=================================================.|Welcometousetheorzdbatool!||Yep...ChineseEnglish~||Createdbyluboqq:454331202~|'===============Date:2019-10-22================'HOST:primarygtidIP:127.0.0.1Ver:5.6.25-enterprise-commercial-advanced-logMySQLEnterpriseServer-AdvancedEdition(Commercial)DB:performance_schema|zxydbVar:binlog_format[ROW]max_connect_errors[100]max_connections[4000]max_user_connections[2500]open_files_limit[65535]sync_binlog[1]table_definition_cache[1424]table_open_cache[2048]thread_cache_size[1024]innodb_adaptive_flushing[ON]innodb_adaptive_hash_index[ON]innodb_buffer_pool_size[3G]innodb_file_per_table[ON]innodb_flush_log_at_trx_commit[1]innodb_flush_log_at_trx_commit[1]innodb_io_capacity[200]innodb_lock_wait_timeout[50]innodb_log_buffer_size[16M]innodb_log_file_size[2G]innodb_log_files_in_group[2]innodb_max_dirty_pages_pct[75]innodb_open_files[2048]innodb_read_io_threads[24]innodb_thread_concurrency[24]innodb_write_io_threads[24]-----------QPS--TPS-----------insupddelseliud|00000|00020|00020|00020|
10,示mysql QPS及TPS及HIT及THREAD和BYTE相关信息
[root@primarygtidmonitor_tool]#pythonorzdba.py-mysql-C10-i3.=================================================.|Welcometousetheorzdbatool!||Yep...ChineseEnglish~||Createdbyluboqq:454331202~|'===============Date:2019-10-22================'HOST:primarygtidIP:127.0.0.1Ver:5.6.25-enterprise-commercial-advanced-logMySQLEnterpriseServer-AdvancedEdition(Commercial)DB:performance_schema|zxydbVar:binlog_format[ROW]max_connect_errors[100]max_connections[4000]max_user_connections[2500]open_files_limit[65535]sync_binlog[1]table_definition_cache[1424]table_open_cache[2048]thread_cache_size[1024]innodb_adaptive_flushing[ON]innodb_adaptive_hash_index[ON]innodb_buffer_pool_size[3G]innodb_file_per_table[ON]innodb_flush_log_at_trx_commit[1]innodb_flush_log_at_trx_commit[1]innodb_io_capacity[200]innodb_lock_wait_timeout[50]innodb_log_buffer_size[16M]innodb_log_file_size[2G]innodb_log_files_in_group[2]innodb_max_dirty_pages_pct[75]innodb_open_files[2048]innodb_read_io_threads[24]innodb_thread_concurrency[24]innodb_write_io_threads[24]-------------------QPS--TPS-----------------Hit%-----------threads-----------bytes----time|insupddelseliud|lorhit|runconcrecac|recvsend|13:34:44|00000|0100.00|0000|00|13:34:47|00020|0100.00|3501|391b522b|
上述就是小编为大家分享的安装实时监控mysql开源工具GitHub orzdba的操作方法了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注亿速云行业资讯频道。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。