|
|
@ -19,7 +19,7 @@ type Win32_Processor struct {
|
|
|
|
Manufacturer string
|
|
|
|
Manufacturer string
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
NumberOfLogicalProcessors uint32
|
|
|
|
NumberOfLogicalProcessors uint32
|
|
|
|
ProcessorId string
|
|
|
|
ProcessorId *string
|
|
|
|
Stepping *string
|
|
|
|
Stepping *string
|
|
|
|
MaxClockSpeed uint32
|
|
|
|
MaxClockSpeed uint32
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -62,6 +62,9 @@ func CPUInfo() ([]CPUInfoStat, error) {
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return ret, err
|
|
|
|
return ret, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procID := ""
|
|
|
|
|
|
|
|
|
|
|
|
for i, l := range dst {
|
|
|
|
for i, l := range dst {
|
|
|
|
cpu := CPUInfoStat{
|
|
|
|
cpu := CPUInfoStat{
|
|
|
|
CPU: int32(i),
|
|
|
|
CPU: int32(i),
|
|
|
@ -69,7 +72,7 @@ func CPUInfo() ([]CPUInfoStat, error) {
|
|
|
|
VendorID: l.Manufacturer,
|
|
|
|
VendorID: l.Manufacturer,
|
|
|
|
ModelName: l.Name,
|
|
|
|
ModelName: l.Name,
|
|
|
|
Cores: int32(l.NumberOfLogicalProcessors),
|
|
|
|
Cores: int32(l.NumberOfLogicalProcessors),
|
|
|
|
PhysicalID: l.ProcessorId,
|
|
|
|
PhysicalID: procID,
|
|
|
|
Mhz: float64(l.MaxClockSpeed),
|
|
|
|
Mhz: float64(l.MaxClockSpeed),
|
|
|
|
Flags: []string{},
|
|
|
|
Flags: []string{},
|
|
|
|
}
|
|
|
|
}
|
|
|
|