In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to use hdparm command in Linux to view hard disk information". In daily operation, I believe many people have doubts about how to use hdparm command to view hard disk information in Linux. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubt of "how to use hdparm command to view hard disk information in Linux". Next, please follow the editor to study!
Function description: display and set hard disk parameters.
Grammar: hdparm [- CfghiIqtTvyYZ] [- a] [- A] [- c] [- d] [- k] [- K] [- m] [- n] [- p] [- P] [- r] [- S] [- u] [- W] [- X] [equipment]
Supplementary note: hdparm can detect, display and set the parameters of IDE or SCSI hard disk.
Parameters:
-a sets the number of partitions pre-stored in the block when reading the file. If no option is added, the current setting is displayed.
-A turns on or off the caching function when reading files.
-c sets the IDE32 bit Istroke O mode.
-C detects the power management mode of the IDE hard drive.
-d sets the DMA mode of the disk.
-f writes the data of the memory buffer to the hard disk and makes the buffer clear.
-g displays the parameters of the hard disk, such as track, head, sector, etc.
-h displays help.
-I displays the hardware specification information of the hard disk, which is provided by the hard disk itself at boot time.
-I directly read the hardware specification information provided by the hard disk.
When-k resets the hard drive, the setting of the-dmu parameter is retained.
When-K resets the hard drive, the setting of the-APSWXZ parameter is retained.
-m sets the number of partitions for multi-partition access of the hard disk.
-n ignores errors that occur when the hard disk is written.
-p sets the PIO mode of the hard drive.
-P sets the number of partitions for the internal cache of the hard disk.
-Q does not display any information on the screen when executing subsequent parameters.
-r sets the read and write mode of the hard disk.
-S sets the wait time before the hard drive enters power-saving mode.
-t evaluate the read efficiency of the hard disk.
-T evaluates the read efficiency of the hard disk cache.
When accessing the hard disk, other interrupt requirements are allowed to be executed at the same time.
-v displays the relevant settings of the hard drive.
-W sets the write cache for the hard disk.
-X sets the transfer mode of the hard drive.
-y puts the IDE hard drive into power saving mode.
-Y puts the IDE hard drive into sleep mode.
-Z turns off the automatic power saving feature of some Seagate hard drives.
Example:
The code is as follows:
[root@linux] # hdparm-C / dev/sda1 # detects the power management mode of IDE hard disk
/ dev/sda1:
Drive state is: active/idle
The code is as follows:
[root@linux] # hdparm-T / dev/sda1 # evaluate the reading efficiency of the hard disk
/ dev/sda1:
Timing cached reads: 2670 MB in 1.95 seconds = 1368.46 MB/sec
The code is as follows:
[root@linux] # hdparm-g / dev/sda1 # shows the number of cylinders, heads and sectors of the hard disk
/ dev/sda1:
Geometry = 3081 geometry 255Compact 63, sectors = 48451584, start = 2048
The code is as follows:
[root@linux ~] # hdparm / dev/sda1 # displays the relevant settings of the hard disk
/ dev/sda1:
Multcount = 128 (on)
IO_support = 1 (32-bit)
Readonly = 0 (off)
Readahead = 256 (on)
Geometry = 3081 geometry 255Compact 63, sectors = 48451584, start = 2048
At this point, the study on "how to use the hdparm command to view hard disk information in Linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.