Add verbosity level to perf Info logs

Signed-off-by: Katarzyna Kujawa <katarzyna.kujawa@intel.com>
This commit is contained in:
Katarzyna Kujawa 2020-06-24 11:22:16 +02:00
parent b74cdd2214
commit a8139dcf2e

View File

@ -45,9 +45,9 @@ import (
"github.com/google/cadvisor/utils/sysfs" "github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/version" "github.com/google/cadvisor/version"
"github.com/google/cadvisor/watcher" "github.com/google/cadvisor/watcher"
"github.com/opencontainers/runc/libcontainer/cgroups/fs2"
"github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/cgroups/fs2"
"github.com/opencontainers/runc/libcontainer/intelrdt" "github.com/opencontainers/runc/libcontainer/intelrdt"
"k8s.io/klog/v2" "k8s.io/klog/v2"
@ -932,7 +932,7 @@ func (m *manager) createContainerLocked(containerName string, watchSource watche
perfCgroupPath := path.Join(fs2.UnifiedMountpoint, containerName) perfCgroupPath := path.Join(fs2.UnifiedMountpoint, containerName)
cont.perfCollector, err = m.perfManager.GetCollector(perfCgroupPath) cont.perfCollector, err = m.perfManager.GetCollector(perfCgroupPath)
if err != nil { if err != nil {
klog.Infof("perf_event metrics will not be available for container %s: %s", containerName, err) klog.V(4).Infof("perf_event metrics will not be available for container %s: %s", containerName, err)
} }
} else { } else {
devicesCgroupPath, err := handler.GetCgroupPath("devices") devicesCgroupPath, err := handler.GetCgroupPath("devices")
@ -950,7 +950,7 @@ func (m *manager) createContainerLocked(containerName string, watchSource watche
} else { } else {
cont.perfCollector, err = m.perfManager.GetCollector(perfCgroupPath) cont.perfCollector, err = m.perfManager.GetCollector(perfCgroupPath)
if err != nil { if err != nil {
klog.Infof("perf_event metrics will not be available for container %s: %s", containerName, err) klog.V(4).Infof("perf_event metrics will not be available for container %s: %s", containerName, err)
} }
} }
} }