Skip to content

Commit

Permalink
Merge pull request #142 from jzwlqx/feature/log
Browse files Browse the repository at this point in the history
change cgroup pids debug log to warning when no pids found
  • Loading branch information
Lyt99 authored Jan 18, 2024
2 parents d417d8e + d8f66a5 commit b0c669a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/exporter/nettop/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ func cacheNetTopology(ctx context.Context) error {
var pids []int
if podCgroupPath != "" {
pids = tasksInsidePodCgroup(podCgroupPath)
log.Debugf("found %d pids under cgroup %s", len(pids), podCgroupPath)
if len(pids) == 0 {
log.Warnf("sandbox %s/%s: found 0 pids under cgroup %s", namespace, name, podCgroupPath)
}
}

status := sandboxStatus.Status
Expand Down

0 comments on commit b0c669a

Please sign in to comment.