《MysqL数据库sysbench-0.4.12编译安装和cpu测试例子分享》要点:
本文介绍了MysqL数据库sysbench-0.4.12编译安装和cpu测试例子分享,希望对您有用。如果有疑问,可以联系我们。
MysqL入门一、获取安装包
MysqL入门最近的版本为0.4.12,下载地址:http://sourceforge.net/projects/sysbench/
MysqL入门二、编译安装
MysqL入门我的环境为RHEL6.2 + MysqL 5.6.16,搭建参考上两篇文章<<RHEL6.2编译安装MysqL 5.6.16>><<MysqL Benchmark安装DBI组件>>,安装步骤如下:
[root@beanvm ~]# tar -xvf sysbench-0.4.12.tar.gz
[root@beanvm ~]# cd sysbench-0.4.12
[root@beanvm sysbench-0.4.12]# ./configure --with-MysqL-includes=/usr/local/MysqL/include --with-MysqL-libs=/usr/local/MysqL/lib && make && make install
MysqL入门因为我的MysqL是编译安装的,所以上面需要给出MysqL的库文件位置(对应―with―MysqL-includes和Cwith-MysqL-libs选项).
MysqL入门安装过程中常见的报错如下:
../libtool: line 841: X--tag=CC: command not found
../libtool: line 874: libtool: ignoring unkNown tag : command not found
../libtool: line 841: X--mode=link: command not found
../libtool: line 1007: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1008: *** Future versions of libtool will require --mode=MODE be specifIEd.: command not found
../libtool: line 2234: X-g: command not found
../libtool: line 2234: X-O2: command not found
../libtool: line 1954: X-L/usr/local/MysqL/lib: No such file or directory
../libtool: line 2403: Xsysbench: command not found
MysqL入门在之前版本中,碰见这个问题我们只需要在编译 *** 作前执行sysbench解压目录下的autogen.sh脚本即可;不过现在这样做还是会报同样的错误,原因是sysbench自带的libtool有问题,我们可以比较它和/usr/bin/libtool文件的区别得知,总之可以通过替换这个libtool文件来解决,或者修改aclocal.m4文件的如下内容
# Always use our own libtool.
liBTOol='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(liBTOol)dnl
MysqL入门将liBTOol变量的值修改为:'$(SHELL) /usr/bin/libtool',即使用系统的libtool工具包.
MysqL入门修改后再执行make && make install即可顺利安装.
MysqL入门安装完成马上测试一下:
[root@beanvm sysbench-0.4.12]# sysbench
sysbench: error while loading shared librarIEs: libMysqLclIEnt.so.18: cannot open shared object file: No such file or directory
MysqL入门说是缺少libMysqLclIEnt.so.18文件,额,这个文件是存在的,需要手动链接一下:
代码如下:[root@beanvm ~]# ls -l /usr/local/MysqL/lib/libMysqLclIEnt.so.18*
lrwxrwxrwx. 1 MysqL MysqL 24 Feb 15 14:39 /usr/local/MysqL/lib/libMysqLclIEnt.so.18 -> libMysqLclIEnt.so.18.1.0
-rwxr-xr-x. 1 MysqL MysqL 7654927 Feb 15 14:30 /usr/local/MysqL/lib/libMysqLclIEnt.so.18.1.0
[root@beanvm ~]# ls -l /usr/lib/libMysqLclIEnt.so.18*
ls: cannot access /usr/lib/libMysqLclIEnt.so.18*: No such file or directory
[root@beanvm ~]# ln ln -s /usr/local/MysqL/lib/libMysqLclIEnt.so.18 /usr/lib/
MysqL入门部署完成,运行一个cpu基准测试:
代码如下:[root@beanvm ~]# sysbench --test=cpu --cpu-max-prime=20000 run
sysbench 0.4.12: multi-threaded system evaluation benchmark
MysqL入门Running the test with following options:
Number of threads: 1
MysqL入门Doing cpu performance benchmark
MysqL入门Threads started!
Done.
MysqL入门Maximum prime number checked in cpu test: 20000
MysqL入门Test execution summary:
total time: 40.4541s
total number of events: 10000
total time taken by event execution: 40.4165
per-request statistics:
min: 3.64ms
avg: 4.04ms
max: 21.82ms
approx. 95 percentile: 5.20ms
MysqL入门Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 40.4165/0.00
内存溢出PHP培训学院每天发布《MysqL数据库sysbench-0.4.12编译安装和cpu测试例子分享》等实战技能,PHP、MysqL、liNUX、APP、Js,CSS全面培养人才。
总结以上是内存溢出为你收集整理的MYSQL数据库sysbench-0.4.12编译安装和CPU测试例子分享全部内容,希望文章能够帮你解决MYSQL数据库sysbench-0.4.12编译安装和CPU测试例子分享所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)