Created
December 22, 2009 06:46
-
-
Save sms420/261557 to your computer and use it in GitHub Desktop.
my system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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