mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-12-17 16:34:32 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
<h2 id="补充说明">补充说明</h2>
|
||||
<p><strong>hdparm命令</strong> 提供了一个命令行的接口用于读取和设置IDE或SCSI硬盘参数。</p>
|
||||
<h3 id="语法">语法</h3>
|
||||
<pre><code>hdparm(选项)(参数)</code></pre>
|
||||
<pre><code class="language-bash">hdparm(选项)(参数)</code></pre>
|
||||
<h3 id="选项">选项</h3>
|
||||
<pre><code>-a<快取分区>:设定读取文件时,预先存入块区的分区数,若不加上<快取分区>选项,则显示目前的设定;
|
||||
<pre><code class="language-bash">-a<快取分区>:设定读取文件时,预先存入块区的分区数,若不加上<快取分区>选项,则显示目前的设定;
|
||||
-A<0或1>:启动或关闭读取文件时的快取功能;
|
||||
-c<I/O模式>:设定IDE32位I/O模式;
|
||||
-C:检测IDE硬盘的电源管理模式;
|
||||
@@ -37,7 +37,7 @@
|
||||
<p>设备文件:指定id驱动对应的设备文件名。</p>
|
||||
<h3 id="实例">实例</h3>
|
||||
<p>显示硬盘的相关设置:</p>
|
||||
<pre><code>hdparm /dev/sda
|
||||
<pre><code class="language-bash">hdparm /dev/sda
|
||||
/dev/sda:
|
||||
IO_support = 0 (default 16-bit)
|
||||
readonly = 0 (off)
|
||||
@@ -45,27 +45,27 @@ readahead = 256 (on)
|
||||
geometry = 19457[柱面数]/255[磁头数]/63[扇区数], sectors = 312581808[总扇区数], start = 0[起始扇区数]
|
||||
</code></pre>
|
||||
<p>显示硬盘的柱面、磁头、扇区数:</p>
|
||||
<pre><code>hdparm -g /dev/sda
|
||||
<pre><code class="language-bash">hdparm -g /dev/sda
|
||||
/dev/sda:
|
||||
geometry = 19457[柱面数]/255[磁头数]/63[扇区数], sectors = 312581808[总扇区数], start = 0[起始扇区数]</code></pre>
|
||||
<p>测试硬盘的读取速度:</p>
|
||||
<pre><code>hdparm -T /dev/sda
|
||||
<pre><code class="language-bash">hdparm -T /dev/sda
|
||||
/dev/sda:
|
||||
Timing cached reads: 4684 MB in 2.00 seconds = 2342.92 MB/sec</code></pre>
|
||||
<p>测试硬盘缓存的读取速度:</p>
|
||||
<pre><code>hdparm -T /dev/xvda
|
||||
<pre><code class="language-bash">hdparm -T /dev/xvda
|
||||
/dev/xvda:
|
||||
Timing cached reads: 11154 MB in 1.98 seconds = 5633.44 MB/sec
|
||||
</code></pre>
|
||||
<p>检测硬盘的电源管理模式:</p>
|
||||
<pre><code>hdparm -C /dev/sda
|
||||
<pre><code class="language-bash">hdparm -C /dev/sda
|
||||
/dev/sda:
|
||||
drive state is: standby [省电模式]</code></pre>
|
||||
<p>查询并设置硬盘多重扇区存取的扇区数,以增进硬盘的存取效率:</p>
|
||||
<pre><code>hdparm -m /dev/sda
|
||||
<pre><code class="language-bash">hdparm -m /dev/sda
|
||||
hdparm -m #参数值为整数值如8 /dev/sda</code></pre>
|
||||
<p><strong>附:硬盘坏道修复方法</strong></p>
|
||||
<pre><code>检查:smartctl -l selftest /dev/sda
|
||||
<pre><code class="language-bash">检查:smartctl -l selftest /dev/sda
|
||||
卸载:umount /dev/sda*
|
||||
修复:badblocks /dev/sda</code></pre>
|
||||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
|
||||
|
||||
Reference in New Issue
Block a user