From 0da77729f887163448a966313cea21070f1f86dc Mon Sep 17 00:00:00 2001 From: Paul Gier Date: Fri, 10 May 2019 12:06:48 -0500 Subject: [PATCH] log pid when there is a problem reading the process stats Signed-off-by: Paul Gier --- collector/processes_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collector/processes_linux.go b/collector/processes_linux.go index 1ee012ecde..9b171ace5b 100644 --- a/collector/processes_linux.go +++ b/collector/processes_linux.go @@ -108,10 +108,11 @@ func (c *processCollector) getAllocatedThreads() (int, map[string]int32, int, er stat, err := pid.NewStat() // PIDs can vanish between getting the list and getting stats. if os.IsNotExist(err) { - log.Debugf("file not found when retrieving stats: %q", err) + log.Debugf("file not found when retrieving stats for pid %v: %q", pid, err) continue } if err != nil { + log.Debugf("error reading stat for pid %v: %q", pid, err) return 0, nil, 0, err } pids++