安装 orzdba
代码SVN地址:http://code.taobao.org/p/orzdba/src/trunk/
说明:Perl脚本,用于对Linux主机和MySQL相关指标进行实时监控。
- 修改代码160行左右配置MySQL的相关验证信息,如username,password,host,port,sock等
- 安装tcprstat
- 安装orzdba_rt_depend_perl_module.tar.gz依赖包(version模块、Class-Data-Inheritable模块、Module-Build模块、File-Lockfile模块)
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 :
-h,--help Print Help Info.
-i,--interval Time(second) Interval. # 数据抓取间隔(秒)
-C,--count Times. # 抓取总次数
-t,--time Print The Current Time.
-nocolor Print NO Color.
-l,--load Print Load Info.
-c,--cpu Print Cpu Info.
-s,--swap Print Swap Info.
-d,--disk Print Disk Info.
-n,--net Print Net Info.
-P,--port Port number to use for mysql connection(default 3306).
-S,--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/w