cloudius-systems / mgmt

20 stars 11 forks source link

API and CLI for CPU info #57

Open tzach opened 10 years ago

tzach commented 10 years ago

Linux users are used to go to /proc/cpuinfo for CPU related information, having compatible functionality for OSv will be useful.

Example below from Fedora 20

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
stepping    : 1
microcode   : 0x1
cpu MHz     : 2294.686
cache size  : 3072 KB
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 4589.37
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
tzach commented 10 years ago

dmtf.org define the following processor information:

Role : string
Family : uint16 {enum}
OtherFamilyDescription : string
UpgradeMethod : uint16 {enum}
MaxClockSpeed : uint32 {units}
CurrentClockSpeed : uint32 {units}
DataWidth : uint16 {units}
AddressWidth : uint16 {units}
LoadPercentage : uint16 {units}
Stepping : string
UniqueID : string
CPUStatus : uint16 {enum}
NumberOfEnabledCores: uint16 {E}
ExternalBusClockSpeed: uint32 {units}
Characteristics: uint16[] {E, enum}
EnabledProcessorCharacteristics: uint16[] {E, enum}

source: http://dmtf.org/sites/default/files/cim/cim_schema_v2400/Visio-CIM_Device.pdf page 3