Debian / Linux – Hard disk performance test / benchmark and SMART data readout
Sometimes it may be necessary to perform a small benchmark of the hard disks. Because this is the only way to check if the hard disk is working at the appropriate speed.
First we install the small hdparm for this:
apt-get update
apt-get -y install hdparm
After that, we can test the read speed (without using the cache) of the hard disk sda with the following command:
hdparm -tT --direct /dev/sda
Alternatively, we can also test the write speed with a test file. To do this, we first need to change to a directory on the disk we want to test.
cd /myFolderTheHardDisk/.
dd if=/dev/zero of=testfile bs=1M count=1024 conv=fdatasync,notrunc
The SMART data of a hard disk can be read smartctl, which is included in the package xy. We need to install this package first
apt-get update
apt-get -y install smartmontools
After that, in the following example, we can read the SMART data from the hard disk sda with the following command:
smartctl -a /dev/sda
Note: This text is protected by copyright
Please send coffee donations to: 0xd0803A568615A18403C3722AC6dBb3202FD14034 (Ethereum)