Skip to content

Instantly share code, notes, and snippets.

@sms420
Created December 22, 2009 06:46
Show Gist options
  • Select an option

  • Save sms420/261557 to your computer and use it in GitHub Desktop.

Select an option

Save sms420/261557 to your computer and use it in GitHub Desktop.
my system
#!/usr/local/bin/ruby1.9 -w
# mySys.rb
# Sean Stephenson
# CS 177
# 2009-12-17
# provides info re my computer, dude
require 'computer'
dude = Computer.new
dude.mem_size
dude.cpu_nums
dude.cpu_vendor
dude.cpu_model
dude.cpu_speed
dude.os_name
dude.mac_num
dude.swap_size
=begin
SAMPLE OUTPUT:
Memory: 1895 MBs
Total CPUs: 2
CPU Vendor: AuthenticAMD
CPU Model: AMD Turion(tm) 64 X2 Mobile Technology TL-56
CPU Speed: 800.000 MHz
OS Name: Linux
MAC Address: 00:16:d4:ff:df:de
Swap Size: 5686968 kB
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment