Syntax: hdparm [-CfghiIqtTvyYZ] [-a & lt; cache partition & gt;] [-A & lt; 0 or 1 & gt;] [-c & lt; i/O mode & gt;] [-d & lt; 0 or 1 & gt;] [-k & lt; 0 or 1 & gt;] [-K & lt; 0 or 1 & gt;] [-m & lt; number of partitions & gt;] [-n & lt; 0 or 1 & gt;] [-p & lt; PIO Mode & gt;] [-P & lt; number of partitions & gt;] [-
Syntax: hdparm [-CfghiIqtTvyYZ] [- <快取分区> ] [-A <0 or 1>] [-c ] [-D <0 or 1>] [-k <0 or 1>] [-K <0 or 1>] [-m <分区数> ] [-N <0 or 1>] [-p ] [-P <分区数> ] [-R <0 or 1>] [-S <时间> ] [-U <0 or 1>] [-W <0 or 1>] [-X <传输模式> ] [Device]
Note: hdparm can be detected to display and set the parameters of the IDE or SCSI hard disk.
Parameters:
- <快取分区> Set the number of partitions that are pre-stored in the block area when the file is read. <快取分区> To display the current settings.
-A <0 or 1> enables or disables the cache function when reading files.
-C Set IDE32-bit I/O mode.
-C: detects the power management mode of the IDE hard disk.
-D <0 or 1> sets the DMA mode of the disk.
-F writes the data in the memory buffer to the hard disk and clarifies the buffer.
-G: displays the disk's magnetic track, head, magnetic area, and other parameters.
-H: displays help.
-I displays the hardware specification information of the hard disk, which is provided by the hard disk itself at startup.
-I directly reads the hardware specification information provided by the hard disk.
-K <0 or 1> to reset the hard disk, retain the-dmu parameter settings.
-K <0 or 1> to reset the hard disk, retain the-APSWXZ parameter settings.
-M <磁区数> Set the number of partitions for multi-partition access on the hard disk.
-N <0 or 1> indicates an error that occurs when the hard disk is written.
-P Set the PIO Mode of the hard disk.
-P <磁区数> Set the number of partitions in the cache of the hard disk.
-When executing subsequent parameters, q does not display any information on the screen.
-R <0 or 1> sets the read/write mode of the hard disk.
-S <时间> Set the waiting time before the hard disk enters power-saving mode.
-T to evaluate the read efficiency of the hard disk.
-T to evaluate the read efficiency of the hard disk cache.
-U <0 or 1> allows other interruption requests to be executed simultaneously during hard disk access.
-V displays the hard disk settings.
-W <0 or 1> sets the hard disk write cache.
-X <传输模式> Set the transmission mode of the hard disk.
-Y enables the IDE hard drive to power-saving mode.
-Y: enable the IDE hard drive to sleep.
-Z disables automatic power saving for some Seagate hard disks.
General disk test:
# hdparm -t /dev/sda
Timing buffered disk reads: 316 MB in 3.02 seconds = 104.71 MB/sec |
Timing cached reads: 19328 MB in 1.99 seconds = 9691.24 MB/sec
Two RAID 0 disks:
# hdparm -t /dev/sdb
Timing buffered disk reads: 622 MB in 3.01 seconds = 206.89 MB/sec |
Timing cached reads: 19632 MB in 1.99 seconds = 9844.20 MB/sec