diff --git a/cpu/cpu_linux.go b/cpu/cpu_linux.go index b5a20e366..da467e2dd 100644 --- a/cpu/cpu_linux.go +++ b/cpu/cpu_linux.go @@ -309,7 +309,7 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) { func parseStatLine(line string) (*TimesStat, error) { fields := strings.Fields(line) - if len(fields) == 0 { + if len(fields) < 8 { return nil, errors.New("stat does not contain cpu info") } diff --git a/load/load_windows.go b/load/load_windows.go index 8f53efae3..5241dfaab 100644 --- a/load/load_windows.go +++ b/load/load_windows.go @@ -5,7 +5,6 @@ package load import ( "context" - "log" "math" "sync" "time" @@ -37,7 +36,6 @@ func loadAvgGoroutine(ctx context.Context) { counter, err := common.ProcessorQueueLengthCounter() if err != nil || counter == nil { - log.Printf("unexpected processor queue length counter error, %v\n", err) return }