mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-27 07:39:05 +01:00
Cleanup
This commit is contained in:
parent
fbf178326a
commit
a871753bdf
@ -22,36 +22,26 @@ const (
|
|||||||
|
|
||||||
// Structure holding all information about a hardware thread
|
// Structure holding all information about a hardware thread
|
||||||
type HwthreadEntry struct {
|
type HwthreadEntry struct {
|
||||||
CpuID int
|
CpuID int // CPU hardware threads
|
||||||
SMT int
|
SMT int // symmetric hyper threading ID
|
||||||
Core int
|
Core int // CPU core ID
|
||||||
Socket int
|
Socket int // CPU sockets (physical) ID
|
||||||
NumaDomain int
|
Die int // CPU Die ID
|
||||||
Die int
|
NumaDomain int // NUMA Domain
|
||||||
}
|
}
|
||||||
|
|
||||||
var cache struct {
|
var cache struct {
|
||||||
HwthreadList []int
|
HwthreadList, uniqHwthreadList []int // List of CPU hardware threads
|
||||||
uniqHwthreadList []int
|
SMTList, uniqSMTList []int // List of symmetric hyper threading IDs
|
||||||
|
CoreList, uniqCoreList []int // List of CPU core IDs
|
||||||
SMTList []int
|
SocketList, uniqSocketList []int // List of CPU sockets (physical) IDs
|
||||||
uniqSMTList []int
|
DieList, uniqDieList []int // List of CPU Die IDs
|
||||||
|
NumaDomainList, uniqNumaDomainList []int // List of NUMA Domains
|
||||||
CoreList []int
|
|
||||||
uniqCoreList []int
|
|
||||||
|
|
||||||
SocketList []int
|
|
||||||
uniqSocketList []int
|
|
||||||
|
|
||||||
DieList []int
|
|
||||||
uniqDieList []int
|
|
||||||
|
|
||||||
NumaDomainList []int
|
|
||||||
uniqNumaDomainList []int
|
|
||||||
|
|
||||||
CpuData []HwthreadEntry
|
CpuData []HwthreadEntry
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// init initializes the cache structure
|
||||||
func init() {
|
func init() {
|
||||||
file, err := os.Open(PROCFS_CPUINFO)
|
file, err := os.Open(PROCFS_CPUINFO)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user