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