Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use the hdparm command of linux to display and set hard disk parameters

Shulou Source: shulou.com Published: 2022-06-02 18:07:05 09月22日 Update

Editor to share with you how to use linux's hdparm command to display and set hard disk parameters. I hope you will gain a lot after reading this article. Let's discuss it together.

The hdparm command is used to detect, display and set parameters for IDE or SCSI hard drives.

Syntax format: hdparm [parameters]

Common parameters:

-a sets the number of partitions pre-stored in the block area when reading the file-f writes the data of the memory buffer to the hard disk, and empties the buffer-g to display the hard disk's track, head, sector and other parameters-I directly reads the hardware specification information provided by the hard disk-X sets the transmission mode of the hard disk.

Reference example

Display the settings for the hard drive:

[root@linuxcool ~] # hdparm / dev/sda/dev/sda:IO_support = 0 (default 16-bit) readonly = 0 (off) readahead = 256 (on) geometry = 19929 [number of cylinders] / 255 [number of heads] / 63 [number of sectors], sectors = 320173056 [total sectors], start = 0 [number of starting sectors]

Displays the number of cylinders, heads, and sectors of the hard disk:

[root@linuxcool] # hdparm-g / dev/sda

Evaluate the read efficiency of the hard drive:

[root@linuxcool] # hdparm-t / dev/sda

Read the hardware specification information provided by the hard disk directly:

[root@linuxcool] # hdparm-X / dev/sda

Put the IDE hard drive into sleep mode:

[root@linuxcool] # hdparm-Y / dev/sda has finished reading this article. I believe you have a certain understanding of using linux's hdparm command to display and set hard disk parameters. Want to know more about it. Welcome to follow the industry information channel. Thank you for reading!

Tags: Hard drives parameters commands heads information modes hardware articles buffers specifications buffers memory finished examples commonly used efficiency data files more format Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Huawei OPPO Reno Microsoft Apple