Skip to content

oneclickvirt/memorytest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memoryTest

Hits Build and Release

内存测试模块 (Memory Test Module)

功能(Features)

  • 使用sysbench测试内存的顺序读写IO
  • 使用dd测试内存的读写IO
  • 使用winsat测试内存的读写性能
  • -l指定输出的语言类型,可指定zhen,默认不指定时使用中文输出
  • -m指定测试的方法,可指定sysbenchdd,默认不指定时使用sysbench进行测试
  • 全平台编译支持

注意:默认不自动安装sysbench组件,如需使用请自行安装后再使用本项目,如apt update && apt install sysbench -y

TODO

  • Golang原生实现dd测试
  • 正式测试前检测当前路径挂载盘剩余空间是否足够生成测试文件
  • 优化测试失败时的报错和输出

使用(Usage)

下载及安装

curl https://raw.githubusercontent.com/oneclickvirt/memoryTest/main/mt_install.sh -sSf | sh

使用

memorytest

./memorytest

进行测试

Usage: memorytest [options]
  -h    Show help information
  -l string
        Language parameter (en or zh)
  -log
        Enable logging
  -m string
        Specific Test Method (sysbench or dd)
  -v    show version

有环境依赖,Linux/Unix相关系统请确保本地至少安装有ddsysbench工具其中之一,更多架构请查看 https://github.com/oneclickvirt/memorytest/releases/tag/output

sysbench测试

图片

dd测试

图片

winsat测试

1716466171182

卸载

rm -rf /root/memorytest
rm -rf /usr/bin/memorytest

在Golang中使用

go get github.com/oneclickvirt/memorytest@latest