From 76953a082dab797bb8798984bcae9c99a7bb366a Mon Sep 17 00:00:00 2001 From: Caleb Bassi Date: Mon, 9 Apr 2018 13:04:58 -0700 Subject: [PATCH] Add more cpu logging --- widgets/cpu.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/cpu.go b/widgets/cpu.go index a5b9566..371d408 100644 --- a/widgets/cpu.go +++ b/widgets/cpu.go @@ -49,7 +49,8 @@ func (self *CPU) update() { if self.Count <= 8 { percents, _ := psCPU.Percent(self.interval, true) if len(percents) != self.Count { - log.Fatalf("\nself.Count: %d\nlen(percents): %d\npercents: %v", self.Count, len(percents), percents) + count, _ := psCPU.Counts(false) + log.Fatalf("\nself.Count: %d\ngopsutil.Counts(): %d\nlen(percents): %d\npercents: %v", self.Count, count, len(percents), percents) } for i := 0; i < self.Count; i++ { key := "CPU" + strconv.Itoa(i)