@@ -13,6 +13,8 @@ type VcGenCmdCollector struct {
13
13
CoreClock * prometheus.Desc
14
14
ArmClock * prometheus.Desc
15
15
EmmcClock * prometheus.Desc
16
+ CpuMemory * prometheus.Desc
17
+ GpuMemory * prometheus.Desc
16
18
}
17
19
18
20
func (VcGenCmdCollector ) Describe (channel chan <- * prometheus.Desc ) {
@@ -26,6 +28,8 @@ func (VcGenCmdCollector) Describe(channel chan<- *prometheus.Desc) {
26
28
channel <- collector .CoreClock
27
29
channel <- collector .ArmClock
28
30
channel <- collector .EmmcClock
31
+ channel <- collector .CpuMemory
32
+ channel <- collector .GpuMemory
29
33
}
30
34
31
35
func (VcGenCmdCollector ) Collect (channel chan <- prometheus.Metric ) {
@@ -36,9 +40,11 @@ func (VcGenCmdCollector) Collect(channel chan<- prometheus.Metric) {
36
40
channel <- getVoltage (collector .SdramPhysicalVoltage , SdramPhysicalVoltage )
37
41
channel <- getVoltage (collector .SdramInputOutputVoltage , SdramInputOutputVoltage )
38
42
channel <- getVoltage (collector .SdramControllerVoltage , SdramControllerVoltage )
39
- channel <- getClock (collector .CoreClock , CoreClock )
43
+ channel <- getClock (collector .CoreClock , GpuClock )
40
44
channel <- getClock (collector .ArmClock , ArmClock )
41
45
channel <- getClock (collector .EmmcClock , EmmcClock )
46
+ channel <- getMemory (collector .CpuMemory , CpuMemory )
47
+ channel <- getMemory (collector .GpuMemory , GpuMemory )
42
48
}
43
49
44
50
var _ prometheus.Collector = & VcGenCmdCollector {}
@@ -81,20 +87,32 @@ func NewVcGenCmdCollector() *VcGenCmdCollector {
81
87
nil ,
82
88
),
83
89
CoreClock : prometheus .NewDesc (
84
- prometheus .BuildFQName (namespace , subsystem , "core_clock " ),
85
- "Clock of the core in Hz" ,
90
+ prometheus .BuildFQName (namespace , subsystem , "gpu_clock " ),
91
+ "Clock speed of the GPU in Hz" ,
86
92
nil ,
87
93
nil ,
88
94
),
89
95
ArmClock : prometheus .NewDesc (
90
- prometheus .BuildFQName (namespace , subsystem , "arm_clock " ),
91
- "Clock of the ARM CPU in Hz" ,
96
+ prometheus .BuildFQName (namespace , subsystem , "cpu_clock " ),
97
+ "Clock speed of the ARM CPU in Hz" ,
92
98
nil ,
93
99
nil ,
94
100
),
95
101
EmmcClock : prometheus .NewDesc (
96
102
prometheus .BuildFQName (namespace , subsystem , "emmc_clock" ),
97
- "Clock of the external MMC in Hz" ,
103
+ "Clock speed of the SD card in Hz" ,
104
+ nil ,
105
+ nil ,
106
+ ),
107
+ CpuMemory : prometheus .NewDesc (
108
+ prometheus .BuildFQName (namespace , subsystem , "cpu_memory" ),
109
+ "Memory for the CPU in Megabytes" ,
110
+ nil ,
111
+ nil ,
112
+ ),
113
+ GpuMemory : prometheus .NewDesc (
114
+ prometheus .BuildFQName (namespace , subsystem , "gpu_memory" ),
115
+ "Memory for the GPU in Megabytes" ,
98
116
nil ,
99
117
nil ,
100
118
),
0 commit comments