Sha256: beadb7ab692e5662233c5be75fb056e02b16ecbba0cec88589e91f8bba6f567f
Contents?: true
Size: 1.28 KB
Versions: 5
Compression:
Stored size: 1.28 KB
Contents
== Description Sys::CPU - An interface for various cpu statistics == Synopsis require "sys/cpu" include Sys CPU.processors{ |cs| cs.members.each{ |m| puts "#{m}: " + cs[m].to_s } } CPU.bogomips(1) # -> returns bogomips for cpu #2 == Notes Portions of this documentation built dynamically == Constants VERSION Returns the current version number for this package as a String. == Class Methods CPU.load_avg Returns an array of three floats indicating the 1, 5 and 15 minute load average. CPU.cpu_stats Returns a hash, with the cpu number as the key and an array as the value. The array contains the number of seconds that the system spent in user mode, user mode with low priority (nice), system mode, and the idle task, respectively, for that cpu. CPU.processors{ |cpu struct| block } Calls the block for each processor on your system, passing a CPUStruct as the parameter. The exact members of the CPUStruct are the same as the class method names, except for CPU.processors (although you may optionally omit the "?" when referring to a struct member). These were determined when you installed this package because they vary from one chip architecture to another.
Version data entries
5 entries across 5 versions & 1 rubygems