Method: LinuxStat::CPU.model

Defined in:
lib/linux_stat/cpu.rb

.modelObject

Returns the model of processor.

If the information isn’t available, it will return en empty string.

The output is also cached (memoized) ; as changing the value in runtime is unexpected.



186
187
188
# File 'lib/linux_stat/cpu.rb', line 186

def model
  @@name ||= cpuinfo.find { |x| x.start_with?('model name') }.to_s.split(?:)[-1].to_s.strip
end