Class Sys::CPU
In: ext/bsd/bsd.c
Parent: Object

The CPU class provides class methods for obtaining CPU information

Methods

architecture   freq   load_avg   machine   model   num_cpu  

Classes and Modules

Class Sys::CPU::Error

Constants

VERSION = 0.6.1   The version of this package, returned as a String

Public Class methods

Returns the cpu‘s architecture. On most systems this will be identical to the CPU.machine method.

Returns an integer indicating the speed (i.e. frequency in Mhz) of the cpu.

Not supported on OS X.

Returns an array of three floats indicating the 1, 5 and 15 minute load average.

Returns the cpu‘s class type. On most systems this will be identical to the CPU.architecture method.

Returns a string indicating the cpu model.

Returns the number of cpu‘s on your system. Note that each core on multi-core systems are counted as a cpu, e.g. one dual core cpu would return 2, not 1.

[Validate]