![Forrest logo](/images/logo.png)
hdparm
HDparm is a powerful command-line utility used in various operating systems, including Linux, to interact with and manipulate hard disk and solid-state drives. It provides extensive functionality and control over various features and parameters of storage devices.
-
HDparm allows users to access information about their drives, such as model number, firmware version, and serial number, by simply running the command with the drive as an argument.
-
It enables users to analyze the performance of their drives, including reading and writing speeds, disk latency, and cache size, by conducting benchmark tests.
-
The tool provides options to set various drive parameters like read/write cache configuration, power management settings, and acoustic management.
-
With HDparm, users can enable or disable Advanced Power Management (APM) feature to regulate power usage and prolong drive lifespan.
-
The tool facilitates the Secure Erase command, which securely wipes all data from the drive, making it unrecoverableāa useful feature when reusing or selling drives.
-
It allows users to adjust the Automatic Acoustic Management (AAM) setting, which controls the noise levels of the drive by modifying seek speeds.
-
HDparm supports setting the Advanced Host Controller Interface (AHCI) mode, which can improve performance on certain systems.
-
It enables users to turn on the Direct Memory Access (DMA) mode for faster data transfer rates or revert to the older Programmed Input/Output (PIO) mode.
-
The tool allows setting the Advanced Technology Attachment (ATA) features like 48-bit addressing, which allows larger hard drives to be recognized by the system.
-
HDparm is highly flexible and customizable, as it provides numerous command-line options and parameters to fine-tune drive settings and optimize performance to suit individual needs.
List of commands for hdparm:
-
hdparm:tldr:05db8 hdparm: Test the read speed of a specific device.$ sudo hdparm -tT ${device}try on your machineexplain this command
-
hdparm:tldr:12384 hdparm: Get the Advanced Power Management level.$ sudo hdparm -B /dev/${device}try on your machineexplain this command
-
hdparm:tldr:2c1a4 hdparm: Display the device's current power mode status.$ sudo hdparm -C /dev/${device}try on your machineexplain this command
-
hdparm:tldr:79640 hdparm: Put the drive into idle (low-power) mode, also setting its standby timeout.$ sudo hdparm -S ${standby_timeout} ${device}try on your machineexplain this command
-
hdparm:tldr:de3d9 hdparm: Request the identification info of a given device.$ sudo hdparm -I /dev/${device}try on your machineexplain this command
-
hdparm:tldr:f5cf4 hdparm: Set the Advanced Power Management value (values 1-127 permit spin-down, and values 128-254 do not).$ sudo hdparm -B ${1} /dev/${device}try on your machineexplain this command