Sha256: 9d9e9b483f649ba97e25b78f3aeaf15de99a5c0a5c8b17681807ed5916f32c9a

Contents?: true

Size: 1.63 KB

Versions: 2

Compression:

Stored size: 1.63 KB

Contents

= Description
   Sys::CPU - An interface for various cpu statistics
   
= Synopsis
   require "sys/cpu"
   include Sys

   # FreeBSD
   puts "Architecture: " + CPU.architecture
   puts "Machine: " + CPU.machine
   puts "Mhz: " + CPU.cpu_freq.to_s
   puts "Number of cpu's on this system: " + CPU.num_cpu.to_s
   puts "CPU model: " + CPU.model
   puts "Load averages: " + CPU.load_avg.join(", ")
   
= Constants
VERSION
   Returns the current version number for this package.
    
= Class Methods
CPU.architecture
   Returns the cpu's architecture.

CPU.freq
   Returns an integer indicating the speed (i.e. frequency in Mhz) of
   the cpu.
    
CPU.load_avg
   Returns an array of three floats indicating the 1, 5 and 15 minute load
   average.
    
CPU.machine
   Returns the class of cpu (probably identical to the architecture).

CPU.model
   Returns a string indicating the cpu model.
    
CPU.num_cpu
   Returns an integer indicating the number of cpu's on the system.
    
= Error Classes
CPUError < StandardError
   Raised is response to internal function errors, usually relating to an
   invalid cpu number.
    
= Known Bugs
   None known.  Please post bug reports to the SourceForge home page at
   http://www.rubyforge.org/projects/sysutils
    
= Copyright
   (C) 2003-2006 Daniel J. Berger
   All Rights Reserved
    
= Warranty
   This package is provided "as is" and without any express or
   implied warranties, including, without limitation, the implied
   warranties of merchantability and fitness for a particular purpose.

= License
   Ruby's
    
= Author
   Daniel J. Berger
   djberg96 at yahoo dot com
   imperator/rubyhacker1 on IRC (Freenode)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sys-cpu-0.5.5-i586-linux doc/freebsd.txt
sys-cpu-0.5.5 doc/freebsd.txt