查看linux磁盘转速

查看硬盘的转速的方法有两种,一种是sginfo命令,一种是sg_vpd命令。
[root@localhost /root]# sginfo -g /dev/sda
Rigid   Disk   Geometry   mode   page   (0x4)
-----------------------------------
Number   of   cylinders                                                65535
Number   of   heads                                                            255
Starting   cyl.   write   precomp                        65535
Starting   cyl.   reduced   current                  65535
Device   step   rate                                                         0
Landing   Zone   Cylinder                                          0
RPL                                                                                                0
Rotational   Offset                                                      0
Rotational   Rate                                                            15000
上面最后一行的结果就是转速,15000转。 在使用非scsi硬盘时,执行后的结果如下:
[root@localhost /root]# sginfo -g /dev/xvda
A device name that understands SCSI commands is required
Couldn't find sg device corresponding to /dev/xvda
使用sg_vpd的方法相对复杂:
[root@localhost /root]# sg_vpd /dev/sda --page=0×89
ATA   information   VPD   page:
  SAT   Vendor   identification:   LSI
  SAT   Product   identification:   LSI   SATL
  SAT   Product   revision   level:   0008
  ATA   command   IDENTIFY   DEVICE   response   summary:
        model:   ST31000340NS
        serial   number:                                       9QJ4VPL1
        firmware   revision:   SN06
 
[root@localhost /root]# sg_vpd /dev/sda --page=0×b1
Block   device   characteristics   VPD   page   (SBC):
  Nominal   rotation   rate:   7200   rpm
  Nominal   form   factor   not   reported
上面Nominal rotation rate后面的值就是转速,为7200转。使用该命令时需要知道page后面使用的值,需要使用sg_vpd -e参数来获取。

评论

评论正在提交中...请稍后
评论提交成功...