diff --git a/proc/proc.go b/proc/proc.go index 51de6125..9dfc8590 100644 --- a/proc/proc.go +++ b/proc/proc.go @@ -122,10 +122,15 @@ func GetKernelModules(modulesPath string, count++ - nFields, _ := fmt.Sscanf(line, "%s %d %d %s %s 0x%x", + nFields, err := fmt.Sscanf(line, "%s %d %d %s %s 0x%x", &name, &size, &refcount, &dependencies, &state, &address) + if err != nil { + log.Warnf("err parsing line in modules: '%s'", err) + continue + } if nFields < 6 { - return nil, fmt.Errorf("unexpected line in modules: '%s'", line) + log.Warnf("unexpected line in modules: '%s'", line) + continue } if address == 0 { continue