MySQL Hardware--网络测试
使用Ping测试丢包
## ping测试
## -c 100表示100次
ping -c 100 192.168.1.2
输出结果:
ping -c 100 192.168.1.2 PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=61 time=0.061 ms
....
64 bytes from 192.168.1.2: icmp_seq=100 ttl=61 time=0.053 ms --- 192.168.1.2 ping statistics ---
100 packets transmitted, 100 received, 0% packet loss, time 99014ms ## 0% packet loss表示丢包率
rtt min/avg/max/mdev = 0.052/0.059/0.120/0.013 ms ## 表示最小延迟/平均延迟/最大延迟/标准差延迟
使用iperf测试带宽
安装包地址:https://pkgs.org/download/iperf
命令帮助问答:http://man.linuxde.net/iperf
服务端开启服务:
## 服务端开启服务
iperf -s
客户端开始测试:
## 客户端测试命令
iperf -c 192.168.1.102 -t -i -d -m
服务端输出结果:
iperf -s
------------------------------------------------------------
Server listening on TCP port
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ ] local 192.168.1.102 port connected with 192.168.1.101 port
------------------------------------------------------------
Client connecting to 192.168.1.101, TCP port
TCP window size: 19.3 KByte (default)
------------------------------------------------------------
[ ] local 192.168.1.102 port connected with 192.168.1.101 port
Waiting for server threads to complete. Interrupt again to force quit.
[ ID] Interval Transfer Bandwidth
[ ] 0.0-10.0 sec 4.10 GBytes 3.52 Gbits/sec
[ ID] Interval Transfer Bandwidth
[ ] 0.0-10.0 sec 10.6 GBytes 9.11 Gbits/sec
客户端输出结果:
iperf -c 192.168.1.102 -t -i -d -m
------------------------------------------------------------
Server listening on TCP port
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 192.168.1.102, TCP port
TCP window size: 19.3 KByte (default)
------------------------------------------------------------
[ ] local 192.168.1.101 port connected with 192.168.1.102 port
[ ] local 192.168.1.101 port connected with 192.168.1.102 port
[ ID] Interval Transfer Bandwidth
[ ] 0.0- 2.0 sec 2.14 GBytes 9.21 Gbits/sec
[ ID] Interval Transfer Bandwidth
[ ] 2.0- 4.0 sec 2.13 GBytes 9.15 Gbits/sec
[ ID] Interval Transfer Bandwidth
[ ] 4.0- 6.0 sec 2.14 GBytes 9.20 Gbits/sec
[ ID] Interval Transfer Bandwidth
[ ] 6.0- 8.0 sec 2.09 GBytes 8.99 Gbits/sec
[ ID] Interval Transfer Bandwidth
[ ] 8.0-10.0 sec 2.10 GBytes 9.01 Gbits/sec
[ ID] Interval Transfer Bandwidth
[ ] 0.0-10.0 sec 10.6 GBytes 9.11 Gbits/sec
[ ] MSS size bytes (MTU bytes, ethernet)
[ ID] Interval Transfer Bandwidth
[ ] 0.0- 2.0 sec 0.00 Bytes 0.00 bits/sec
[ ID] Interval Transfer Bandwidth
[ ] 2.0- 4.0 sec 0.00 Bytes 0.00 bits/sec
[ ID] Interval Transfer Bandwidth
[ ] 4.0- 6.0 sec 0.00 Bytes 0.00 bits/sec
[ ID] Interval Transfer Bandwidth
[ ] 6.0- 8.0 sec 0.00 Bytes 0.00 bits/sec
[ ID] Interval Transfer Bandwidth
[ ] 8.0-10.0 sec 0.00 Bytes 0.00 bits/sec
[ ID] Interval Transfer Bandwidth
[ ] 0.0-10.0 sec 4.10 GBytes 3.52 Gbits/sec
[ ] MSS size bytes (MTU bytes, ethernet)
测试结果:Bandwidth约为9.10 Gbits/sec,实际网卡也是万兆网卡。
命令参数说明:
-s 以server模式启动。#iperf -s
-c host以client模式启动。host是server端地址。#iperf -c serverip 通用参数:
-f [kmKM] 分别表示以Kbits, Mbits, KBytes, MBytes显示报告,默认以Mbits为单位,#iperf -c 192.168.100.6 -f K
-i sec 以秒为单位显示报告间隔,#iperf -c 192.168.100.6 -i
-l 缓冲区大小,默认是8KB,#iperf -c 192.168.100.6 -l
-m 显示tcp最大mtu值
-o 将报告和错误信息输出到文件#iperf -c 192.168.100.6 -o ciperflog.txt
-p 指定服务器端使用的端口或客户端所连接的端口#iperf -s -p ;iperf -c 192.168.100.55 -p
-u 使用udp协议
-w 指定TCP窗口大小,默认是8KB
-B 绑定一个主机地址或接口(当主机有多个地址或接口时使用该参数)
-C 兼容旧版本(当server端和client端版本不一样时使用)
-M 设定TCP数据包的最大mtu值
-N 设定TCP不延时
-V 传输ipv6数据包 server专用参数:
-D 以服务方式运行。#iperf -s -D
-R 停止iperf服务。针对-D,#iperf -s -R
client端专用参数:
-d 同时进行双向传输测试
-n 指定传输的字节数,#iperf -c 192.168.100.6 -n
-r 单独进行双向传输测试
-t 测试时间,默认20秒,#iperf -c 192.168.100.6 -t
-F 指定需要传输的文件
-T 指定ttl值 原文:https://blog.csdn.net/shenzhen206/article/details/72820341
使用ethtool查看网卡信息
查看基本信息
ethtool eth0
Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: No
Advertised link modes: 10000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: Other
PHYAD:
Transceiver: external
Auto-negotiation: off
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 ()
drv probe link
Link detected: yes
查看网络丢包:
## –S ethX //查询ethX网口收发包统计
ethtool -S eth0 |grep crc
使用iftop查看网络流量
下载包地址:https://pkgs.org/download/iftop
执行命令:
## 查看网卡eth0的流量
iftop -i eth0 -P
输出结果信息:
中间的<= =>这两个左右箭头,表示的是流量的方向。
TX:发送流量
RX:接收流量
TOTAL:总流量
Cumm:运行iftop到目前时间的总流量
peak:流量峰值
rates:分别表示过去 2s 10s 40s 的平均流量
使用iptraf查看网络流量(推荐)
iptraf能图像化显示每个链接的详细信息和网卡汇总信息。
yum安装: yum -y install iptraf
使用netstat查看网络状态信息
## 常用参数
## -a或--all:显示所有连线中的Socket;
## -n或--numeric:直接使用ip地址,而不通过域名服务器;
## -o或--timers:显示计时器;
## -p或--programs:显示正在使用Socket的程序识别码和程序名称; netstat -anop
MySQL Hardware--网络测试的更多相关文章
- MySQL PXC构建一个新节点只需IST传输的方法
需求场景:原有的pxc环境数据量已经比较大,新买的服务器要加入此集群中,如何让其用IST的方式传输,而不是SST. PXC传输数据有两种方式: IST: Incremental State Trans ...
- percona教程:MySQL GROUP_CONCAT的使用
percona有一篇blog: The power of MySQL GROUP_CONCAT 比较详细地介绍了GROUP_CONCAT函数的用法.简单地翻译了一下. 假设你有4名工程师,这周他们为6 ...
- 【推荐】MySQL Cluster报错及解决方法(不断更新中)
排查问题技巧: MySQL Cluster 自带了一个错误代码的查看的小程序.通过这个小东西我们可以方便的定位问题的原因. 这个程序就是 perror 在MYSQL安装目录的bin下面. 如报错:ER ...
- 解决Can't connect to MySQL server on 'localhost' (10048)
解决Can't connect to MySQL server on 'localhost' (10048) 您使用的是Windows操作系统,此错误与一个注册表键值TcpTimedWaitDelay ...
- [转]MySQL Connector/C++(一)
http://www.cnblogs.com/dvwei/archive/2013/04/18/3029464.html#undefined#undefined MySQL Connector/C++ ...
- MySQL数据丢失讨论
原文地址:http://hatemysql.com/tag/sync_binlog/ 1. 概述 很多企业选择MySQL都会担心它的数据丢失问题,从而选择Oracle,但是其实并不十分清楚什么情况下 ...
- Percona 开始尝试基于Ceph做上层感知的分布式 MySQL 集群,使用 Ceph 提供的快照,备份和 HA 功能来解决分布式数据库的底层存储问题
本文由 Ceph 中国社区 -QiYu 翻译 英文出处:Using Ceph with MySQL 欢迎加入CCTG Over the last year, the Ceph world drew m ...
- Mysql Optimization Overview
The information below i get from http://dev.mysql.com/doc/refman/8.0/en/optimize-overview.html Optim ...
- 记一次mysql故障恢复
事情要从俩月前的一个坑说起,一台新的测试服务器,新项目一元夺宝用的. 配置aws上的一台云主机,系统盘8G,一块300G的云硬盘. 拿到机器后,另一运维小哥安装php,nginx,mysql等软件. ...
- javaweb 乱码---汉字存入mysql数据库中变成乱码
今天郁闷了一天,java程序在向mysql插入数据前不是乱码,数据库安装时也选了编码为utf8(和我程序的编码格式一致).可是插入数据就变成乱码,相当郁闷. 原因:mysql的配置文件中的编码并没有改 ...
随机推荐
- 分析logfilter+session
1.P132分析: long before = System.currentTimeMillis(); //返回当前的计算机时间,时间的表达格式为当前计算机时间和GMT时间(格林威治时间)1970年1 ...
- HIVE中IN的坑
问题:为什么HIVE中用了 NOT IN,结果集没了? 注:这个是原创,转载请注明,谢谢!直接进实验室>> > select * from a;OK1 a12 a23 a3Time ...
- JS 中的对象
对象就是一个由属性构成的无序列合集. var myObj = { name: ‘suki’, age: 21, interests: [‘guitar’, ‘tennis’] }; 属性是没有顺序的, ...
- render函数(转)
https://blog.csdn.net/qq78827534/article/details/80792514
- C#获取本地磁盘信息【转载】
直接上干货简单易懂 //磁盘监控(远程/本地)//需要引用System.Management.dllpublic class RemoteMonitoring{private static str ...
- java编码与解码(一)
转:https://blog.csdn.net/heyanxi0101/article/details/80356870 java编码与解码(一) 编码表概述和常见的编码表 概述:有字符及其对应的数值 ...
- VB Mouse Pointer
- git与github学习
一 我的Github 我的Github项目地址:https://github.com/lllmathison/hello 二 对github与git的学习.感受 git是一个版本管理工具,在本地使用的 ...
- 浅谈jquery事件命名空间
什么是jquery的事件命名空间? 先看如下简单代码: $("#btn").on("click.name1.name2",function(){ console ...
- projects(好代码好工具)每天进步一点点
1. 行人检测的,感觉这个代码不错,起码换个数据集测试也不错: https://bitbucket.org/shanshanzhang/code_filteredchannelfeatures 2. ...