removed l2CacheSize as its not present in all wmi databases

pull/60/head
mayowa 10 years ago
parent c715bd1b0b
commit 6a2bc5afe8

1
.gitignore vendored

@ -1,3 +1,4 @@
*~ *~
#* #*
_obj _obj
*.tmp

@ -15,7 +15,6 @@ import (
type Win32_Processor struct { type Win32_Processor struct {
LoadPercentage uint16 LoadPercentage uint16
L2CacheSize uint32
Family uint16 Family uint16
Manufacturer string Manufacturer string
Name string Name string
@ -67,7 +66,6 @@ func CPUInfo() ([]CPUInfoStat, error) {
cpu := CPUInfoStat{ cpu := CPUInfoStat{
CPU: int32(i), CPU: int32(i),
Family: fmt.Sprintf("%d", l.Family), Family: fmt.Sprintf("%d", l.Family),
CacheSize: int32(l.L2CacheSize),
VendorID: l.Manufacturer, VendorID: l.Manufacturer,
ModelName: l.Name, ModelName: l.Name,
Cores: int32(l.NumberOfLogicalProcessors), Cores: int32(l.NumberOfLogicalProcessors),

Loading…
Cancel
Save