From d8f66a5c93d6b525bdc8b67bc652dd13d755a029 Mon Sep 17 00:00:00 2001 From: "jizhong.jiangjz" Date: Mon, 15 Jan 2024 17:13:46 +0800 Subject: [PATCH] change cgroup pids debug log to warning when no pids found --- pkg/exporter/nettop/cache.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/exporter/nettop/cache.go b/pkg/exporter/nettop/cache.go index dd61e7f5..b55410a3 100644 --- a/pkg/exporter/nettop/cache.go +++ b/pkg/exporter/nettop/cache.go @@ -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