mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 23:19:06 +01:00
Merge branch 'develop' into main
This commit is contained in:
commit
4851382ad7
@ -139,7 +139,16 @@ func (m *LikwidCollector) Init(config json.RawMessage) error {
|
|||||||
for i, c := range cpulist {
|
for i, c := range cpulist {
|
||||||
m.cpulist[i] = C.int(c)
|
m.cpulist[i] = C.int(c)
|
||||||
m.cpu2tid[c] = i
|
m.cpu2tid[c] = i
|
||||||
|
}
|
||||||
|
m.sock2tid = make(map[int]int)
|
||||||
|
tmp := make([]C.int, 1)
|
||||||
|
for _, sid := range topo.SocketList() {
|
||||||
|
cstr := C.CString(fmt.Sprintf("S%d:0", sid))
|
||||||
|
ret = C.cpustr_to_cpulist(cstr, &tmp[0], 1)
|
||||||
|
if ret > 0 {
|
||||||
|
m.sock2tid[sid] = m.cpu2tid[int(tmp[0])]
|
||||||
|
}
|
||||||
|
C.free(unsafe.Pointer(cstr))
|
||||||
}
|
}
|
||||||
m.results = make(map[int]map[int]map[string]interface{})
|
m.results = make(map[int]map[int]map[string]interface{})
|
||||||
m.mresults = make(map[int]map[int]map[string]float64)
|
m.mresults = make(map[int]map[int]map[string]float64)
|
||||||
|
Loading…
Reference in New Issue
Block a user