如何查看独服硬盘通电时间

1、购买独立服务器,我们通常会看硬盘时间,如果是砖石盘的话就要注意数据安全了。

smartmontools工具安装:

apt-get -y install smartmontools

或者

yum -y install smartmontools

 

没有做raid的情况:

smartctl -A /dev/sda

做了raid的话可以用以下命令查看:
Disk A
smartctl -a -d cciss,0 /dev/sda
Disk B
smartctl -a -d cciss,1 /dev/sda

找到Power_On_Hours这行的就是通电时间。

2、或者用这个脚本

bash <(wget -qO- git.io/ceshi)

评论区
头像
    头像

    Thanks for sharing. I read many of your blog posts, cool, your blog is very good. https://www.binance.info/el/join?ref=V2H9AFPY