From 0f53bcbe207805cd50d6467cc1d7c46c770451a2 Mon Sep 17 00:00:00 2001 From: Sangbum Kim Date: Mon, 11 Sep 2017 00:56:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A3=BC=EC=84=9D=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumer/speed_controller.go | 7 +++---- processor/processor.go | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/consumer/speed_controller.go b/consumer/speed_controller.go index a7d3ee8..d425bc0 100644 --- a/consumer/speed_controller.go +++ b/consumer/speed_controller.go @@ -8,6 +8,7 @@ import ( "amuz.es/src/infra/cpu_ctrl/processor" "amuz.es/src/infra/cpu_ctrl/logger" "bytes" + "golang.org/x/tools/go/gcimporter15/testdata" ) var ( @@ -45,6 +46,7 @@ func (c *fanControl) StartControl() { } }() defer close(c.fanSpeedConsumer) + log.Info("Fan control started") ticker := time.Tick(c.sampleDuration) fanSpeedList := make([]int, c.processorCount) @@ -64,10 +66,7 @@ func (c *fanControl) StartControl() { if (!compareFanSpeed(fanSpeedList, newFanSpeedList)) { fanSpeedList = newFanSpeedList args := make([]string, 0) - args = append(args, - "raw", - "0x3a", "0x01", - ) + args = append(args,"raw","0x3a", "0x01",) for _, item := range fanSpeedList { args = append(args, fmt.Sprintf("0x%x", item)) } diff --git a/processor/processor.go b/processor/processor.go index 9aabbeb..51caadb 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -160,9 +160,9 @@ func (p *processor) StartMonitoring() { }: default: } - log.Infof("processor %d : fan changed 0x%x", p.id, fanspeed) } p.fanSpeed = fanspeed + log.Infof("processor %d : fan changed 0x%x", p.id, fanspeed) } case <-p.handler.Done(): return