hd-idle的休眠命令

hd-idle的休眠命令

hd-idle -a /dev/sda1 -i 10

-i 后面10为10秒后休眠

-a 后面为硬盘名

 

 

解释:

-a <name>Set (partial) device name of disks for subsequent idle-time parameters (-i). This parameter is optional in the sense that there's a default entry for all [SCSI] disks which are not named otherwise by using this parameter.
-i <idle_time>Idle time in seconds for the currently named disk(s) (-a <name>) or for all disks.
-l <logfile>Name of logfile (written only after a disk has spun up). Please note that this option might cause the disk which holds the logfile to spin up just because another disk had some activity. This option should not be used on systems with more than one disk except for tuning purposes. On single-disk systems, this option should not cause any additional spinups.
-t <disk>Spin-down the specified disk immediately and exit. Use only the disk name (e.g. sda) without /dev/ prefix
-dDebug mode. This will prevent hd-idle from becoming a daemon and print debugging info to stdout/stderr
-hPrint brief usage information

Regarding the parameter "-a":

Users of hd-idle have asked for means to set idle-time parameters for individual disks. This makes a lot of sense, not only because some [SCSI] disks may not react well to being stopped. Originally, hd-idle had one idle time for all disks. The parameter "-a" can now be used to set a filter on the disk's device name (omit /dev/) for subsequent idle-time settings.

  1. A "-i" option before the first "-a" option will set the default idle time; hence, compatibility with previous releases of hd-idle is maintained.
  2. In order to disable spin-down of disks per default, and then re-enable spin-down on selected disks, set the default idle time to 0.

Example:

hd-idle -i 0 -a sda -i 300 -a sdb -i 1200

This example sets the default idle time to 0 (meaning hd-idle will never try to spin down a disk), then sets explicit idle times for disks which have the string "sda" or "sdb" in their device name.

posted on 2018-11-08 14:44 lbsjs 阅读(...) 评论(...) 编辑 收藏

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值