We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 684406f commit 2c10a31Copy full SHA for 2c10a31
hanlon_microkernel/facter/hnl_mk_cpu.rb
@@ -44,7 +44,9 @@
44
# process the results from lscpu
45
facts_to_report = %w{Architecture BogoMIPS Byte_Order CPU_MHz CPU_family CPU_op-modes
46
L1d_cache L1i_cache L2_cache L3_cache Model Stepping Vendor_ID
47
- Virtualization}
+ Virtualization Virtualization_type Hypervisor_vendor
48
+ Threads_per_core Cores_per_socket Sockets
49
+ NUMA_nodes}
50
%x[lscpu].split(/\n/).each do |line|
51
line =~ /^([^:]+):\s*(.*)\s*$/
52
if $1
@@ -59,3 +61,8 @@
59
61
end
60
62
63
64
+# report on the number of cores available
65
+Facter.add("mk_hw_core_count") do
66
+ setcode { Facter.value('mk_hw_lscpu_cores_per_socket').to_i *
67
+ Facter.value('mk_hw_lscpu_sockets').to_i }
68
+end
0 commit comments