Kanrisuru::Remote::Cpu class encapsulates the cpu information for a remote host.
Public Class Methods
Instantiates a new instance of cpu. Requires a host instance to read from.
cpu = Kanrisuru::Remote::Cpu.new(host) cpu.cores 48
Public Instance Methods
Returns an array of the load average from the last 1 minute, 5 minutes, and 15 minutes. This is updated from the remote host each time the method is called.
cpu.load_average [2.48, 2.74, 2.55]
The last 1 minute load average for the cpu.
The last 5 minute load average for the cpu.
The last 15 minute load average for the cpu.
The total number of physical sockets for the cpu chip.
The total number of logical cores. This is the total number of cores in each socket and doubled if hyperthreading is turned on.
The total number of threads in a single core. This is usually indicative if hyperthreading is turned on or off.
The number of physical cores in a single socket.
The mode of the Non-uniform memory access (NUMA).
The name of the vendor of the CPU chipset. NOTE: If the cpus differ per socket, there’s a known bug that only returns the value for the first CPU.
The numeric representation of the cpu family by the vendor. NOTE: If the cpus differ per socket, there’s a known bug that only returns the value for the first CPU.
The numeric representation fo the cpu model number by the vendor. NOTE: If the cpus differ per socket, there’s a known bug that only returns the value for the first CPU.
The name of the model of the cpu chipset. NOTE: If the cpus differ per socket, there’s a known bug that only returns the value for the first CPU.
cpu.model_name "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz"
The order in which bytes are read by the processor. Can be
Little Endian or
cpu.byte_order "Little Endian"
Returns the number of phyiscal and virtual bits for the address space. Values only shown for physical servers, not virtual ones.
cpu.address_sizes ["46 bits physical", "48 bits virtual"]
The operating frequency of the cpu processor, in megahertz.
The max operating frequency of the processor.
The min operating frequency of the processor.
The underlying hypervisor if the remote server is a virtual machine.
cpu2 = Kanrisuru::Remote::Cpu.new(host_virtual) cpu2.hypervisor 'KVM'
What type of virtualization type the virtualized machine is running on.
Flags set on the processor.
cpu.flags [ [ 0] "fpu", [ 1] "vme", [ 2] "de", [ 3] .. ,  "pts",  "md_clear",  "flush_l1d" ]
If the cpu is set with hyperthreading on. If true, this means that each core is running two threads in the pipeline at the same time.