ohai
ohai copied to clipboard
cpu plugin: add microcode revision
Description
In light of the spectre_v1,spectre_v2,spec_store_bypass vulnerabilities that got attention in recent months. It would be nice to have the microcode revision exported in the cpu
tree as well.
The information is avaiable in the the /proc/cpuinfo
file which is used as source for the cpu
tree here ohai/lib/ohai/plugins/linux/cpu.rb
.
~ % grep -E 'processor|model name|microcode' /proc/cpuinfo
processor : 0
model name : Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
microcode : 0x25
processor : 1
model name : Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
microcode : 0x25
processor : 2
model name : Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
microcode : 0x25
processor : 3
model name : Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
microcode : 0x25