欢迎光临
我们一直在努力

在 CentOS 7 里用 smartctl 和 hdparm 对硬盘进行基本测试

在 CentOS 7 里用 smartctl 和 hdparm 对硬盘进行基本测试

如使用 CentOS 7系统,可使用smartctl 和 hdparm 的命令。

过程:

1.
yum -y install smartmontools hdparm
# 安装相应的软件

2.
smartctl --test=short /dev/sda
# 假如硬盘设备名称是 /dev/sda,进行简单测试

3.smartctl -l selftest /dev/sda # 几分钟后,查看测试结果,如本例,关键信息是 Completed without error,无错误

4.smartctl -H /dev/sda # 查看整体健康情况,关键信息是 SMART overall-health self-assessment test result: PASSED,测试通过

5.hdparm -Tt /dev/sda # 测试读取速度,本例是 125.98 MB/sec

6.dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc status=progress # 用 dd 来测试写入速度,第一次 66.6 MB/s

7.echo 3 > /proc/sys/vm/drop_caches # 清除 buffer-cache 

8.dd if=tempfile of=/dev/null bs=1M count=1024 status=progress # 再次测试,96.6 MB/s

9.dd if=tempfile of=/dev/null bs=1M count=1024 status=progress # 最后一次测试,有 buffer-cache ,是 1.7 GB/s

赞(0) 打赏
未经允许不得转载:欧欧colo教程网 » 在 CentOS 7 里用 smartctl 和 hdparm 对硬盘进行基本测试

更稳定的 国内物理服务器租用 机柜托管

促销 - 国内物理机 40核 64G内存 1T硬盘 ¥260

服务器促销国内物理机 40核 64G内存 1T硬盘 ¥260

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏