Add more cpu logging

This commit is contained in:
Caleb Bassi 2018-04-09 13:04:58 -07:00
parent a93acab773
commit 76953a082d
1 changed files with 2 additions and 1 deletions

View File

@ -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)