Skip to content

Commit

Permalink
add comment to notice this workaround
Browse files Browse the repository at this point in the history
Signed-off-by: qwertysun <qwertysun@tencent.com>

123
  • Loading branch information
qwertysun committed Apr 17, 2020
1 parent 91a9c8f commit 925cda7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions collector/meminfo_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func parseMemInfo(r io.Reader) (map[string]float64, error) {
for scanner.Scan() {
line := scanner.Text()
parts := strings.Fields(line)
// Workaround for empty lines occasionally occur in CentOS 6.2 kernel 3.10.90.
if len(parts) == 0 {
continue
}
Expand Down

0 comments on commit 925cda7

Please sign in to comment.