sysbench测试MySQL筛选tps
log=$1
tps_array=`awk -F '[,:]' '{print $4}' ${log}`
zero=0
for tps in ${tps_array}
do
tps=`echo ${tps} |tr -d "."`
if [ ${tps} -eq 0 ]
then
zero=`expr ${zero} + 1`
fi
done
echo "tps 0 num: ${zero}"
文件内容:
[99080s] threads: 128, tps: 7565.93, reads: 105918.67, writes: 30243.15, response time: 41.23ms (95%), errors: 0.40, reconnects: 0.00
[99085s] threads: 128, tps: 7376.95, reads: 103291.67, writes: 29528.20, response time: 42.85ms (95%), errors: 0.40, reconnects: 0.00
[99090s] threads: 128, tps: 7816.97, reads: 109409.52, writes: 31259.06, response time: 41.00ms (95%), errors: 0.20, reconnects: 0.00
[99095s] threads: 128, tps: 6850.42, reads: 95919.01, writes: 27381.86, response time: 45.20ms (95%), errors: 0.80, reconnects: 0.00
[99100s] threads: 128, tps: 7360.14, reads: 103057.95, writes: 29448.55, response time: 43.25ms (95%), errors: 0.20, reconnects: 0.00
[99105s] threads: 128, tps: 7158.81, reads: 100239.21, writes: 28658.47, response time: 44.37ms (95%), errors: 0.20, reconnects: 0.00
[99110s] threads: 128, tps: 7284.31, reads: 101984.49, writes: 29135.42, response time: 43.92ms (95%), errors: 0.20, reconnects: 0.00
[99115s] threads: 128, tps: 7268.57, reads: 101723.54, writes: 29040.05, response time: 43.01ms (95%), errors: 0.80, reconnects: 0.00
[99120s] threads: 128, tps: 7079.80, reads: 99116.06, writes: 28319.02, response time: 44.86ms (95%), errors: 0.20, reconnects: 0.00
[99125s] threads: 128, tps: 7551.02, reads: 105736.69, writes: 30216.08, response time: 41.34ms (95%), errors: 0.60, reconnects: 0.00
执行结果:
shell.sh file
tps 0 num: 4
sysbench测试MySQL筛选tps的更多相关文章
- 使用sysbench测试mysql及postgresql(完整版)
使用sysbench测试mysql及postgresql(完整版) 转载请注明出处https://www.cnblogs.com/funnyzpc/p/14592166.html 前言 使用sysbe ...
- ubuntu 18.04使用sysbench测试MySQL性能
首先下载安装sysbench: sudo apt-get install sysbench -y 查看一下sysbench版本是多少: zifeiy@zifeiy-S1-Series:~$ sysbe ...
- sysbench 测试mysql性能
===== #1sysbench --test=oltp --oltp-table-size=10000 --mysql-db=test --mysql-user=root --mysql-passw ...
- sysbench 测试MYSQL
http://imysql.cn/tag/%E5%8E%8B%E6%B5%8B http://imysql.cn/node/312 https://www.percona.com/blog/2013/ ...
- 测试mysql
sysbench 测试mysql TODO emacs
- 使用sysbench对mysql压力测试
sysbench是一个模块化的.跨平台.多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况.关于这个项目的详细介绍请看:https://github.com/akopytov/sy ...
- 使用 sysbench对mysql进行压力测试介绍之一
sysbench是一款开源的多线程性能测试工具,可以执行CPU/内存/线程/IO/数据库等方面的性能测试.数据库目前支持MySQL/Oracle/PostgreSQL.本文只是简单演示一下几种测试的用 ...
- 使用sysbench对MySQL进行压力测试
1.背景 出自percona公司,是一款多线程系统压测工具,可以根据影响数据库服务器性能的各种因素来评估系统的性能.例如,可以用来测试文件IO,操作系统调度器,内存分配和传输速度,POSIX线程以及 ...
- sysbench测试工具
sysbench简介 Sysbench是一个模块化的.跨平台.多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况.它主要包括以下几种方式的测试:cpu性能,磁盘io性能,线程调度性 ...
随机推荐
- HDU - 4597 Play Game(博弈dp)
Play Game Alice and Bob are playing a game. There are two piles of cards. There are N cards in each ...
- KindEditor 销毁与自动高度冲突解决
前提准备情况: KindEditor(KE) + easyUI 1.通过 EasyUI.Window 打开一个窗口,窗口中包含一个 KE编辑器:在次打开WIndow 的时候 KE会出现编辑器里面的 ...
- java 乱码问题解决方案
java 乱码问题解决方案 一.tomcat: <Connector port="8080" maxThreads="150&qu ...
- spark(3) - scala独立编程
>>非集成: 环境需要 * spark 2.4.0 * scala 2.11.12 * sbt (打包) 开发过程 1.shell命令下创建项目目录结构 *****/ project / ...
- VirtualBox 5.0(虚拟机软件)里,安装Fedora遇到的问题!!
问题一: 安装完毕后,重新启动竟然还是进入了Fedora安装过程里. 问题原因:Fedora,并没有处理安装时候加载的ISO文件,依旧让VirtualBox 5.0运行它. 解决方法:在运行Fedor ...
- 区块链中的密码学(-)区块链中运用最广的散列算法-SHA256算法分析与实现
在很多技术人员的眼中,区块链并不是一种新的技术,而是过去很多年计算机技术的组合运用.而在这个方方面面技术的运用上,基于密码学的加密算法可以说是区块链各种特点得以表现的根本,一旦目前使用的加密算法被证实 ...
- Linux定时任务(crond)
1.Crond定义 crond是Linux系统中用来定期执行命令或指定程序的一种服务或软件. (1)linux系统自身定期执行的任务(轮询系统日志.备份数据等) (2)用户执行的任务(定时更新同步时间 ...
- web安全-接入层注入
web安全-接入层注入 1.关系型数据库 mysql 存放结构化数据 高效操作大量数据 方便处理数据之间的关联关系 2.SQL注入 select * from table where id=${id} ...
- 11、OpenCV Python 图像金字塔
__author__ = "WSX" import cv2 as cv import numpy as np # 高斯金字塔 #金字塔 原理 ==> 高斯模糊+ 降采样 #金 ...
- P1891 疯狂LCM
\(\color{#0066ff}{ 题目描述 }\) 众所周知,czmppppp是数学大神犇.一天,他给众蒟蒻们出了一道数论题,蒟蒻们都惊呆了... 给定正整数N,求LCM(1,N)+LCM(2,N ...