본문 바로가기
서버/리눅스 서버

오드로이드 H2 하드 절전 패키지 (hd-idle amd64 deb)

by ㅋㅋ잠자 2018. 12. 3.
반응형

안녕하세요? 


hdparm 으로 하드 절전이 잘 되지 않아서 다른 패키지 hd-idle 을 패키징 하였습니다.


root@djjproject:~# wget http://odroidh2.djjproject.com/deb/hd-idle-odroidh2-debian-amd64.deb

--2018-12-03 02:03:15--  http://odroidh2.djjproject.com/deb/hd-idle-odroidh2-debian-amd64.deb

Resolving odroidh2.djjproject.com (odroidh2.djjproject.com)... 58.123.71.137

Connecting to odroidh2.djjproject.com (odroidh2.djjproject.com)|58.123.71.137|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 6820 (6.7K) [application/x-debian-package]

Saving to: ‘hd-idle-odroidh2-debian-amd64.deb’


hd-idle-odroidh2-debian-a 100%[====================================>]   6.66K  --.-KB/s    in 0.04s   


2018-12-03 02:03:16 (168 KB/s) - ‘hd-idle-odroidh2-debian-amd64.deb’ saved [6820/6820]


root@djjproject:~# dpkg -i hd-idle-odroidh2-debian-amd64.deb 

Selecting previously unselected package hd-idle-djjproject.

(Reading database ... 68502 files and directories currently installed.)

Preparing to unpack hd-idle-odroidh2-debian-amd64.deb ...

Unpacking hd-idle-djjproject (20181203) ...

Setting up hd-idle-djjproject (20181203) ...

Installation Finished...

Processing triggers for systemd (232-25+deb9u6) ...


설정은 아래와 같이 하시면 됩니다.


패키징 하면서 본래 /etc/default 에 파일이 있지만 지워버렸습니다. 그러다 보니 설정을 바꿀 때 마다 아래의 systemctl daemon-reload 를 해야합니다. ㅠㅠ 


root@djjproject:~# nano /etc/init.d/hd-idle



#!/bin/sh


### BEGIN INIT INFO

# Provides:          hd-idle

# Required-Start:    $local_fs

# Required-Stop:     $local_fs

# Default-Start:     2 3 4 5

# Default-Stop:      0 1 6

# Short-Description: start hd-idle daemon (spin down idle hard disks)

### END INIT INFO



PATH=/sbin:/bin:/usr/sbin:/usr/bin


DAEMON=/usr/bin/hd-idle


# -i 시간 -l 로그파일위치

HD_IDLE_OPTS="-i 10 -l /var/log/hd-idle.log"

START_HD_IDLE=true



root@djjproject:~# service hd-idle restart

Warning: hd-idle.service changed on disk. Run 'systemctl daemon-reload' to reload units.

root@djjproject:~# systemctl daemon-reload

root@djjproject:~# service hd-idle restart


하드 슬립 잘 됩니다 ㅎㅎㅎ

반응형

댓글