@@ -77,7 +77,6 @@ func collectMetrics(w http.ResponseWriter, r *http.Request) {
77
77
log .Printf ("Found %d containers" , len (containers .Containers ))
78
78
containerMap := make (map [string ]containerInfo )
79
79
for _ , container := range containers .GetContainers () {
80
- log .Printf ("Found container %+v" , container )
81
80
containerMap [container .GetId ()] = containerInfo {
82
81
Node : node ,
83
82
Namespace : container .GetLabels ()["io.kubernetes.pod.namespace" ],
@@ -87,6 +86,7 @@ func collectMetrics(w http.ResponseWriter, r *http.Request) {
87
86
ContainerId : container .GetId (),
88
87
}
89
88
}
89
+ log .Printf ("Current map %+v" , containerMap )
90
90
collected := []metric {}
91
91
for i := 0 ; i < getDeviceCount (); i ++ {
92
92
d , ret := nvml .DeviceGetHandleByIndex (i )
@@ -97,7 +97,7 @@ func collectMetrics(w http.ResponseWriter, r *http.Request) {
97
97
for _ , process := range processes {
98
98
containerId := getContainerId (process .Pid )
99
99
container := containerMap [containerId ]
100
- log .Printf ("Found container %+v for process: %d" , container , process .Pid )
100
+ log .Printf ("Using %s Found container %+v for process: %d" , containerId , container , process .Pid )
101
101
collected = append (collected , metric {
102
102
Pid : process .Pid ,
103
103
UsedGpuMemory : process .UsedGpuMemory ,
0 commit comments