You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: collectors/collectors.go
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
-
// Package Collectors defines the structure of the collector aggregator and contains the individual collectors used to gather metrics
2
-
// Each collector should be created in its own file with any required command line flags, its collection behavior and its registration method defined.
1
+
// Package collectors defines the structure of the collector aggregator and contains the individual collectors
2
+
// used to gather metrics.
3
+
// Each collector should be created in its own file with any required command line flags, its collection
4
+
// behavior and its registration method defined.
3
5
4
6
package collectors
5
7
@@ -22,7 +24,8 @@ var (
22
24
// SriovCollector registers the collectors used for specific data and exposes a Collect method to gather the data
23
25
typeSriovCollector []prometheus.Collector
24
26
25
-
// Register defines a flag for a collector and adds it to the registry of enabled collectors if the flag is set to true - either through the default option or the flag passed on start
27
+
// Register defines a flag for a collector and adds it to the registry of enabled collectors
28
+
// if the flag is set to true - either through the default option or the flag passed on start.
26
29
// Run by each individual collector in its init function.
Copy file name to clipboardExpand all lines: collectors/pod_cpu_link.go
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
package collectors
2
2
3
-
// kubepodCPUCollector is a Kubernetes focused collector that exposes information about CPUs linked to specific Kubernetes pods through the CPU Manager component in Kubelet
3
+
// kubepodCPUCollector is a Kubernetes focused collector that exposes information about CPUs
4
+
// linked to specific Kubernetes pods through the CPU Manager component in Kubelet
4
5
5
6
import (
6
7
"encoding/json"
@@ -21,9 +22,11 @@ import (
21
22
22
23
var (
23
24
kubepodcpu="kubepodcpu"
24
-
kubePodCgroupPath=flag.String("path.kubecgroup", "/sys/fs/cgroup/cpuset/kubepods.slice/", "Path for location of kubernetes cgroups on the host system")
25
+
kubePodCgroupPath=flag.String("path.kubecgroup",
26
+
"/sys/fs/cgroup/cpuset/kubepods.slice/", "Path for kubernetes cgroups")
25
27
sysDevSysNodePath=flag.String("path.nodecpuinfo", "/sys/devices/system/node/", "Path for location of system cpu information")
26
-
cpuCheckPointFile=flag.String("path.cpucheckpoint", "/var/lib/kubelet/cpu_manager_state", "Path for location of cpu manager checkpoint file")
// This accounting will create an entry for each guaranteed pod, even if that pod isn't managed by CPU manager
155
158
// i.e. it will still create an entry if the pod is looking for millis of CPU
156
159
// Todo: validate regex matching and evaluate performance of this approach
157
-
// Todo: validate assumptions about directory structure against other runtimes and kubelet config. Plausibly problematic with CgroupsPerQos and other possible future cgroup changes
160
+
// Todo: validate assumptions about directory structure against other runtimes and kubelet config.
161
+
// Plausibly problematic with CgroupsPerQos and other possible future cgroup changes
0 commit comments