前言
数据库运维日常工作是非常繁琐的,开源github上面有好多提升数据库工作效率的软件。其中orzdba就是非常好用的一款。它集成了操作系统vmstat及iostat的功能,兼有快速查看mysql一些性能指标的功效。而且消耗资源也非常少。
安装orzdba
1,操作系统版本
[root@primarygtid ~]# more /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
2,下载并上传orzdba工具
[root@primarygtid ~]# mkdir -p /monitor_tool
3,必须是python 2.7以上
[root@three57 bin]# python
Python 2.7.17 (default, Oct 22 2019, 13:24:01)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
[root@three57 bin]#
4,安装gl python软件包
[root@three57 monitor_dir]# python ./gl.py
5,显示orzdba的具体用法
[root@three57 monitor_dir]# ll
总用量 64
-rw-r--r-- 1 root root 3254 10月 22 13:38 gl.py
-rw-r--r-- 1 root root 57590 10月 22 13:36 orzdba.py
[root@three57 monitor_dir]# python ./orzdba.py
usage: orzdba.py [-h] [-i INTERVAL] [-t] [-sys] [-l] [-c] [-d DISK] [-n NET]
[-s] [-com] [-innodb_rows] [-innodb_pages] [-innodb_data]
[-innodb_log] [-innodb_status] [-innodb] [-T] [-B] [-rt]
[-hit] [-mysql] [-P PORT] [-S SOCKET] [-p PWD] [-C COUNT]
[-L LOGFILE] [-logfile_by_day] [-lazy] [--nocolor]
Created By lubo 454331202@qq.com
optional arguments:
-h, --help show this help message and exit
-i INTERVAL, --interval INTERVAL
Time(second) Interval.
-t, --time Print The Current Time.
-sys print SysInfo (include -l,-c,-s).
-l, --load Print Load Info.
-c, --cpu Print Cpu Info.
-d DISK, --disk DISK Print Disk Info.
-n NET, --net NET Print Net Info.Time.
-s, --swap Print The Swap Info.
-com print mysql status.
-innodb_rows Print Innodb Rows Status.
-innodb_pages Print Innodb Buffer Pool Pages Status.
-innodb_data Print Innodb Data Status.
-innodb_log Print Innodb Log Status.
-innodb_status Print Innodb Status from Command: "Show Engine Innodb
Status".
-innodb Print Innodb Info.
-T, --thr