mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
log pid when there is a problem reading the process stats (#1341)
Signed-off-by: Paul Gier <pgier@redhat.com>
This commit is contained in:
parent
d0a66c4c40
commit
8b13c130b7
|
@ -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++
|
||||
|
|
Loading…
Reference in a new issue