Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

oneclickvirt/disktest

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

185 Commits
185 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

disktest

Hits

Build and Release

硬盘IO测试 (Disk IO Test)

功能

  • 支持使用winsat测试
  • 支持使用dd测试
  • 支持使用fio测试,支持自动选择IO引擎测试,测试优先级为libaio[仅linux] > posixaio > psync
  • 支持Go自身静态依赖注入fiodd,使用时无额外环境依赖需求
  • 支持双语输出,以-l指定zhen可指定输出的语言,未指定时默认使用中文输出
  • 支持指定测试方式,以-m指定ddfio指定测试方式,未指定时默认使用fio进行测试
  • 支持单/多盘IO测试,以-d指定singlemulti可指定是否测试多盘,未指定时默认仅测试单盘/rootC:路径
  • 支持指定路径IO测试,以-p指定路径
  • 正式测试前检测当前路径挂载盘剩余空间是否足够生成测试文件
  • 全平台编译支持,适配MACOS系统等无root权限等环境进行测试

PS: 不使用sysbench进行硬盘IO测试,因为默认设置下fio测试效果比sysbench测试更贴近机器本身的性能,且fio的维护者比sysbench的维护者更活跃。

使用

下载、安装、更新

curl https://raw.githubusercontent.com/oneclickvirt/disktest/main/disktest_install.sh -sSf | bash

curl https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/disktest/main/disktest_install.sh -sSf | bash

使用

disktest

./disktest

进行测试

Usage: disktest [options]
  -d string
        Enable multi disk check parameter (single or multi, default is single)
  -h    Show help information
  -l string
        Language parameter (en or zh)
  -log
        Enable logging
  -m string
        Specific Test Method (dd or fio)
  -p string
        Specific Test Disk Path (default is /root or C:)
  -v    Show version

更多架构请查看 https://github.com/oneclickvirt/disktest/releases/tag/output

卸载

rm -rf /root/disktest
rm -rf /usr/bin/disktest

在Golang中使用

go get github.com/oneclickvirt/disktest@v0.0.11-20260521162552

测试图

dd测试:

图片

fio测试:

图片

winsat测试:

1716466264315

About

硬盘IO测试模块 (Disk IO Test Module)

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.