mysqladmin -h127.0.0.1 -P20140 -r -i 2 extended-status |awk -F "|" 'BEGIN { count=0; } { if(2 ~ /Queries/){queries=2 ~ /Com_select /){com_select=2 ~ /Com_insert /){com_insert=2 ~ /Com_update /){com_update=2 ~ /Com_delete /){com_delete=2 ~ /Innodb_rows_read/){innodb_rows_read=2 ~ /Innodb_rows_deleted/){innodb_rows_deleted=2 ~ /Innodb_rows_inserted/){innodb_rows_inserted=2 ~ /Innodb_rows_updated/){innodb_rows_updated=2 ~ /Innodb_buffer_pool_read_requests/){innodb_lor=2 ~ /Innodb_buffer_pool_reads/){innodb_phr=2 ~ /Uptime / && count >= 2){ printf(" %s |%9d",strftime("%H:%M:%S"),queries);printf("|%6d %6d %6d %6d",com_select,com_insert,com_update,com_delete);printf("|%8d %7d %7d %7d",innodb_rows_read,innodb_rows_inserted,innodb_rows_updated,innodb_rows_deleted); printf("|%10d %11d\n",innodb_lor,innodb_phr);}}'
查看QPS、各种SQL执行频率、SQL操作的rows等
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 转载:http://blog.51cto.com/arthur376/1888931 orzdba是淘宝DBA团队...
- 1.A simple master-to-slave replication is currently being...
- 优化sql语句的一般步骤 通过show status命令了解各种sql执行频率 mysql> show statu...
- 先创建服务端的APP 1.官网下载Winrun4j。http://winrun4j.sourceforge.net...