0
点赞
收藏
分享

微信扫一扫

sysbench - inxi - iozone - iperf3


1. ​​sysbench​​

1.1 安装

sudo apt -y install sysbench

root@nt5-k8s-1:~# sysbench --version
sysbench 1.0.11

1.2 使用

Sysbench 是一款开源的、模块化的、跨平台的多线程性能测试工具,可以执行数据库在 CPU、内存、线程、IO 等方面的性能测试。目前支持的数据库有 MySQL、Oracle 和 PostgreSQL

​​连接​​

2. ​​inxi​​

2.1 安装

sudo apt-get -y install inxi

2.2 使用

inxi  #获取系统的概况信息
inxi -A #获取声音/音频硬件详情信息
inxi -G #取显卡的详情信息
inxi -D #获取完整的硬盘信息
inxi -M #显示Bios和主板详情信息
inxi -r #显示系统中的可用软件仓库列表
inxi -F #将所有硬件信息一次列出
inxi -W Asia,Shanghai #显示你所在位置的天气信息

[root@harbor ~]#inxi -F
System:
Host: harbor Kernel: 3.10.0-1062.el7.x86_64 arch: x86_64 bits: 64 Console: pty pts/0
Distro: CentOS Linux release 7.7.1908 (Core)
Machine:
Type: Vmware System: VMware product: VMware Virtual Platform v: N/A
serial: VMware-56 4d a4 9d 43 0c 16 65-9e 9f 66 a0 e4 11 71 5d
Mobo: Intel model: 440BX Desktop Reference Platform serial: N/A BIOS: Phoenix v: 6.00
......

3. iozone

3.1 安装

sudo apt-get install iozone3

3.2 使用

iozone 是一个文件系统测试基准工具。可以测试不同的操作系统中文件系统的读写性能。可以通过 write, re-write, read, re-read, random read, random write, random mix, backwards read, record rewirte, strided read, fwrite, frewrite, fread, freread, mmap, async I/0 等不同的模式下的硬盘的性能。测试的时候请注意,设置的测试文件的大小一定要大过你的内存(最佳为内存的两倍大小),不然 linux 会给你的读写的内容进行缓存,会使数值非常不准确。

iozone -a  #在所有模式下进行测试,使用记录块从4k到16M,测试文件大小从64k到512M
iozone -Rab output.xls #以图表形式显示测试结果,使用iozone将测试结果放在Excel中
iozone -Ra -g 2g -i 0 -i 1 #指定测试模式。-i指定模式,以上模式0代表write/rewrite,模式1代表read/re-read。

iozone -a -s 1g -i 0 -i 1 -f /tmp/testfile -y 4k -q 16k

#---------------------------------------------------------------------
root@k3s-master:~# iozone -a -s 1g -i 0 -i 1 -f /data/testfile -y 4k -q 16k
......
Command line used: iozone -a -s 1g -i 0 -i 1 -f /data/testfile -y 4k -q 16k
Output is in kBytes/sec
Time Resolution = 0.000001 seconds.
Processor cache size set to 1024 kBytes.
Processor cache line size set to 32 bytes.
File stride size set to 17 * record size.
random random bkwd record stride
kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread
1048576 4 112990 3319170 5197863 4481209
1048576 8 1616852 4053910 6936579 6096688
1048576 16 925015 4512659 8278008 7563190

4. ​​iperf3​​

4.1 安装

sudo apt-get install iperf3

4.2 使用

iperf3 是一款带宽测试工具,它支持调节各种参数,比如通信协议,数据包个数,发送持续时间,测试完会报告网络带宽,丢包率和其他参数。

5. centos7 更换阿里 yum 源

备份 repo 源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all && yum makecache

6. ubuntu 更换阿里源

​备份​

cd /etc/apt/
cp sources.list sources.list_bak

​vim sources.list​

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

​更新​

apt update

​升级软件​

apt upgrade

举报

相关推荐

0 条评论