统计最近N秒内的QPS值(包括每秒select,insert等值)
mysql> select variable_name,sum(per_sec) as qps from (select straight_join lower(gs0.variable_name) as variable_name, (gs1.variable_value - gs0.variable_value)/5 as per_sec from ( select variable_name ,variable_value from information_schema.global_status where variable_name in ('com_select','com_update','com_insert','com_replace','com_delete') union all select '',sleep(5) from dual ) as gs0 join information_schema.global_status gs1 using (variable_name)) t group by variable_name with rollup;
+---------------+---------+
| variable_name | qps |
+---------------+---------+
| com_delete | 0 |
| com_insert | 2.2 |
| com_replace | 0 |
| com_select | 11524.8 |
| com_update | 3 |
| NULL | 11530 |
+---------------+---------+
6 rows in set (5.00 sec)
统计db启动以来的qps值,慢查询数量等信息
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.5.35, for Linux (x86_64) using readline 5.1
Connection id: 98313987
Current database: udb
Current user: ucloud@172.23.0.48
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.35-log MySQL Community Server (GPL) by Remi
Protocol version: 10
Connection: 172.23.9.201 via TCP/IP
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
TCP port: 3206
Uptime: 274 days 1 hour 22 min 29 sec
Threads: 172 Questions: 7559640986 Slow queries: 150149138 Opens: 7799 Flush tables: 15 Open tables: 973 Queries per second avg: 319.261
以上这篇超简单的qps统计方法(推荐)就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。
统计qps
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?