cpu_info_list example

This commit is contained in:
Doug MacEachern 2007-09-15 14:40:32 +00:00
parent e10b6ef42c
commit ba9136a430
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
require 'rbsigar'
sigar = Sigar.new
infos = sigar.cpu_info_list
num = infos.length
puts num.to_s + " total CPUs.."
infos.each do |info|
puts "Vendor........" + info.vendor
puts "Model........." + info.model
puts "Mhz..........." + info.mhz.to_s
puts "Cache size...." + info.cache_size.to_s
end