class LinuxSystemProcessors
Processor probe for Linux systems noinspection RubyTooManyInstanceVariablesInspection
Public Class Methods
new()
click to toggle source
# File lib/processors.rb, line 39 def initialize proc = lscpu @model = proc['Model'] @model_name = proc['Model name'] @speed = (@model_name.split[5][0..-4].to_f * 1000).to_i @family = proc['CPU family'] @architecture = proc['Architecture'] @count = proc['Socket(s)'].to_i @core_count = proc['Core(s) per socket'].to_i * @count @thread_count = proc['Thread(s) per core'].to_i * @core_count @l2_cache = proc['L2 cache'][0..-2].to_i * @core_count @l3_cache = proc['L3 cache'][0..-2].to_i @manufacturer = proc['Vendor ID'] end